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:
Javi Martín
2018-08-29 08:49:55 +02:00
committed by decabeza
parent 1a15cb6a42
commit 745c9cd72b

View File

@@ -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'