Fix expectations for already existing content
We were checking content which was already present/absent before making a certain request, so the expectations were not checking the request had already finished. Our intention here is to check the page contents after the request has finished.
This commit is contained in:
@@ -12,7 +12,8 @@ describe "Admin custom information texts", :admin do
|
||||
expect(page).to have_content "Help with participatory budgets"
|
||||
|
||||
within("#information-texts-tabs") { click_link "Debates" }
|
||||
expect(page).to have_content "Help about debates"
|
||||
|
||||
expect(page).to have_content "Edit debate"
|
||||
|
||||
within("#information-texts-tabs") { click_link "Community" }
|
||||
expect(page).to have_content "Access the community"
|
||||
|
||||
@@ -321,7 +321,7 @@ describe "Admin edit translatable records", :admin do
|
||||
|
||||
click_button "Save changes"
|
||||
|
||||
expect(page).not_to have_css "#error_explanation"
|
||||
expect(page).to have_content "Process updated successfully"
|
||||
|
||||
visit edit_admin_legislation_process_path(translatable)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user