Skip to content

Commit

Permalink
Fix the problem that E2E util checkFAQExpandable doesn't wait for t…
Browse files Browse the repository at this point in the history
…he page to load to proceed with assertions.
  • Loading branch information
eason9487 committed Dec 14, 2023
1 parent b4421aa commit 368bb0c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/e2e/utils/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export async function selectCountryFromSearchBox(
*/
export async function checkFAQExpandable( page ) {
const faqTitles = getFAQPanelTitle( page );
await expect.poll( () => faqTitles.count() ).toBeGreaterThan( 0 );
const count = await faqTitles.count();

if ( count === 1 ) {
Expand Down

0 comments on commit 368bb0c

Please sign in to comment.