Blocks E2E: Remove discouraged waitForTimeout from tests (#47214)

This commit is contained in:
Bart Kalisz 2024-05-08 10:14:24 +02:00 committed by GitHub
parent 2936c4eac8
commit c464afc7ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 18 deletions

View File

@ -260,9 +260,6 @@ class ProductCollectionPage {
await this.page
.getByRole( 'button', { name: 'Filters options' } )
.click();
// We should refactor this code. We should not wait for timeout.
// eslint-disable-next-line playwright/no-wait-for-timeout
await this.page.waitForTimeout( 500 );
await this.page
.getByRole( 'menuitemcheckbox', {
name,
@ -431,9 +428,6 @@ class ProductCollectionPage {
const input = sidebarSettings.getByLabel( 'Keyword' );
await input.clear();
await input.fill( keyword );
// Timeout is needed because of debounce in the block.
// eslint-disable-next-line playwright/no-wait-for-timeout
await this.page.waitForTimeout( 300 );
await this.refreshLocators( 'editor' );
}

View File

@ -189,10 +189,6 @@ test.describe( `${ blockData.name }`, () => {
)
.click();
// We should refactor this.
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout( 500 );
const groupBlock = (
await editorUtils.getBlockByTypeWithParent(
'core/group',
@ -279,10 +275,6 @@ test.describe( `${ blockData.name }`, () => {
)
.click();
// We should refactor this.
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout( 500 );
const groupBlock = (
await editorUtils.getBlockByTypeWithParent(
'core/group',
@ -370,10 +362,6 @@ test.describe( `${ blockData.name }`, () => {
)
.click();
// We should refactor this.
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout( 500 );
const groupBlock = (
await editorUtils.getBlockByTypeWithParent(
'core/group',

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Blocks E2E: Remove discouraged waitForTimeout from tests