Skip to content

Commit c9ebb38

Browse files
Merge pull request #488 from che-incubator/fix-tests
fix: Fix VS Code tests
2 parents 9701148 + 5e1e965 commit c9ebb38

File tree

6 files changed

+25
-1
lines changed

6 files changed

+25
-1
lines changed

.rebase/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

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

5+
#### @RomanNikitenko
6+
https://github.com/che-incubator/che-code/pull/488
7+
8+
- code/test/integration/browser/src/index.ts
9+
- code/test/automation/src/playwrightBrowser.ts
10+
---
11+
512
#### @RomanNikitenko
613
https://github.com/che-incubator/che-code/pull/482
714

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"from": "headless: headless ?? false,",
4+
"by": "headless: headless ?? false,\\\n\\\t\\\targs: ['--headless=new'],"
5+
}
6+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"from": "const browser = await playwright[browserType].launch({ headless: !Boolean(args.debug) });",
4+
"by": "const browser = await playwright[browserType].launch({ headless: !Boolean(args.debug), args: ['--headless=new'], });"
5+
}
6+
]

code/test/automation/src/playwrightBrowser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ async function launchBrowser(options: LaunchOptions, endpoint: string) {
9292

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

code/test/integration/browser/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const height = 800;
6363
type BrowserType = 'chromium' | 'firefox' | 'webkit';
6464

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

6969
const page = await context.newPage();

rebase.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ resolve_conflicts() {
447447
apply_changes "$conflictingFile"
448448
elif [[ "$conflictingFile" == "code/src/vs/workbench/browser/parts/titlebar/commandCenterControl.ts" ]]; then
449449
apply_changes "$conflictingFile"
450+
elif [[ "$conflictingFile" == "code/test/automation/src/playwrightBrowser.ts" ]]; then
451+
apply_changes "$conflictingFile"
452+
elif [[ "$conflictingFile" == "code/test/integration/browser/src/index.ts" ]]; then
453+
apply_changes "$conflictingFile"
450454
else
451455
echo "$conflictingFile file cannot be automatically rebased. Aborting"
452456
exit 1

0 commit comments

Comments
 (0)