Skip to content

Commit

Permalink
Removed useless action and checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jeawhanlee committed Oct 28, 2024
1 parent 1a6f4a7 commit 99624d4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/support/steps/delete-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,13 @@ When('I delete plugin', async function (this: ICustomWorld) {
}

// Delete WPR.
//await this.page.locator( '#delete-wp-rocket' ).click();

await this.utils.removeWprViaUi();
});

/**
* Executes the step to assert successful deletion of the WP Rocket plugin.
*/
Then('plugin should delete successfully', async function (this: ICustomWorld) {

if (await this.page.getByRole('button', { name: 'Yes, delete these files and data' }).isVisible()) {
await this.page.getByRole('button', { name: 'Yes, delete these files and data' }).click();
await expect(this.page.locator('#activate-wp-rocket')).toBeHidden();
return;
}
// Assert that WPR is deleted successfully
await this.page.waitForSelector('#wp-rocket-deleted');
await expect(this.page.locator('#wp-rocket-deleted')).toBeVisible();
Expand Down

0 comments on commit 99624d4

Please sign in to comment.