mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
test(sync): re-enable sync after import in tests and adjust baseURL fallback
This commit is contained in:
parent
7f24d13bd6
commit
c757ff500d
3 changed files with 45 additions and 3 deletions
|
|
@ -4,8 +4,39 @@
|
|||
"crossModelVersion": 4.5,
|
||||
"data": {
|
||||
"project": {
|
||||
"ids": [],
|
||||
"entities": {}
|
||||
"ids": ["INBOX_PROJECT"],
|
||||
"entities": {
|
||||
"INBOX_PROJECT": {
|
||||
"id": "INBOX_PROJECT",
|
||||
"title": "Inbox",
|
||||
"isHiddenFromMenu": false,
|
||||
"taskIds": ["active-task-1", "active-task-2"],
|
||||
"backlogTaskIds": [],
|
||||
"noteIds": [],
|
||||
"theme": {
|
||||
"primary": "#607d8b",
|
||||
"accent": "#ff4081",
|
||||
"warn": "#e91e63",
|
||||
"isAutoContrast": true
|
||||
},
|
||||
"icon": "inbox",
|
||||
"workStart": {},
|
||||
"workEnd": {},
|
||||
"breakNr": {},
|
||||
"breakTime": {},
|
||||
"isArchived": false,
|
||||
"advancedCfg": {
|
||||
"worklogExportSettings": {
|
||||
"cols": ["DATE", "START", "END", "TIME_CLOCK", "TITLES_INCLUDING_SUB"],
|
||||
"roundWorkTimeTo": null,
|
||||
"roundStartTimeTo": null,
|
||||
"roundEndTimeTo": null,
|
||||
"groupBy": "DATE",
|
||||
"separateTasksBy": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"menuTree": {
|
||||
"tagTree": [],
|
||||
|
|
|
|||
|
|
@ -95,6 +95,10 @@ base.describe('@importsync @supersync Import + Sync E2E', () => {
|
|||
await waitForTask(clientA.page, 'E2E Import Test - Simple Active Task');
|
||||
console.log('[Import Test] Client A has imported tasks visible');
|
||||
|
||||
// Re-enable sync after import (import overwrites globalConfig including sync settings)
|
||||
console.log('[Import Test] Re-enabling sync after import');
|
||||
await clientA.sync.setupSuperSync(syncConfig);
|
||||
|
||||
// ============ PHASE 2: Client A Syncs to Server ============
|
||||
console.log('[Import Test] Phase 2: Client A syncing to server');
|
||||
await clientA.sync.syncAndWait();
|
||||
|
|
@ -269,6 +273,10 @@ base.describe('@importsync @supersync Import + Sync E2E', () => {
|
|||
await importPage.importBackupFile(backupPath);
|
||||
console.log('[Merge Test] Client A imported backup');
|
||||
|
||||
// Re-enable sync after import (import overwrites globalConfig including sync settings)
|
||||
console.log('[Merge Test] Re-enabling sync after import');
|
||||
await clientA.sync.setupSuperSync(syncConfig);
|
||||
|
||||
// ============ PHASE 3: Sync After Import ============
|
||||
console.log('[Merge Test] Phase 3: Syncing after import');
|
||||
|
||||
|
|
|
|||
|
|
@ -166,10 +166,13 @@ export const createSimulatedClient = async (
|
|||
clientName: string,
|
||||
testPrefix: string,
|
||||
): Promise<SimulatedE2EClient> => {
|
||||
// Use provided baseURL or fall back to localhost:4242 (Playwright fixture may be undefined)
|
||||
const effectiveBaseURL = baseURL || 'http://localhost:4242';
|
||||
|
||||
const context = await browser.newContext({
|
||||
storageState: undefined, // Clean slate - no shared state
|
||||
userAgent: `PLAYWRIGHT SYNC-CLIENT-${clientName}`,
|
||||
baseURL,
|
||||
baseURL: effectiveBaseURL,
|
||||
viewport: { width: 1920, height: 1080 },
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue