Blocks E2E: Remove discouraged waitForTimeout from tests (#47214)
This commit is contained in:
parent
2936c4eac8
commit
c464afc7ad
|
@ -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' );
|
||||
}
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Blocks E2E: Remove discouraged waitForTimeout from tests
|
Loading…
Reference in New Issue