Skip to content

Commit adeba97

Browse files
committed
DEV: prevents double navigation
Clicking on the switcher is already causing a navigation to the topic to refresh content. I this spec we were doing a `visit_topic` right after which could be working in selenium, but will often fail on playwright with the following error: ``` Playwright::Error: net::ERR_ABORTED at http://localhost:31339/t/life-strategies-from-the-art-of-war/96 Call log: - navigating to "http://localhost:31339/t/life-strategies-from-the-art-of-war/96", waiting until "load" ```
1 parent 6b6df5d commit adeba97

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spec/system/anon_language_switcher_spec.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,20 @@
6767

6868
switcher.expand
6969
switcher.click_button("Español")
70+
7071
expect(find(".nav-item_latest")).to have_content("Recientes")
7172

7273
topic_page.visit_topic(topic)
73-
topic_page.has_topic_title?("Estrategias de vida de El arte de la guerra")
74+
75+
expect(topic_page).to have_topic_title("Estrategias de vida de El arte de la guerra")
7476

7577
switcher.expand
7678
switcher.click_button("日本語")
77-
topic_page.visit_topic(topic)
78-
topic_page.has_topic_title?("孫子兵法からの人生戦略")
79+
80+
expect(topic_page).to have_topic_title("孫子兵法からの人生戦略")
7981

8082
visit("/")
83+
8184
expect(find(".nav-item_latest")).to have_content("最新")
8285
end
8386
end

0 commit comments

Comments
 (0)