Skip to content

Commit 551d508

Browse files
committed
fix: add tests for file picker screenshots
1 parent f20a378 commit 551d508

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

packages/elements/src/components/file/file.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class FileComponent extends RealTimeElement {
2323
@state()
2424
public declare filters: StateFilter<MutantStatus>[];
2525

26-
@property()
26+
@property({ attribute: false})
2727
public declare model: FileUnderTestModel;
2828

2929
@state()

packages/elements/test/integration/po/ReportPage.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,8 @@ export class ReportPage extends ElementSelector {
7272
pageYOffset(): Promise<number> {
7373
return this.page.evaluate('window.pageYOffset');
7474
}
75+
76+
async openPicker(): Promise<void> {
77+
await this.page.keyboard.press("Control+K")
78+
}
7579
}

packages/elements/test/integration/theming.it.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ test.describe('Theming', () => {
4141

4242
itShouldMatchScreenshot('should match the dark theme');
4343
});
44+
45+
test.describe('when opening the file picker', () => {
46+
test('should show the file picker', async () => {
47+
await page.openPicker();
48+
itShouldMatchScreenshot('should match the dark theme');
49+
});
50+
});
4451
});
4552

4653
test.describe('light theme', () => {
@@ -67,5 +74,12 @@ test.describe('Theming', () => {
6774

6875
itShouldMatchScreenshot('should match the light theme');
6976
});
77+
78+
test.describe('when opening the file picker', () => {
79+
test('should match screenshot', async () => {
80+
await page.openPicker();
81+
itShouldMatchScreenshot('should match the light theme');
82+
});
83+
});
7084
});
7185
});

0 commit comments

Comments
 (0)