Refactor: Change how test runner handles pageWithUserData tests (#5922)

* refactor: change how test runner opens pageWithUserData instances

* fix: test move tabs

* fix: custom ca cert tests

* fix: update file patterns and improve error messages

* fix: improve electron app launch logic

* fix: update temporary directory handling for Electron app

* fix: ensure newline at end of file in index.ts

This change adds a newline at the end of the file to comply with coding standards.

* fix: improve error handling in recursiveCopy function

- Simplified error message when source path does not exist.
- Enhanced error handling to provide clearer guidance on usage of `page` fixture.

* fix(e2e): close collections after each tests

* fix: reuse the worker instance per file instead of per user data dir

* fix: revert ssl tests as serial run is fixed

* fix: change afterEach to afterAll for cleanup

fix: change afterEach to afterAll for cleanup

---------

Co-authored-by: Bijin Bruno <bijin@usebruno.com>
This commit is contained in:
Sid
2025-10-29 14:32:45 +05:30
committed by GitHub
parent 384aabf2af
commit 6e8cd55b76
17 changed files with 74 additions and 43 deletions

View File

@@ -2,7 +2,7 @@ import { test, expect } from '../../../playwright';
import { closeAllCollections } from '../../utils/page';
test.describe('Code Generation URL Encoding', () => {
test.afterEach(async ({ pageWithUserData: page }) => {
test.afterEach(async ({ page }) => {
try {
const modalCloseButton = page.locator('[data-test-id="modal-close-button"]');
if (await modalCloseButton.isVisible()) {
@@ -15,7 +15,7 @@ test.describe('Code Generation URL Encoding', () => {
});
test('Should generate code with proper URL encoding for unencoded input', async ({
pageWithUserData: page,
page,
createTmpDir
}) => {
await page.locator('.dropdown-icon').click();
@@ -57,7 +57,7 @@ test.describe('Code Generation URL Encoding', () => {
});
test('Should generate code with proper URL encoding for encoded input', async ({
pageWithUserData: page,
page,
createTmpDir
}) => {
await page.locator('.dropdown-icon').click();