Refactor Playwright tests and update configurations
Some checks failed
Chore App Build, Test, and Push Docker Images / build-and-push (push) Has been cancelled
Some checks failed
Chore App Build, Test, and Push Docker Images / build-and-push (push) Has been cancelled
- Consolidated kindness and penalty tests into single files to ensure serial execution and prevent conflicts. - Updated Playwright configuration to define separate test buckets for child options and create child tests, ensuring proper execution order. - Added new tests for child kebab menu options including editing, deleting points, and confirming child deletion. - Removed obsolete tests for kindness and penalty default management. - Updated authentication tokens in user.json for improved security. - Enhanced test reliability by implementing retry logic for UI interactions in the create-child happy path test.
This commit is contained in:
@@ -40,10 +40,46 @@ export default defineConfig({
|
||||
{ name: 'setup-no-pin', testMatch: /auth-no-pin\.setup\.ts/ },
|
||||
|
||||
{
|
||||
name: 'chromium',
|
||||
// Bucket A: child-options tests — run before create-child so that
|
||||
// deleteAllChildren() in happy-path.spec.ts cannot delete children
|
||||
// that these tests are actively using.
|
||||
name: 'chromium-child-options',
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
|
||||
dependencies: ['setup'],
|
||||
testIgnore: [/\/mode_child\//],
|
||||
testMatch: [/mode_parent\/child-options\/.+\.spec\.ts/],
|
||||
},
|
||||
|
||||
{
|
||||
// Bucket B: create-child tests — depends on chromium-child-options so it
|
||||
// starts only after all child-options tests have finished and cleaned up.
|
||||
// This guarantees deleteAllChildren() runs in a quiet window.
|
||||
name: 'chromium-create-child',
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
|
||||
dependencies: ['setup', 'chromium-child-options'],
|
||||
testMatch: [/mode_parent\/create-child\/.+\.spec\.ts/],
|
||||
},
|
||||
|
||||
{
|
||||
// Bucket: tests that mutate shared system-default items (chores/kindness/penalties).
|
||||
// fullyParallel:false prevents files from being split across workers;
|
||||
// the merged kindness-default and penalty-default files use mode:'serial'
|
||||
// internally to guarantee the convert and delete tests never run in parallel.
|
||||
name: 'chromium-default-tasks',
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
|
||||
dependencies: ['setup'],
|
||||
testMatch: [/mode_parent\/tasks\/.*default\.spec\.ts/],
|
||||
fullyParallel: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: 'chromium-tasks-rewards',
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
|
||||
dependencies: ['setup'],
|
||||
testIgnore: [
|
||||
/\/mode_child\//,
|
||||
/mode_parent\/(create-child|child-options)\//,
|
||||
/mode_parent\/tasks\/.*default\.spec\.ts/,
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user