Skip to content

Commit

Permalink
Testing: Use deterministic selectors for incremented IDs (#19844)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored Jan 23, 2020
1 parent 6d035d3 commit f5cdfca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/e2e-tests/config/setup-test-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ async function trashExistingPosts() {
}

// Select all posts.
await page.waitForSelector( '#cb-select-all-1' );
await page.click( '#cb-select-all-1' );
await page.waitForSelector( '[id^=cb-select-all-]' );
await page.click( '[id^=cb-select-all-]' );
// Select the "bulk actions" > "trash" option.
await page.select( '#bulk-action-selector-top', 'trash' );
// Submit the form to send all draft/scheduled/published posts to the trash.
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/specs/editor/various/embedding.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ describe( 'Embedding content', () => {
await insertBlock( 'Paragraph' );
await page.keyboard.type( 'Hello there!' );
await publishPost();
const postUrl = await page.$eval( '#inspector-text-control-0', ( el ) => el.value );
const postUrl = await page.$eval( '[id^=inspector-text-control-]', ( el ) => el.value );

// Start a new post, embed the previous post.
await createNewPost();
Expand Down

0 comments on commit f5cdfca

Please sign in to comment.