generated from ita-social-projects/DevTemplate
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from ita-social-projects/ZER-173-testing-of-n…
…avigation-admin-menu ZER-173: testing of navigation admin menu
- Loading branch information
Showing
7 changed files
with
61 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
describe 'navigator', js: true do | ||
it 'should style the navbar' do | ||
visit root_path | ||
expect(page).to have_css('.page-header') | ||
expect(page.body).to have_css('.tabs') | ||
end | ||
|
||
context 'when feature show_admin_menu does not exist' do | ||
it 'should not consist tabs' do | ||
visit root_path | ||
expect(page).not_to have_content("SIGN UP") | ||
expect(page).not_to have_content("LOG IN") | ||
expect(page).not_to have_content("CONTACT US") | ||
end | ||
end | ||
|
||
context 'when feature show_admin_menu is disabled' do | ||
it 'should not consist tabs' do | ||
create(:feature_flag, :hide_admin_menu) | ||
visit root_path | ||
expect(page).not_to have_content("SIGN UP") | ||
expect(page).not_to have_content("LOG IN") | ||
expect(page).not_to have_content("CONTACT US") | ||
end | ||
end | ||
|
||
context 'when feature show_admin_menu is enabled' do | ||
it 'should consist tabs' do | ||
create(:feature_flag, :show_admin_menu) | ||
visit root_path | ||
expect(page).to have_content("SIGN UP") | ||
expect(page).to have_content("LOG IN") | ||
expect(page).to have_content("CONTACT US") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters