test: fix test and update default retry in local to 0 (#8316)

This commit is contained in:
Bijin A B
2026-06-20 02:17:14 +05:30
committed by GitHub
parent 4fffef51ba
commit a93e1dc8bf
5 changed files with 15 additions and 11 deletions

View File

@@ -49,7 +49,7 @@ jobs:
e2e-test:
name: Playwright E2E Tests (Linux)
timeout-minutes: 180
timeout-minutes: 240
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
@@ -70,7 +70,7 @@ jobs:
sudo chown root node_modules/electron/dist/chrome-sandbox
sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
- name: Run playwright Tests
- name: Run E2E Tests
uses: ./.github/actions/tests/run-e2e-tests
with:
os: ubuntu

View File

@@ -49,7 +49,7 @@ jobs:
e2e-test:
name: Playwright E2E Tests (macOS)
timeout-minutes: 180
timeout-minutes: 240
runs-on: macos-latest
steps:
- uses: actions/checkout@v6

View File

@@ -58,7 +58,7 @@ jobs:
e2e-test:
name: Playwright E2E Tests (Windows)
timeout-minutes: 180
timeout-minutes: 240
runs-on: windows-latest
steps:
- uses: actions/checkout@v6

View File

@@ -9,7 +9,7 @@ if (process.env.CI) {
export default defineConfig({
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 1,
retries: process.env.CI ? 2 : 0,
workers: undefined,
reporter,

View File

@@ -15,13 +15,17 @@ test.describe('Default JavaScript Sandbox Mode', () => {
// Click on sandbox mode selector to open security settings
await sandboxLocators.sandboxModeSelector().click();
// Change to developer mode
const developerRadio = sandboxLocators.developerModeRadio();
await developerRadio.check();
// Safe mode should be selected by default
await expect(sandboxLocators.safeModeRadio()).toHaveAttribute('aria-checked', 'true');
// For developer mode, check if safe mode is currently selected
const safeModeChecked = await sandboxLocators.safeModeRadio().isChecked().catch(() => false);
await expect(safeModeChecked).toBe(false);
// Change to developer mode. The option is a menuitemradio whose checked
// state flips only after the async save dispatch resolves
const developerRadio = sandboxLocators.developerModeRadio();
await developerRadio.click();
await expect(developerRadio).toHaveAttribute('aria-checked', 'true');
// Safe mode should no longer be selected
await expect(sandboxLocators.safeModeRadio()).toHaveAttribute('aria-checked', 'false');
await page.keyboard.press('Escape');
});