Skip to content

Commit

Permalink
Set option state
Browse files Browse the repository at this point in the history
  • Loading branch information
jeawhanlee committed May 14, 2024
1 parent 900ee57 commit de65ceb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/page-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ export class PageUtils {
public disableAllOptions = async (): Promise<void> => {
await this.gotoWpr();

this.sections.optionState = false;

if(await this.sections.doesSectionExist('cache')) {
// Disable all settings for cache section.
await this.sections.set("cache").visit();
Expand Down Expand Up @@ -418,10 +420,12 @@ export class PageUtils {

await this.page.waitForLoadState('load', { timeout: 30000 });

this.sections.optionState = true;

if (await this.sections.doesSectionExist('cache')) {
// Enable all settings for cache section.
await this.sections.set("cache").visit();
await this.sections.state(true).massToggle();
await this.sections.massToggle();
await this.saveSettings();

await this.page.waitForLoadState('load', { timeout: 30000 });
Expand Down

0 comments on commit de65ceb

Please sign in to comment.