Skip to content

Commit

Permalink
Merge pull request #488 from che-incubator/fix-tests
Browse files Browse the repository at this point in the history
fix: Fix VS Code tests
  • Loading branch information
RomanNikitenko authored Jan 23, 2025
2 parents 9701148 + 5e1e965 commit c9ebb38
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .rebase/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

The file to keep a list of changed files which will potentionaly help to resolve rebase conflicts.

#### @RomanNikitenko
https://github.com/che-incubator/che-code/pull/488

- code/test/integration/browser/src/index.ts
- code/test/automation/src/playwrightBrowser.ts
---

#### @RomanNikitenko
https://github.com/che-incubator/che-code/pull/482

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"from": "headless: headless ?? false,",
"by": "headless: headless ?? false,\\\n\\\t\\\targs: ['--headless=new'],"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"from": "const browser = await playwright[browserType].launch({ headless: !Boolean(args.debug) });",
"by": "const browser = await playwright[browserType].launch({ headless: !Boolean(args.debug), args: ['--headless=new'], });"
}
]
1 change: 1 addition & 0 deletions code/test/automation/src/playwrightBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ async function launchBrowser(options: LaunchOptions, endpoint: string) {

const browser = await measureAndLog(() => playwright[options.browser ?? 'chromium'].launch({
headless: headless ?? false,
args: ['--headless=new'],
timeout: 0
}), 'playwright#launch', logger);

Expand Down
2 changes: 1 addition & 1 deletion code/test/integration/browser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const height = 800;
type BrowserType = 'chromium' | 'firefox' | 'webkit';

async function runTestsInBrowser(browserType: BrowserType, endpoint: url.UrlWithStringQuery, server: cp.ChildProcess): Promise<void> {
const browser = await playwright[browserType].launch({ headless: !Boolean(args.debug) });
const browser = await playwright[browserType].launch({ headless: !Boolean(args.debug), args: ['--headless=new'], });
const context = await browser.newContext();

const page = await context.newPage();
Expand Down
4 changes: 4 additions & 0 deletions rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ resolve_conflicts() {
apply_changes "$conflictingFile"
elif [[ "$conflictingFile" == "code/src/vs/workbench/browser/parts/titlebar/commandCenterControl.ts" ]]; then
apply_changes "$conflictingFile"
elif [[ "$conflictingFile" == "code/test/automation/src/playwrightBrowser.ts" ]]; then
apply_changes "$conflictingFile"
elif [[ "$conflictingFile" == "code/test/integration/browser/src/index.ts" ]]; then
apply_changes "$conflictingFile"
else
echo "$conflictingFile file cannot be automatically rebased. Aborting"
exit 1
Expand Down

0 comments on commit c9ebb38

Please sign in to comment.