Skip to content

Commit e60e832

Browse files
authored
DEV: fix flaky in admin site texts (#32783)
A spec could potentially go so fast that it would attempt to fill in the input before we have gone through the various redirects resulting in an error. ``` Failure/Error: super Playwright::Error: TypeError: Cannot read properties of null (reading 'namespaceURI') at eval (eval at evaluate (:313:29), <anonymous>:17:12) at UtilityScript.evaluate (<anonymous>:320:18) at UtilityScript.<anonymous> (<anonymous>:1:44) Call log: ``` Now that we ensure that we have the current final state path we should avoid this error.
1 parent df37ef5 commit e60e832

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/system/page_objects/pages/admin_site_texts.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ def toggle_only_show_results_in_selected_locale
4242

4343
def edit_translation(key)
4444
find(".site-text[data-site-text-id='#{key}']").find(".site-text-edit").click
45+
has_current_path?(
46+
"/admin/customize/site_texts/#{key}?locale=#{I18n.locale}",
47+
ignore_query: false,
48+
)
4549
end
4650

4751
def override_translation(value)

0 commit comments

Comments
 (0)