diff --git a/ts/services/backups/import.ts b/ts/services/backups/import.ts index bc4195d4ea65..613afbc23a53 100644 --- a/ts/services/backups/import.ts +++ b/ts/services/backups/import.ts @@ -617,10 +617,14 @@ export class BackupImportStream extends Writable { 'hasStoriesDisabled', accountSettings?.storiesDisabled === true ); + + // an undefined value for storyViewReceiptsEnabled is semantically different from + // false: it causes us to fallback to `read-receipt-setting` await storage.put( 'storyViewReceiptsEnabled', - accountSettings?.storyViewReceiptsEnabled === true + accountSettings?.storyViewReceiptsEnabled ?? undefined ); + await storage.put( 'hasCompletedUsernameOnboarding', accountSettings?.hasCompletedUsernameOnboarding === true diff --git a/ts/test-mock/backups/backups_test.ts b/ts/test-mock/backups/backups_test.ts index 02922fe3a015..e61486d9ca89 100644 --- a/ts/test-mock/backups/backups_test.ts +++ b/ts/test-mock/backups/backups_test.ts @@ -4,6 +4,7 @@ import createDebug from 'debug'; import Long from 'long'; import { Proto, StorageState } from '@signalapp/mock-server'; +import { expect } from 'playwright/test'; import { generateStoryDistributionId } from '../../types/StoryDistributionId'; import { MY_STORY_ID } from '../../types/Stories'; @@ -224,6 +225,9 @@ describe('backups', function (this: Mocha.Suite) { debug('Opening story privacy'); await window.locator('.StoriesTab__MoreActionsIcon').click(); await window.getByRole('button', { name: 'Story Privacy' }).click(); + await expect( + window.locator('.StoriesSettingsModal__overlay') + ).toHaveCSS('opacity', '1'); await snapshot('story privacy'); }, diff --git a/ts/test-mock/bootstrap.ts b/ts/test-mock/bootstrap.ts index 17e92ef0b66b..d8734a632cf6 100644 --- a/ts/test-mock/bootstrap.ts +++ b/ts/test-mock/bootstrap.ts @@ -481,7 +481,10 @@ export class Bootstrap { const window = await app.getWindow(); await callback(window, async (name: string) => { debug('creating screenshot'); - snapshots.push({ name, data: await window.screenshot() }); + snapshots.push({ + name, + data: await window.screenshot(), + }); }); let index = 0; @@ -512,7 +515,7 @@ export class Bootstrap { {} ); - if (numPixels === 0) { + if (numPixels === 0 && !process.env.FORCE_ARTIFACT_SAVE) { debug('no screenshot difference'); return; } diff --git a/ts/types/Storage.d.ts b/ts/types/Storage.d.ts index 5e41c2ecef0a..4bc1c9cc2037 100644 --- a/ts/types/Storage.d.ts +++ b/ts/types/Storage.d.ts @@ -80,7 +80,7 @@ export type StorageAccessType = { hasSeenGroupStoryEducationSheet: boolean; hasViewedOnboardingStory: boolean; hasStoriesDisabled: boolean; - storyViewReceiptsEnabled: boolean; + storyViewReceiptsEnabled: boolean | undefined; identityKeyMap: IdentityKeyMap; lastAttemptedToRefreshProfilesAt: number; lastResortKeyUpdateTime: number;