Skip to content

Commit c379d34

Browse files
authored
DEV: Fix flaky specs (#275)
1 parent 8bf3021 commit c379d34

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

spec/system/keyboard_shortcuts_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
it "approves the commit" do
2525
topic_page.visit_topic(topic)
26+
expect(page).to have_css("#site-logo")
27+
2628
send_keys("y")
2729
expect(page).to have_current_path("/")
2830
expect(tags).to include("approved")
@@ -34,6 +36,8 @@
3436

3537
it "does nothing" do
3638
topic_page.visit_topic(topic)
39+
expect(page).to have_css("#site-logo")
40+
3741
expect { send_keys("y") }.not_to change { topic.reload.tags.pluck(:name) }
3842
expect(page).to have_current_path("/t/#{topic.slug}/#{topic.id}")
3943
end
@@ -44,6 +48,8 @@
4448
it "does nothing" do
4549
topic_page.visit_topic(topic)
4650
send_keys("y")
51+
expect(page).to have_css("#site-logo")
52+
4753
expect(page).to have_current_path("/t/#{topic.slug}/#{topic.id}")
4854
expect(tags).not_to include("approved")
4955
end

0 commit comments

Comments
 (0)