@layers-app/editor 0.3.11 → 0.4.1-progress-bar.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +215 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -6
- package/dist/layers.-81wcqwR.js +41 -0
- package/dist/layers.0GG-c34P.js +36 -0
- package/dist/layers.0dm3eLYv.js +1265 -0
- package/dist/layers.0nFmx-Nl.js +1 -0
- package/dist/layers.1Z2fyz6H.js +7 -0
- package/dist/layers.2b70kvMG.js +9 -0
- package/dist/layers.3Vvyhk66.js +904 -0
- package/dist/layers.475BZq-C.js +4 -0
- package/dist/layers.52famHy6.js +1 -0
- package/dist/layers.6F0lZyGr.js +1 -0
- package/dist/layers.6iBZ8vbZ.js +7 -0
- package/dist/layers.7JqFgE4-.js +15 -0
- package/dist/layers.7Q7ZqlHQ.js +1 -0
- package/dist/layers.9QK1wiQj.js +1 -0
- package/dist/layers.9pNaFvaX.js +1 -0
- package/dist/layers.AhhllI1F.js +1088 -0
- package/dist/layers.B0UW1RmX.js +10 -0
- package/dist/layers.B19hGmey.js +1 -0
- package/dist/layers.B1jSvo4Q.js +282 -0
- package/dist/layers.B2QmFAKW.js +1 -0
- package/dist/layers.B3D4g2HH.js +1 -0
- package/dist/layers.B4KbvY3e.js +2235 -0
- package/dist/layers.B4b5hMwb.js +40 -0
- package/dist/layers.B4kpLyJz.js +39 -0
- package/dist/layers.B6ZNsH3T.js +21763 -0
- package/dist/layers.B6_dw_8p.js +7 -0
- package/dist/layers.B7X5RC-0.js +41 -0
- package/dist/layers.B9u9oq3T.js +5 -0
- package/dist/layers.BALYUkwP.js +139 -0
- package/dist/layers.BAtv1CM7.js +1 -0
- package/dist/layers.BBJp9IW9.js +39 -0
- package/dist/layers.BChOvfAr.js +33 -0
- package/dist/layers.BE8bNWW6.js +423 -0
- package/dist/layers.BEfOaBAZ.js +8 -0
- package/dist/layers.BHRWU6d9.js +32 -0
- package/dist/layers.BIeVwYKL.js +1 -0
- package/dist/layers.BJHPodZD.js +5 -0
- package/dist/layers.BJml6l4c.js +1619 -0
- package/dist/layers.BP5yLKDB.js +40 -0
- package/dist/layers.BSTBZrFn.js +1 -0
- package/dist/layers.BXFaNlXe.js +10 -0
- package/dist/layers.BY2fzSoa.js +320 -0
- package/dist/layers.BZ9Uzt2l.js +52 -0
- package/dist/layers.BbCfEXyj.js +55 -0
- package/dist/layers.BcAVvZP0.js +8 -0
- package/dist/layers.BddeOe_0.js +41 -0
- package/dist/layers.Bde9z6ba.js +9 -0
- package/dist/layers.Bdvy9kzf.js +37 -0
- package/dist/layers.Bf9MFDYo.js +37 -0
- package/dist/layers.BgOa2ZQq.js +7 -0
- package/dist/layers.BglhCs7Q.js +42 -0
- package/dist/layers.BhHN_OCL.js +41 -0
- package/dist/layers.BhOVSyoa.js +116 -0
- package/dist/layers.BiJ8hfRt.js +1510 -0
- package/dist/layers.Bk6BXLzz.js +425 -0
- package/dist/layers.Bm9nXP7b.js +4 -0
- package/dist/layers.BncZBAFy.js +4 -0
- package/dist/layers.BpilXLfW.js +6 -0
- package/dist/{layers.YZkXZvVS.js → layers.Bq-5GZP6.js} +20995 -19802
- package/dist/layers.BtlLD-Rz.js +11 -0
- package/dist/layers.BtpIOF4Z.js +9 -0
- package/dist/layers.Bu56Qesy.js +10 -0
- package/dist/layers.BxIw0gJL.js +11 -0
- package/dist/layers.ByYR4L98.js +8 -0
- package/dist/layers.C-pbN-0O.js +34 -0
- package/dist/layers.C0DJ9ilm.js +1 -0
- package/dist/layers.C0Lgw_Sx.js +11688 -0
- package/dist/layers.C2gAR4en.js +6 -0
- package/dist/layers.C4ceUEtT.js +6 -0
- package/dist/layers.C5RRQdrQ.js +39 -0
- package/dist/layers.C5U5RNdV.js +38 -0
- package/dist/layers.C5hVV8XE.js +10 -0
- package/dist/layers.C6jxjtyC.js +8 -0
- package/dist/layers.C7lIplJU.js +247 -0
- package/dist/layers.C83RWXIj.js +2966 -0
- package/dist/layers.C8_lu5UH.js +23 -0
- package/dist/layers.C9yHqpLC.js +1 -0
- package/dist/layers.CATiNc07.js +37 -0
- package/dist/layers.CCoKbqGZ.js +32 -0
- package/dist/layers.CCwQVeNG.js +96 -0
- package/dist/layers.CG1igXgx.js +65 -0
- package/dist/layers.CGE7HTrP.js +790 -0
- package/dist/layers.CGmH2sSj.js +160 -0
- package/dist/layers.CHZsXQcr.js +1 -0
- package/dist/layers.CJWyW1s7.js +33 -0
- package/dist/layers.CK2uPIaB.js +9 -0
- package/dist/layers.CKVT6drc.js +6 -0
- package/dist/layers.COAF7f8g.js +1 -0
- package/dist/layers.COS6XeQZ.js +8 -0
- package/dist/layers.CP5YFYP0.js +185 -0
- package/dist/layers.CQefO3zC.js +960 -0
- package/dist/layers.CRMWsjPz.js +6 -0
- package/dist/layers.CXXPElSu.js +40 -0
- package/dist/layers.CZ9XE70C.js +10 -0
- package/dist/layers.CZtDXioS.js +44 -0
- package/dist/layers.C_BxYlPZ.js +1580 -0
- package/dist/layers.C_UcfwnG.js +6 -0
- package/dist/layers.CaLgCU_I.js +32 -0
- package/dist/layers.CavVjyC7.js +32 -0
- package/dist/layers.Cd4UYQEy.js +5 -0
- package/dist/layers.CeERe4hA.js +803 -0
- package/dist/layers.CgTtEOpk.js +2479 -0
- package/dist/layers.CgYKHJl1.js +437 -0
- package/dist/layers.Cgmo79x3.js +11 -0
- package/dist/layers.CjMeAmJX.js +1034 -0
- package/dist/layers.Ck0n4XD7.js +1 -0
- package/dist/layers.CkJ9q_L1.js +1 -0
- package/dist/layers.Cl-Lwb04.js +8 -0
- package/dist/layers.CnZce7UZ.js +59 -0
- package/dist/layers.Co5PaFBV.js +257 -0
- package/dist/layers.CoC4j3uL.js +230 -0
- package/dist/layers.CopJUlxy.js +42 -0
- package/dist/layers.Cp-0WnDT.js +122 -0
- package/dist/layers.Cpwze_cl.js +40 -0
- package/dist/layers.CqVTtuYm.js +6 -0
- package/dist/layers.CrqG-Duk.js +5 -0
- package/dist/layers.Crw1IGs-.js +42 -0
- package/dist/layers.CsPue_MQ.js +51 -0
- package/dist/layers.Cs_T7j-N.js +1283 -0
- package/dist/layers.CtLZ9mwp.js +2 -0
- package/dist/layers.CukiNGgZ.js +186 -0
- package/dist/layers.CvbXz5-5.js +39 -0
- package/dist/layers.CxjTeNJ7.js +40 -0
- package/dist/layers.Cxopck3h.js +13 -0
- package/dist/layers.CyE3jBBZ.js +1126 -0
- package/dist/layers.Cy_IG1Gv.js +7 -0
- package/dist/layers.Cz1nKHwt.js +7 -0
- package/dist/layers.CzRcgWY1.js +21938 -0
- package/dist/layers.D0CU4TN8.js +8 -0
- package/dist/layers.D0_MMsE9.js +42 -0
- package/dist/layers.D0zn4_Mx.js +1 -0
- package/dist/layers.D2U67Gni.js +9 -0
- package/dist/layers.D34e2jIm.js +2 -0
- package/dist/layers.D3QNp_mQ.js +40 -0
- package/dist/layers.D4ZUbUXz.js +10 -0
- package/dist/layers.D4fGb2cV.js +1272 -0
- package/dist/layers.D7Lv0jOC.js +39 -0
- package/dist/layers.D7jGxypv.js +8 -0
- package/dist/layers.DA80zVTT.js +32 -0
- package/dist/layers.DAhZhj49.js +220 -0
- package/dist/layers.DC76pGI6.js +36 -0
- package/dist/layers.DCm28WHr.js +1 -0
- package/dist/layers.DEBlIxtT.js +1 -0
- package/dist/layers.DEHlDscq.js +8 -0
- package/dist/layers.DEiI3uTS.js +1 -0
- package/dist/layers.DFO1fD9L.js +6 -0
- package/dist/layers.DFVmKOXm.js +118 -0
- package/dist/layers.DGgRL8Nc.js +39 -0
- package/dist/layers.DHpypOQI.js +84 -0
- package/dist/layers.DJLV698B.js +793 -0
- package/dist/layers.DKZkGAQ_.js +202 -0
- package/dist/layers.DKeh-lZI.js +1 -0
- package/dist/layers.DLB4eAfo.js +1089 -0
- package/dist/layers.DLRyMrlf.js +10 -0
- package/dist/layers.DLwuMfdd.js +84 -0
- package/dist/layers.DMkBISW1.js +1 -0
- package/dist/layers.DN9HoVxI.js +18 -0
- package/dist/layers.DND9ZxpV.js +40 -0
- package/dist/layers.DOYs_uMx.js +802 -0
- package/dist/layers.DOrgOHBr.js +1 -0
- package/dist/layers.DRGpaHAX.js +41 -0
- package/dist/layers.D_AP_tA5.js +9 -0
- package/dist/layers.D_MmQzRm.js +207 -0
- package/dist/layers.D_sfrDwe.js +70 -0
- package/dist/layers.DaUhvLRp.js +10 -0
- package/dist/layers.DaoO_UDV.js +9 -0
- package/dist/layers.DbaKVP5e.js +1 -0
- package/dist/layers.Dbdn8XSd.js +1 -0
- package/dist/layers.DfR442P5.js +40 -0
- package/dist/layers.DfoJ9Kxs.js +1 -0
- package/dist/layers.DgpXAlfL.js +373 -0
- package/dist/layers.Dh54vG6t.js +268 -0
- package/dist/layers.DhcjxJPA.js +501 -0
- package/dist/layers.DhzzXhmQ.js +1359 -0
- package/dist/layers.Dixyg94K.js +36 -0
- package/dist/layers.Dj3HYSyh.js +7 -0
- package/dist/layers.DjUOC4st.js +16 -0
- package/dist/layers.DkLyYgOg.js +38 -0
- package/dist/layers.DkT2sxcJ.js +931 -0
- package/dist/layers.DkleVc4L.js +5 -0
- package/dist/layers.DoAq7C3B.js +139 -0
- package/dist/layers.Dr3N180D.js +35 -0
- package/dist/layers.Drb2mcdd.js +2 -0
- package/dist/layers.DtDMtcjv.js +84 -0
- package/dist/layers.DtOlJEpj.js +39 -0
- package/dist/layers.Dut27cU5.js +42 -0
- package/dist/layers.Dx5j_aMV.js +7 -0
- package/dist/layers.DxA6ocdw.js +70 -0
- package/dist/layers.Dy-AuShh.js +9 -0
- package/dist/layers.Dy1naDTQ.js +14 -0
- package/dist/layers.DyJZaSCk.js +40 -0
- package/dist/layers.DyU8JNlG.js +41 -0
- package/dist/layers.DytwjiIF.js +8 -0
- package/dist/layers.DyyemvLl.js +36 -0
- package/dist/layers.DzphOPQJ.js +19 -0
- package/dist/layers.J1ihPiBi.js +7 -0
- package/dist/layers.JWCLFILJ.js +1 -0
- package/dist/layers.JcQwzHu2.js +9 -0
- package/dist/layers.JnLVZ-1W.js +61 -0
- package/dist/layers.MfBuwYip.js +39 -0
- package/dist/layers.OMZyjZaa.js +1 -0
- package/dist/layers.OZhDjtkp.js +1 -0
- package/dist/layers.SNwJ50Yh.js +769 -0
- package/dist/layers.X930Wyd9.js +9 -0
- package/dist/layers.YBnRzjtX.js +1 -0
- package/dist/{layers.BnjxHNDK.js → layers.YE5h1RJ0.js} +84 -84
- package/dist/layers.YhDm2Yt0.js +37 -0
- package/dist/layers.ZE7W-HjF.js +10 -0
- package/dist/layers._ZR3qWqZ.js +41 -0
- package/dist/layers.b0h5ZBmD.js +61 -0
- package/dist/layers.b4ac2O9O.js +35 -0
- package/dist/layers.bzxdqd7a.js +11 -0
- package/dist/{layers.C125HTat.js → layers.fjeoVipI.js} +1 -1
- package/dist/layers.hEiS_6X7.js +1 -0
- package/dist/layers.hweLqW3I.js +261 -0
- package/dist/layers.iK5LSRjJ.js +11 -0
- package/dist/layers.ipZc_UQ4.js +8 -0
- package/dist/layers.itQhFK_P.js +48146 -0
- package/dist/layers.ix2kR4vq.js +9165 -0
- package/dist/layers.jLGyr7oL.js +3 -0
- package/dist/layers.k60iEoD4.js +41 -0
- package/dist/layers.l06k9Lu3.js +1 -0
- package/dist/layers.lCMwJpWR.js +4 -0
- package/dist/layers.lCpg7dOn.js +21 -0
- package/dist/layers.lPp5HcdT.js +40 -0
- package/dist/layers.lUeeFrHR.js +10 -0
- package/dist/layers.os9El-5G.js +39 -0
- package/dist/layers.pSPpASHH.js +35 -0
- package/dist/layers.s006AAsW.js +1 -0
- package/dist/layers.sFiVxDwP.js +1 -0
- package/dist/layers.sWO0agP4.js +295 -0
- package/dist/layers.tSiLqPQw.js +1 -0
- package/dist/layers.uZTzmOsK.js +38 -0
- package/dist/layers.uzGJX2RJ.js +14 -0
- package/dist/layers.vZPmwsoq.js +32 -0
- package/dist/layers.wBjmBWfX.js +1 -0
- package/package.json +33 -17
- package/dist/layers.Cjs5EBWM.js +0 -343
- package/dist/layers.DPccTctI.js +0 -285
- package/dist/layers.DZ8DrrVn.js +0 -53491
- package/dist/layers.QVaGPbs3.js +0 -161
- package/dist/layers.VK3NB7Nd.js +0 -1
package/README.md
CHANGED
|
@@ -414,7 +414,7 @@ For uploading a file or audio, you might need the third parameter "data".
|
|
|
414
414
|
<summary>
|
|
415
415
|
📝 Additional options
|
|
416
416
|
</summary>
|
|
417
|
-
|
|
417
|
+
|
|
418
418
|
## Reset editor content
|
|
419
419
|
|
|
420
420
|
```
|
|
@@ -441,6 +441,220 @@ import { CLEAR_EDITOR_COMMAND } from './EditorLexical';
|
|
|
441
441
|
```
|
|
442
442
|
|
|
443
443
|
</details>
|
|
444
|
+
|
|
445
|
+
<details>
|
|
446
|
+
<summary>
|
|
447
|
+
🧪 Testing
|
|
448
|
+
</summary>
|
|
449
|
+
|
|
450
|
+
## Testing Overview
|
|
451
|
+
|
|
452
|
+
This project includes comprehensive testing with both **unit tests** (Vitest) and **end-to-end tests** (Playwright). The testing setup ensures reliability across different browsers and environments.
|
|
453
|
+
|
|
454
|
+
### Prerequisites
|
|
455
|
+
|
|
456
|
+
Before running tests, make sure you have installed all dependencies:
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
npm install
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
## Unit Tests (Vitest)
|
|
463
|
+
|
|
464
|
+
Unit tests are written with **Vitest** and **jsdom** for testing individual components and utilities.
|
|
465
|
+
|
|
466
|
+
### Run Unit Tests
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
# Run all unit tests
|
|
470
|
+
npm run test-unit
|
|
471
|
+
|
|
472
|
+
# Run unit tests in watch mode (auto-rerun on changes)
|
|
473
|
+
npm run test-unit-watch
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Unit Test Files Location
|
|
477
|
+
- `__tests__/unit/` - Unit test files
|
|
478
|
+
- Test files follow the pattern: `*.test.ts` or `*.test.tsx`
|
|
479
|
+
|
|
480
|
+
## End-to-End Tests (Playwright)
|
|
481
|
+
|
|
482
|
+
E2E tests use **Playwright** to test the complete application flow in real browsers.
|
|
483
|
+
|
|
484
|
+
### Run E2E Tests
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
# Run all E2E tests (WebKit only for CI optimization)
|
|
488
|
+
npm run test:e2e
|
|
489
|
+
|
|
490
|
+
# Run E2E tests with UI mode (interactive)
|
|
491
|
+
npm run test:e2e:ui
|
|
492
|
+
|
|
493
|
+
# Run E2E tests in debug mode
|
|
494
|
+
npm run test:e2e:debug
|
|
495
|
+
|
|
496
|
+
# Run E2E tests in headed mode (visible browser)
|
|
497
|
+
npm run test:e2e:headed
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### E2E Test Files Location
|
|
501
|
+
- `__tests__/e2e/` - End-to-end test files
|
|
502
|
+
- `__tests__/regression/` - Regression test files
|
|
503
|
+
- Test files follow the pattern: `*.spec.js`, `*.spec.mjs`, or `*.spec.ts`
|
|
504
|
+
|
|
505
|
+
### Browser Support
|
|
506
|
+
- **WebKit** (Safari) - Primary browser for CI/CD
|
|
507
|
+
- **Chromium** and **Firefox** - Available for local testing
|
|
508
|
+
|
|
509
|
+
## Test Server
|
|
510
|
+
|
|
511
|
+
The test server automatically starts when running E2E tests:
|
|
512
|
+
|
|
513
|
+
```bash
|
|
514
|
+
# Manual test server start (if needed)
|
|
515
|
+
npm run start-test-server
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
- **URL**: `http://localhost:3000`
|
|
519
|
+
- **Mode**: Full editor mode with all features enabled
|
|
520
|
+
- **Environment**: `VITE_LAYERS=true`
|
|
521
|
+
|
|
522
|
+
## Test Configuration
|
|
523
|
+
|
|
524
|
+
### Playwright Configuration
|
|
525
|
+
- **Config file**: `playwright.config.js`
|
|
526
|
+
- **Test directory**: `./__tests__/e2e/`
|
|
527
|
+
- **Browser**: WebKit (optimized for CI)
|
|
528
|
+
- **Base URL**: `http://localhost:3000`
|
|
529
|
+
- **Timeout**: 90 seconds per test
|
|
530
|
+
- **Retries**: 2 retries in CI, 0 locally
|
|
531
|
+
|
|
532
|
+
### Vitest Configuration
|
|
533
|
+
- **Config file**: `vitest.config.mts`
|
|
534
|
+
- **Environment**: jsdom
|
|
535
|
+
- **Setup file**: `vitest.setup.mts`
|
|
536
|
+
- **Coverage**: V8 provider
|
|
537
|
+
|
|
538
|
+
## CI/CD Testing
|
|
539
|
+
|
|
540
|
+
Tests run automatically on:
|
|
541
|
+
- **Push** to `main` or `dev` branches
|
|
542
|
+
- **Pull requests** to `main` or `dev` branches
|
|
543
|
+
- **Manual trigger** via GitHub Actions
|
|
544
|
+
|
|
545
|
+
### GitHub Actions Workflow
|
|
546
|
+
- **File**: `.github/workflows/tests.yml`
|
|
547
|
+
- **Runner**: Ubuntu Latest
|
|
548
|
+
- **Node.js**: Version 20
|
|
549
|
+
- **Browser caching**: Playwright browsers cached for faster runs
|
|
550
|
+
- **Artifacts**: Test reports and traces uploaded on completion
|
|
551
|
+
|
|
552
|
+
## Test Examples
|
|
553
|
+
|
|
554
|
+
### Basic E2E Test Structure
|
|
555
|
+
|
|
556
|
+
```javascript
|
|
557
|
+
// __tests__/e2e/example.spec.mjs
|
|
558
|
+
import { test, expect } from '@playwright/test';
|
|
559
|
+
import { focusEditor } from '../utils/index.mjs';
|
|
560
|
+
|
|
561
|
+
test('Can type text in editor', async ({ page }) => {
|
|
562
|
+
await page.goto('/');
|
|
563
|
+
await focusEditor(page);
|
|
564
|
+
|
|
565
|
+
const editor = page.locator('[contenteditable="true"]').first();
|
|
566
|
+
await editor.type('Hello World');
|
|
567
|
+
|
|
568
|
+
await expect(editor).toContainText('Hello World');
|
|
569
|
+
});
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
### Unit Test Structure
|
|
573
|
+
|
|
574
|
+
```typescript
|
|
575
|
+
// __tests__/unit/example.test.ts
|
|
576
|
+
import { describe, it, expect } from 'vitest';
|
|
577
|
+
import { render } from '@testing-library/react';
|
|
578
|
+
import { Editor } from '../src/Editor';
|
|
579
|
+
|
|
580
|
+
describe('Editor Component', () => {
|
|
581
|
+
it('renders without crashing', () => {
|
|
582
|
+
const { container } = render(<Editor />);
|
|
583
|
+
expect(container).toBeTruthy();
|
|
584
|
+
});
|
|
585
|
+
});
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
## Debugging Tests
|
|
589
|
+
|
|
590
|
+
### Debug E2E Tests
|
|
591
|
+
|
|
592
|
+
```bash
|
|
593
|
+
# Run with Playwright Inspector
|
|
594
|
+
npm run test:e2e:debug
|
|
595
|
+
|
|
596
|
+
# Run specific test file
|
|
597
|
+
npx playwright test __tests__/e2e/TextEntry.spec.mjs --debug
|
|
598
|
+
|
|
599
|
+
# Run with headed browser
|
|
600
|
+
npm run test:e2e:headed
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
### View Test Reports
|
|
604
|
+
|
|
605
|
+
```bash
|
|
606
|
+
# Open HTML report (after running tests)
|
|
607
|
+
npx playwright show-report
|
|
608
|
+
|
|
609
|
+
# View test traces (for failed tests)
|
|
610
|
+
npx playwright show-trace test-results/[test-name]/trace.zip
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
## Test Utilities
|
|
614
|
+
|
|
615
|
+
Common test utilities are available in `__tests__/utils/index.mjs`:
|
|
616
|
+
|
|
617
|
+
- `focusEditor(page)` - Focus the main editor
|
|
618
|
+
- `selectAll(page)` - Select all text in editor
|
|
619
|
+
- `moveLeft(page, count)` - Move cursor left
|
|
620
|
+
- `selectCharacters(page, count)` - Select specific number of characters
|
|
621
|
+
- `waitForSelector(page, selector)` - Wait for element to appear
|
|
622
|
+
|
|
623
|
+
## Performance
|
|
624
|
+
|
|
625
|
+
### Test Execution Times
|
|
626
|
+
- **Unit Tests**: ~10-30 seconds
|
|
627
|
+
- **E2E Tests (first run)**: ~3-4 minutes (includes browser installation)
|
|
628
|
+
- **E2E Tests (cached)**: ~1-2 minutes (uses cached browsers)
|
|
629
|
+
|
|
630
|
+
### Optimization Features
|
|
631
|
+
- **Browser Caching**: Playwright browsers cached in CI
|
|
632
|
+
- **Single Worker**: Prevents race conditions in CI
|
|
633
|
+
- **WebKit Only**: Faster than multi-browser matrix
|
|
634
|
+
- **Smart Retries**: Auto-retry flaky tests
|
|
635
|
+
|
|
636
|
+
## Troubleshooting
|
|
637
|
+
|
|
638
|
+
### Common Issues
|
|
639
|
+
|
|
640
|
+
1. **Port conflicts**: Ensure port 3000 is available
|
|
641
|
+
2. **Browser installation**: Run `npx playwright install` if needed
|
|
642
|
+
3. **Test timeouts**: Check if test server is running properly
|
|
643
|
+
4. **Certificate errors**: Tests use HTTP to avoid HTTPS certificate issues
|
|
644
|
+
|
|
645
|
+
### Reset Test Environment
|
|
646
|
+
|
|
647
|
+
```bash
|
|
648
|
+
# Clear Playwright cache
|
|
649
|
+
npx playwright install --force
|
|
650
|
+
|
|
651
|
+
# Reset node_modules
|
|
652
|
+
rm -rf node_modules package-lock.json
|
|
653
|
+
npm install
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
</details>
|
|
657
|
+
|
|
444
658
|
<details>
|
|
445
659
|
<summary>
|
|
446
660
|
⚙️ Properties
|