Commit 8739743d authored by Adam Hegyi's avatar Adam Hegyi Committed by Thong Kuah

Fix flaky Cycle Analytics test case

Use 'have_selector' matcher instead of looking up the element's
class list.
parent ef986efd
......@@ -246,14 +246,14 @@ describe 'Group Cycle Analytics', :js do
expect(page).to have_text('Add a stage')
end
it 'becomes active when clicked ' do
btn = page.find('.js-add-stage-button')
it 'becomes active when clicked' do
button_class = '.js-add-stage-button'
expect(btn[:class]).not_to include('active')
expect(page).not_to have_selector("#{button_class}.active")
btn.click
page.find(button_class).click
expect(btn[:class]).to include('active')
expect(page).to have_selector("#{button_class}.active")
end
it 'displays the custom stage form when clicked' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment