Skip to content

Commit

Permalink
Modify function for plugin activation and change page url
Browse files Browse the repository at this point in the history
  • Loading branch information
Khadreal committed Apr 3, 2024
1 parent e854f3d commit 88276f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/features/wpml-compatibility.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Feature: C14655 - Should LL Background work on main/sub language
And wpml directory is enabled

Scenario: Open the page with directory lanaguage
Then no error in the console different than nowprocket page 'llcss'
Then no error in the console different than nowprocket page 'lazyload_css_background_images'
When switch to another language
Then I must not see any error in debug.log

Scenario: Change WPML to query string option
Given wpml query string is enabled
Then no error in the console different than nowprocket page 'llcss'
Then no error in the console different than nowprocket page 'lazyload_css_background_images'
When switch to another language
Then I must not see any error in debug.log
4 changes: 3 additions & 1 deletion utils/page-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ export class PageUtils {
}

const action = activate ? '#activate-' : '#deactivate-';
await this.page.locator(action + pluginSlug).click();
if (await this.page.locator(action + pluginSlug).isVisible()) {
await this.page.locator(action + pluginSlug).click();
}

if (!activate) {
if (await this.page.locator('a:has-text("Force deactivation")').isVisible()) {
Expand Down

0 comments on commit 88276f3

Please sign in to comment.