Skip to content

Commit

Permalink
Updated doc blocks and remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeawhanlee committed Apr 4, 2024
1 parent 4b7ef04 commit 9f937a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/support/steps/lcp-beacon-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ let data: LcpDataTable[],

const [actual, expected]: [LcpData, LcpData] = [{}, {}];

Given('I clear critical images', async function (this: ICustomWorld) {
await this.utils.wprDropdown();
await this.page.locator('#wp-admin-bar-clean-saas a').click();
});

/**
* Executes step to visit page based on the form factor(desktop/mobile) and get the LCP/ATF data from DB.
*/
Given('I visit the following urls in {string}', async function (this: ICustomWorld, formFactor: string, dataTable) {
let sql: string,
result: string,
Expand Down Expand Up @@ -62,8 +60,6 @@ Given('I visit the following urls in {string}', async function (this: ICustomWor
viewport: resultFromStdout[0].viewport
}
}

console.log(actual);
});

/**
Expand Down Expand Up @@ -92,8 +88,6 @@ Then('lcp and atf should be as expected in {string}', async function (this: ICus
}
}

console.log(expected);

// Make assertions.
for (const key in actual) {
if (Object.hasOwnProperty.call(actual, key)) {
Expand Down
6 changes: 6 additions & 0 deletions utils/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ export async function generateUsers(users: Array<{name: string, email: string, r
})
}

/**
* Wraps a command with the appropriate prefix for SSH.
*
* @param {string} command - The command to be wrapped.
* @returns {string} - The wrapped command.
*/
function wrapSSHPrefix(command: string): string {
const cwd = getWPDir(configurations);

Expand Down

0 comments on commit 9f937a1

Please sign in to comment.