DEV: Fix admin sidebar filter flaky (#26844)

`within` is the devil, let's try this fix to
followup 79cccaf61f
and prevent `Selenium::WebDriver::Error::StaleElementReferenceError`
This commit is contained in:
Martin Brennan 2024-05-02 13:27:24 +10:00 committed by GitHub
parent f25054417c
commit 08e0a6b2cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -129,12 +129,12 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
filter.filter("bevelaqua")
find(".sidebar-additional-filter-users").click
expect(page).to have_current_path("/admin/users/list/active?username=bevelaqua")
within(".users-list-container") { expect(page).to have_content("bevelaqua") }
expect(find(".users-list-container")).to have_content("bevelaqua")
filter.filter("moltisanti")
find(".sidebar-additional-filter-users").click
expect(page).to have_current_path("/admin/users/list/active?username=moltisanti")
within(".users-list-container") { expect(page).to have_content("moltisanti") }
expect(find(".users-list-container")).to have_content("moltisanti")
end
it "allows sections to be expanded" do