A platform for community discussion. Free, open, simple.
FIX: uses css selector to ensure we use waiters (#35063)
Joffrey JAFFEUXc909c79b2802
diff --git a/spec/system/page_objects/pages/user_activity_drafts.rb b/spec/system/page_objects/pages/user_activity_drafts.rbindex eb21bd49739..66c2bdc8c64 100644--- a/spec/system/page_objects/pages/user_activity_drafts.rb+++ b/spec/system/page_objects/pages/user_activity_drafts.rb@@ -33,8 +33,7 @@ module PageObjectsenddef select_draft(index = 0)- checkboxes = page.all(".bulk-select-checkbox")- checkboxes[index].click+ page.find(".post-list-item:nth-of-type(#{index + 1}) .bulk-select-checkbox").clickselfend@@ -82,23 +81,19 @@ module PageObjectsenddef has_draft_selected?(index = 0)- drafts = page.all(".post-list-item")- drafts[index].has_css?(".post-list-item--selected")+ page.has_css?(".post-list-item:nth-of-type(#{index + 1}) .post-list-item--selected")enddef has_no_draft_selected?(index = 0)- drafts = page.all(".post-list-item")- drafts[index].has_no_css?(".post-list-item--selected")+ page.has_no_css?(".post-list-item:nth-of-type(#{index + 1}) .post-list-item--selected")enddef has_checkbox_checked?(index = 0)- checkboxes = page.all(".bulk-select-checkbox")- checkboxes[index].checked?+ page.has_css?(".post-list-item:nth-of-type(#{index + 1}) .bulk-select-checkbox:checked")enddef has_checkbox_unchecked?(index = 0)- checkboxes = page.all(".bulk-select-checkbox")- !checkboxes[index].checked?+ page.has_no_css?(".post-list-item:nth-of-type(#{index + 1}) .bulk-select-checkbox:checked")endendend