Skip to content

Commit c407b56

Browse files
committed
remove unneeded log, fix CR
1 parent 2c2a910 commit c407b56

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/support/steps/general.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {WP_BASE_URL} from '../../../config/wp.config';
1818
import scenarioUrls from "./../../../config/scenarioUrls.json";
1919
import { compareReference, isTagPresent, getScenarioTag, batchUpdateVRTestUrl, openMobileMenu} from "../../../utils/helpers";
2020
import type { Section } from "../../../utils/types";
21-
import { Page } from '@playwright/test';
21+
import { Page, ConsoleMessage } from '@playwright/test';
2222
import {
2323
deactivatePlugin, installRemotePlugin
2424
} from "../../../utils/commands";
@@ -479,7 +479,7 @@ Then('no error in the console different than nowprocket page {string}', async fu
479479
const getConsoleMsg = async (page: Page, url: string): Promise<Array<string>> => {
480480
const consoleMsg: string[] = [];
481481

482-
const consoleHandler = (msg): void => {
482+
const consoleHandler = (msg: ConsoleMessage): void => {
483483
consoleMsg.push(msg.text());
484484
};
485485

@@ -548,7 +548,7 @@ const getConsoleMsg = async (page: Page, url: string): Promise<Array<string>> =>
548548
const getConsoleMsgWithMenuExpansion = async (page: Page, url: string): Promise<Array<string>> => {
549549
const consoleMsg: string[] = [];
550550

551-
const consoleHandler = (msg): void => {
551+
const consoleHandler = (msg: ConsoleMessage): void => {
552552
consoleMsg.push(msg.text());
553553
};
554554

utils/commands.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,13 +493,10 @@ export async function switchTheme(theme: string): Promise<void> {
493493
// Check if theme is already active
494494
let isActive = await isThemeActivated(theme);
495495
if (isActive) {
496-
console.log(`[DEBUG] Theme ${theme} is already active, skipping activation`);
497496
return; // Theme is already active, no need to activate
498497
}
499498

500-
// Sanitize theme name to prevent shell injection and quote issues
501-
// const sanitizedTheme = theme.replace(/[^\w-]/g, '');
502-
// await wp(`theme activate "${sanitizedTheme}"`);
499+
// Activate the theme
503500
await wp(`theme activate ${theme}`)
504501

505502
// Verify theme is actually activated

0 commit comments

Comments
 (0)