Don't check already present page content
The content 'An example legislation process' is already present before we click the "All" link. Not checking the page content properly sometimes resulted in the second click being executed before the first request had been completed, making the spec fail. By checking the "All" link isn't present anymore, we guarantee the request has been completed before trying to click the 'An example legislation process' link.
This commit is contained in:
@@ -85,7 +85,7 @@ feature 'Admin legislation draft versions' do
|
||||
|
||||
click_link "All"
|
||||
|
||||
expect(page).to have_content 'An example legislation process'
|
||||
expect(page).not_to have_link "All"
|
||||
|
||||
click_link 'An example legislation process'
|
||||
click_link 'Drafting'
|
||||
|
||||
Reference in New Issue
Block a user