Use the application icon asset as the in-app brand mark; drop the old inline peach; smoke checks the decoded image
This commit is contained in:
1 parent
d505890c74
commit
6b8994f1cb
4 files changed
+16
-8
No files matched your search
@@ -67,6 +67,16 @@ try {
|
||||
step('new profile: onboarding', l);
|
||||
await page.screenshot({ path: path.join(out, '70-new-profile-onboarding-dark.png') });
|
||||
if (!l.prefersDark) throw new Error('new profile is not dark');
|
||||
// The onboarding mark is the application icon asset, actually decoded.
|
||||
await page.waitForFunction(() => document.querySelector('#view-onboarding .brand-mark')?.complete);
|
||||
const mark = await page.$eval('#view-onboarding .brand-mark', (img) => ({
|
||||
src: new URL(img.currentSrc).pathname,
|
||||
naturalWidth: img.naturalWidth,
|
||||
naturalHeight: img.naturalHeight,
|
||||
shownWidth: img.getBoundingClientRect().width,
|
||||
}));
|
||||
step('onboarding brand mark', mark);
|
||||
if (mark.src !== '/assets/icon.png' || mark.naturalWidth !== 256 || mark.naturalHeight !== 256 || mark.shownWidth !== 56) throw new Error('brand mark is not the loaded app icon');
|
||||
await page.fill('#onboarding-nick', 'ThemeSmoke');
|
||||
await page.click('#onboarding-submit');
|
||||
await page.waitForSelector('#view-app', { state: 'visible', timeout: 20000 });
|
||||
|
||||
Reference in new issue
Block a user