Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix VS Code tests #488

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading