Skip to content

Commit

Permalink
updates after running with Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ZheSun88 committed Jan 22, 2025
1 parent c7af8a0 commit 8bb30e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions scripts/pit/its/cc-install-apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ async function takeScreenshot(page, name) {
});
const context = await browser.newContext({ ignoreHTTPSErrors: ignoreHTTPSErrors });

if(process.env.CC_CERT){
fs.writeFileSync('domain.pem', `${process.env.CC_CERT.replace(/\\n/g, "\n")}\n${process.env.CC_KEY.replace(/\\n/g, "\n")}`);
}

const page = await context.newPage();
page.on('console', msg => console.log("> CONSOLE:", (msg.text() + ' - ' + msg.location().url).replace(/\s+/g, ' ')));
Expand Down
1 change: 1 addition & 0 deletions scripts/pit/lib/lib-k8s-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ stopCloudProvider() {
##
# $1: command
setSuid() {
isWindows && return 0
W=`which $1` || return 1
R=`realpath $W` || return 1
O=`ls -l "$R" | awk '{print $3}'`
Expand Down
2 changes: 1 addition & 1 deletion scripts/pit/lib/lib-playwright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PIT_SCR_FOLDER=`computeAbsolutePath`
isInstalledPlaywright() {
_dir=`dirname "$1"`
(cd "$_dir" && \
echo -e "const { chromium } = require('playwright');\n" | "$NODE" - 2>/dev/null)
echo -e "const { chromium } = require('@playwright/test');\n" | "$NODE" - 2>/dev/null)
}

## Install playwright in the folder of the test node-script
Expand Down

0 comments on commit 8bb30e8

Please sign in to comment.