Increase moderation dashboard scenario to check back link text
This commit is contained in:
@@ -93,17 +93,27 @@ feature 'Moderation' do
|
|||||||
expect(page).to_not have_link('Valuation')
|
expect(page).to_not have_link('Valuation')
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Moderation dashboard' do
|
context 'Moderation dashboard' do
|
||||||
|
background do
|
||||||
|
Setting['org_name'] = 'OrgName'
|
||||||
|
end
|
||||||
|
|
||||||
|
after do
|
||||||
|
Setting['org_name'] = 'CONSUL'
|
||||||
|
end
|
||||||
|
|
||||||
|
scenario 'Contains correct elements' do
|
||||||
create(:moderator, user: user)
|
create(:moderator, user: user)
|
||||||
login_as(user)
|
login_as(user)
|
||||||
visit root_path
|
visit root_path
|
||||||
|
|
||||||
click_link 'Moderation'
|
click_link 'Moderation'
|
||||||
|
|
||||||
|
expect(page).to have_link('Go back to OrgName')
|
||||||
expect(current_path).to eq(moderation_root_path)
|
expect(current_path).to eq(moderation_root_path)
|
||||||
expect(page).to have_css('#moderation_menu')
|
expect(page).to have_css('#moderation_menu')
|
||||||
expect(page).to_not have_css('#admin_menu')
|
expect(page).to_not have_css('#admin_menu')
|
||||||
expect(page).to_not have_css('#valuation_menu')
|
expect(page).to_not have_css('#valuation_menu')
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user