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 spec/features/spash_spec.rb #34

Merged
merged 1 commit into from
Oct 4, 2023
Merged

🧹 Fix spec/features/spash_spec.rb #34

merged 1 commit into from
Oct 4, 2023

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Oct 4, 2023

Prior to this commit the diff was as follows:

❯ diff spec/features/splash_spec.rb hyrax-webapp/spec/features/splash_spec.rb
3c3,4
< RSpec.describe "The splash page", multitenant: true do
---
> # NOTE: If want to run spec in broweser, you have to set "js: true"
> RSpec.describe "The splash page", type: :feature, clean: true, multitenant: true do
4a6,7
>     original = ENV['HYKU_ADMIN_ONLY_TENANT_CREATION']
>     ENV['HYKU_ADMIN_ONLY_TENANT_CREATION'] = "true"
8a12
>     ENV['HYKU_ADMIN_ONLY_TENANT_CREATION'] = original
11c15
<   xit "shows the page, displaying the Hyku version" do
---
>   it "shows the page, displaying the Hyku version" do
19c23
<     expect(page).to have_content("© Adventist Digital Library 2021")
---
>     expect(page).to have_content("Hyku v#{Hyku::VERSION}")

After this commit, we've removed the xit and carried forward the directives from Hyku's spec helper:

❯ diff spec/features/splash_spec.rb hyrax-webapp/spec/features/splash_spec.rb
2a3
> # NOTE: If want to run spec in broweser, you have to set "js: true"
4a6,7
>     original = ENV['HYKU_ADMIN_ONLY_TENANT_CREATION']
>     ENV['HYKU_ADMIN_ONLY_TENANT_CREATION'] = "true"
8a12
>     ENV['HYKU_ADMIN_ONLY_TENANT_CREATION'] = original
11c15
<   it "shows the page, displaying the Adventist copyright" do
---
>   it "shows the page, displaying the Hyku version" do
12a17
>     expect(page).to have_link 'Login to get started', href: main_app.new_user_session_path(locale: 'en')
18c23
<     expect(page).to have_content("© Adventist Digital Library 2022")
---
>     expect(page).to have_content("Hyku v#{Hyku::VERSION}")

I have removed a test for a link to "Login to get started" as that is not part of the feature. The main purpose of the spec is to ensure that we're rendering the correct footer.

Related to:

Prior to this commit the diff was as follows:

```
❯ diff spec/features/splash_spec.rb hyrax-webapp/spec/features/splash_spec.rb
3c3,4
< RSpec.describe "The splash page", multitenant: true do
---
> # NOTE: If want to run spec in broweser, you have to set "js: true"
> RSpec.describe "The splash page", type: :feature, clean: true, multitenant: true do
4a6,7
>     original = ENV['HYKU_ADMIN_ONLY_TENANT_CREATION']
>     ENV['HYKU_ADMIN_ONLY_TENANT_CREATION'] = "true"
8a12
>     ENV['HYKU_ADMIN_ONLY_TENANT_CREATION'] = original
11c15
<   xit "shows the page, displaying the Hyku version" do
---
>   it "shows the page, displaying the Hyku version" do
19c23
<     expect(page).to have_content("© Adventist Digital Library 2021")
---
>     expect(page).to have_content("Hyku v#{Hyku::VERSION}")
```

After this commit, we've removed the xit and carried forward the
directives from Hyku's spec helper:

```
❯ diff spec/features/splash_spec.rb hyrax-webapp/spec/features/splash_spec.rb
2a3
> # NOTE: If want to run spec in broweser, you have to set "js: true"
4a6,7
>     original = ENV['HYKU_ADMIN_ONLY_TENANT_CREATION']
>     ENV['HYKU_ADMIN_ONLY_TENANT_CREATION'] = "true"
8a12
>     ENV['HYKU_ADMIN_ONLY_TENANT_CREATION'] = original
11c15
<   it "shows the page, displaying the Adventist copyright" do
---
>   it "shows the page, displaying the Hyku version" do
12a17
>     expect(page).to have_link 'Login to get started', href: main_app.new_user_session_path(locale: 'en')
18c23
<     expect(page).to have_content("© Adventist Digital Library 2022")
---
>     expect(page).to have_content("Hyku v#{Hyku::VERSION}")
```

I have removed a test for a link to "Login to get started" as that is
not part of the feature.  The main purpose of the spec is to ensure that
we're rendering the correct footer.

Related to:

- #538
@jeremyf jeremyf merged commit 82e103d into main Oct 4, 2023
2 of 6 checks passed
@jeremyf jeremyf deleted the fix-feature-splash branch October 4, 2023 16:19
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.

2 participants