Start waiting for response before click
This commit is contained in:
parent
90d7f160d5
commit
c3a65eefaa
|
@ -63,10 +63,11 @@ test( `Setup remote test site`, async ( { page, request } ) => {
|
||||||
await page.goto( '/wp-admin/plugin-install.php' );
|
await page.goto( '/wp-admin/plugin-install.php' );
|
||||||
await page.getByRole( 'button', { name: Upload_Plugin } ).click();
|
await page.getByRole( 'button', { name: Upload_Plugin } ).click();
|
||||||
await page.getByLabel( Plugin_zip_file ).setInputFiles( zipPath );
|
await page.getByLabel( Plugin_zip_file ).setInputFiles( zipPath );
|
||||||
|
const uploadPromise = page.waitForResponse(
|
||||||
|
'/wp-admin/update.php?action=upload-plugin'
|
||||||
|
);
|
||||||
await page.getByRole( 'button', { name: Install_Now } ).click();
|
await page.getByRole( 'button', { name: Install_Now } ).click();
|
||||||
const uploadResponse = await page.waitForResponse(
|
const uploadResponse = await uploadPromise;
|
||||||
'**/wp-admin/update.php?action=upload-plugin'
|
|
||||||
);;
|
|
||||||
expect( uploadResponse.ok() ).toBeTruthy();
|
expect( uploadResponse.ok() ).toBeTruthy();
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole( 'link', { name: Activate_Plugin } )
|
page.getByRole( 'link', { name: Activate_Plugin } )
|
||||||
|
|
Loading…
Reference in New Issue