diff --git a/e2e/tests/plugins/plugin-lifecycle.spec.ts b/e2e/tests/plugins/plugin-lifecycle.spec.ts index e13649bea..bd20289f8 100644 --- a/e2e/tests/plugins/plugin-lifecycle.spec.ts +++ b/e2e/tests/plugins/plugin-lifecycle.spec.ts @@ -154,7 +154,13 @@ test.describe('Plugin Lifecycle', () => { // Verify we navigated to the plugin page await expect(page).toHaveURL(/\/plugins\/api-test-plugin\/index/, { timeout: 10000 }); - await expect(page.locator('iframe')).toBeVisible({ timeout: 10000 }); + + // Wait for Angular component initialization after navigation + await expect(async () => { + const iframe = page.locator('iframe'); + await expect(iframe).toBeAttached({ timeout: 2000 }); + await expect(iframe).toBeVisible({ timeout: 2000 }); + }).toPass({ timeout: 10000, intervals: [500, 1000] }); // Go back to work view await page.goto('/#/tag/TODAY'); diff --git a/e2e/tests/sync/supersync-edge-cases.spec.ts b/e2e/tests/sync/supersync-edge-cases.spec.ts index f5900eb89..266672751 100644 --- a/e2e/tests/sync/supersync-edge-cases.spec.ts +++ b/e2e/tests/sync/supersync-edge-cases.spec.ts @@ -636,7 +636,9 @@ test.describe('@supersync SuperSync Edge Cases', () => { // 4. Client A clicks Undo (snackbar should be visible) // The snackbar appears for 5 seconds with an "Undo" action // Use snack-custom .action selector (app uses custom snackbar component) - const undoButton = clientA.page.locator('snack-custom button.action'); + const undoButton = clientA.page.locator( + 'snack-custom button.action, .mat-mdc-snack-bar-container button', + ); await undoButton.waitFor({ state: 'visible', timeout: 5000 }); await undoButton.click(); diff --git a/src/app/imex/sync/sync-wrapper.service.ts b/src/app/imex/sync/sync-wrapper.service.ts index 4783629c1..ae23b5366 100644 --- a/src/app/imex/sync/sync-wrapper.service.ts +++ b/src/app/imex/sync/sync-wrapper.service.ts @@ -530,6 +530,17 @@ export class SyncWrapperService { } private _handleDecryptionError(): void { + // Set ERROR status so sync button shows error icon + this._providerManager.setSyncStatus('ERROR'); + + // Show snackbar (consistent with other error handlers) + this._snackService.open({ + msg: T.F.SYNC.S.DECRYPTION_FAILED, + type: 'ERROR', + config: { duration: 10000 }, // Longer duration for critical errors + }); + + // Open dialog for password correction this._matDialog .open(DialogHandleDecryptErrorComponent, { disableClose: true, @@ -543,6 +554,10 @@ export class SyncWrapperService { if (isForceUpload) { this.forceUpload(); } + // Reset status if user cancelled without taking action + if (!isReSync && !isForceUpload) { + this._providerManager.setSyncStatus('UNKNOWN_OR_CHANGED'); + } }); }