Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/Re-Enable Some RSpec Features Tests #798

Open
wants to merge 4 commits into
base: integration
Choose a base branch
from

Conversation

aaronskiba
Copy link
Collaborator

Fixes #797

Changes proposed in this PR:

  • Fix/Re-Enable some RSpec features tests that were being previously being skipped
    • The "Create a new plan" test (spec/features/plans_spec.rb) was previously skipped. Although, it is working for DMPRoadmap, it was not compatible with DMP Assistant. This PR edits the test (specifically regarding "default funder" handling, as well as the differences in the UI of the /plans/new page) to make it work with DMP Assistant.
    • Features tests within spec/features/locales_spec.rb were also previously skipped. When selecting a locale, there must be a corresponding dmp_logo_XX.png within the asset pipeline, where "XX" corresponds with the locale's abbreviation. This PR edits the locales within this file to only ones where there is a corresponding dmp_logo_XX.png file within the asset pipeline.

@aaronskiba aaronskiba force-pushed the aaron/issues/797 branch 2 times, most recently from 6457d5a to 8da2461 Compare August 15, 2024 20:34
The "Create Plan UI" For DMP Assistant diverges from that of DMP Roadmap. This commit adapts the tests within `spec/features/plans_spec.rb` to work with DMP Assistant's UI and logic.
Copy/paste same file from DMP Roadmap
This commit adapts commit da3a9ed to DMP Assistant.
- When selecting a locale, a corresponding `dmp_logo_XX.png` file must be present within the asset pipeline. If the .png file does not exist, an error is encountered. For example, the following is encountered when `click_link 'German'` is executed within this test:
```
Failure/Error: <%= link_to(image_tag(current_locale_logo,

ActionView::Template::Error:
  The asset "dmp_logo_de.png" is not present in the asset pipeline.
```
Thus, this file has been modified to only include the available locales within DMP Assistant.
The 'User creates a new Plan' test will not pass unless an org exists within the db such that  `org.id == Rails.application.config.default_funder_id`. However, we have `config.default_funder_id = Rails.application.secrets.default_funder_id` within `config/application.rb`. This secret is not read while executing the tests via our GitHub actions. Thus, we are overriding/setting that value within the test itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant