Skip to content

Commit 87c5e44

Browse files
committed
test: update selectors and snapshots with new default texts
1 parent f83af08 commit 87c5e44

172 files changed

Lines changed: 1081 additions & 692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

playwright/e2e/dashboards-demo/dashboard.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ test.describe('dashboard', () => {
4141
test(example + 'empty', async ({ page, si }) => {
4242
await si.visitExample(example, undefined);
4343
await openWidgetCatalog(page);
44-
const search = page.getByPlaceholder('Search widget');
44+
const search = page.getByRole('textbox', { name: 'Search…' });
4545
await expect(search).toBeVisible();
4646
await search.fill('empty');
4747
await expect(page.getByText('No widgets available.')).toBeVisible();

playwright/e2e/element-examples/navbar-launchpad.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test.describe('navbar launchpad', () => {
3838
await si.visitExample(example, false);
3939

4040
await expect(page.getByText('Application Name')).toBeVisible();
41-
const toggler = page.getByLabel('Toggle navigation');
41+
const toggler = page.getByLabel('Show navigation');
4242
await toggler.click();
4343
await expect(page.getByText('Item 1')).toBeVisible();
4444

playwright/e2e/element-examples/navbar-primary.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test.describe('navbar launchpad', () => {
2020
await page.setViewportSize({ width: 500, height: 660 });
2121
await si.visitExample(example, false);
2222

23-
await page.getByLabel('Toggle navigation').click();
23+
await page.getByLabel('Show navigation').click();
2424
await page.getByText('item 2', { exact: true }).click();
2525
await si.runVisualAndA11yTests('small-expanded');
2626
});
@@ -38,7 +38,7 @@ test.describe('navbar launchpad', () => {
3838
await page.setViewportSize({ width: 500, height: 660 });
3939
await si.visitExample(exampleEnd, false);
4040

41-
await page.getByLabel('Toggle actions').click();
41+
await page.getByLabel('Show actions').click();
4242
await page.getByRole('button', { name: 'Help' }).click();
4343
await page.waitForTimeout(400); // wait for expand-icon animation
4444
await si.runVisualAndA11yTests('small-expanded');

playwright/e2e/element-examples/si-application-header.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ test.describe('application-header', () => {
2525
test('on a small screen', async ({ page, si }) => {
2626
await si.visitExample(example);
2727
await page.setViewportSize({ width: 312, height: 660 });
28-
await page.getByLabel('Toggle navigation').click();
28+
await page.getByLabel('Show navigation').click();
2929
await page.getByText('Module 2').click();
3030
await si.runVisualAndA11yTests('mobile navigation expanded');
3131
await page.getByText('Notifications').click();
3232
await si.runVisualAndA11yTests('mobile notifications expanded');
33-
await page.getByLabel('Toggle actions').click();
33+
await page.getByLabel('Show actions').click();
3434
await page.getByText('Support').click();
3535
await si.runVisualAndA11yTests('mobile collapsible actions expanded');
3636
await page.getByRole('button', { name: 'Lars Vegas' }).click();

playwright/e2e/element-examples/si-modal-dialogs.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ test.describe('si-modal-dialogs', () => {
7474
await page.mouse.up();
7575

7676
await page.getByRole('option', { name: 'Row 8' }).press('Enter');
77-
await expect(page.getByRole('textbox', { name: 'Rename column' })).toBeFocused();
77+
await expect(page.getByRole('textbox', { name: 'Rename element' })).toBeFocused();
7878
await page.keyboard.type(' M');
7979
await page.getByRole('option', { name: 'Row 8' }).press('Enter');
8080
await page.getByRole('option', { name: 'Row 8' }).press('Space');

playwright/e2e/element-examples/si-select.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ test.describe('si-select', () => {
9999
const select = page.getByLabel('Lazy options');
100100
await expect(select).toContainText('DE - Germany');
101101
await select.click();
102-
await page.getByPlaceholder('Search...').fill('sw');
102+
await page.getByPlaceholder('Search').fill('sw');
103103
await expect(page.getByText('Switzerland')).toBeVisible();
104104
await si.runVisualAndA11yTests();
105105
await page.getByText('Switzerland').click();

playwright/snapshots/dashboard.spec.ts-snapshots/dashboard--contact-widget.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- application "Project Issues!":
1717
- img "Buildings at scale"
1818
- text: ""
19-
- button "Toggle"
19+
- button "Show actions"
2020
- text: /\d+ Issues Number of contributing issues/
2121
- link "Go to issues":
2222
- /url: https://github.com/siemens/element/issues
@@ -48,7 +48,7 @@
4848
- text: ""
4949
- menubar:
5050
- menuitem "Remove"
51-
- textbox "Search..."
51+
- textbox "Search"
5252
- list:
5353
- listitem:
5454
- text: /\d+\+/

playwright/snapshots/dashboard.spec.ts-snapshots/dashboard--delete-confirmation-dialog.yaml

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,40 @@
1515
- img
1616
- application "Project Issues!":
1717
- img "Buildings at scale"
18-
- text: Project Issues!
19-
- button "Toggle"
18+
- text: ""
19+
- button "Show actions"
2020
- text: /\d+ Issues Number of contributing issues/
2121
- link "Go to issues":
2222
- /url: https://github.com/siemens/element/issues
2323
- img
2424
- application "Bar Chart":
25-
- text: Bar Chart
25+
- text: ""
2626
- menubar:
2727
- menuitem "Remove"
2828
- menuitem "Expand"
2929
- img
3030
- application "Pie Chart":
31-
- text: Pie Chart
31+
- text: ""
3232
- menubar:
3333
- menuitem "Remove"
3434
- menuitem "Expand"
3535
- img
3636
- application "Full Speed":
37-
- text: Full Speed
37+
- text: ""
3838
- menubar:
3939
- menuitem "Remove"
4040
- img
4141
- application "Line Chart":
42-
- text: Line Chart
42+
- text: ""
4343
- menubar:
4444
- menuitem "Remove"
4545
- menuitem "Expand"
4646
- img
4747
- application "List Widget":
48-
- text: List Widget
48+
- text: ""
4949
- menubar:
5050
- menuitem "Remove"
51-
- textbox "Search..."
51+
- textbox "Search"
5252
- list:
5353
- listitem:
5454
- text: /\d+\+/
@@ -78,7 +78,7 @@
7878
- /url: https://github.com/siemens/element/issues
7979
- img
8080
- application "Timeline Widget":
81-
- text: Timeline Widget
81+
- text: ""
8282
- menubar:
8383
- menuitem "Remove"
8484
- list:
@@ -88,8 +88,49 @@
8888
- listitem: /Today \d+:\d+ Title Description/
8989
- link "Go to...":
9090
- /url: https://github.com/siemens/element/issues
91+
- img
92+
- application "Weather":
93+
- text: ""
94+
- menubar:
95+
- menuitem "Edit"
96+
- menuitem "Remove"
97+
- menuitem "Expand"
98+
- text: /\d+°/
99+
- img "Sunny"
100+
- text: /Sunny \d+° \d+°/
101+
- list "Additional weather data":
102+
- listitem: /Wind [\d,.]+[bkmBKM]+\/h/
103+
- listitem: /Cloud cover \d+%/
104+
- listitem: /Precipitation [\d,.]+[bkmBKM]+/
105+
- listitem: UVI 1 low
106+
- list:
107+
- listitem:
108+
- text: Mon
109+
- img "Mon"
110+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
111+
- text: /\d+° \d+°/
112+
- listitem:
113+
- text: Tue
114+
- img "Tue"
115+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
116+
- text: /\d+° \d+°/
117+
- listitem:
118+
- text: Wed
119+
- img "Wed"
120+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
121+
- text: /\d+° \d+°/
122+
- listitem:
123+
- text: Thu
124+
- img "Thu"
125+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
126+
- text: /\d+° \d+°/
127+
- listitem:
128+
- text: Fri
129+
- img "Fri"
130+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
131+
- text: /\d+° \d+°/
91132
- dialog "Remove widget":
92-
- text: Remove widget
133+
- text: ""
93134
- button "Cancel"
94135
- text: Do you really want to remove the widget?
95136
- button "Cancel"

playwright/snapshots/dashboard.spec.ts-snapshots/dashboard--delete.yaml

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,34 @@
1515
- img
1616
- application "Project Issues!":
1717
- img "Buildings at scale"
18-
- text: Project Issues!
19-
- button "Toggle"
18+
- text: ""
19+
- button "Show actions"
2020
- text: /\d+ Issues Number of contributing issues/
2121
- link "Go to issues":
2222
- /url: https://github.com/siemens/element/issues
2323
- img
2424
- application "Bar Chart":
25-
- text: Bar Chart
25+
- text: ""
2626
- menubar:
2727
- menuitem "Remove"
2828
- menuitem "Expand"
2929
- img
3030
- application "Full Speed":
31-
- text: Full Speed
31+
- text: ""
3232
- menubar:
3333
- menuitem "Remove"
3434
- img
3535
- application "Line Chart":
36-
- text: Line Chart
36+
- text: ""
3737
- menubar:
3838
- menuitem "Remove"
3939
- menuitem "Expand"
4040
- img
4141
- application "List Widget":
42-
- text: List Widget
42+
- text: ""
4343
- menubar:
4444
- menuitem "Remove"
45-
- textbox "Search..."
45+
- textbox "Search"
4646
- list:
4747
- listitem:
4848
- text: /\d+\+/
@@ -72,7 +72,7 @@
7272
- /url: https://github.com/siemens/element/issues
7373
- img
7474
- application "Timeline Widget":
75-
- text: Timeline Widget
75+
- text: ""
7676
- menubar:
7777
- menuitem "Remove"
7878
- list:
@@ -81,4 +81,45 @@
8181
- listitem: /Today \d+:\d+ Title Description/
8282
- listitem: /Today \d+:\d+ Title Description/
8383
- link "Go to...":
84-
- /url: https://github.com/siemens/element/issues
84+
- /url: https://github.com/siemens/element/issues
85+
- img
86+
- application "Weather":
87+
- text: ""
88+
- menubar:
89+
- menuitem "Edit"
90+
- menuitem "Remove"
91+
- menuitem "Expand"
92+
- text: /\d+°/
93+
- img "Sunny"
94+
- text: /Sunny \d+° \d+°/
95+
- list "Additional weather data":
96+
- listitem: /Wind [\d,.]+[bkmBKM]+\/h/
97+
- listitem: /Cloud cover \d+%/
98+
- listitem: /Precipitation [\d,.]+[bkmBKM]+/
99+
- listitem: UVI 1 low
100+
- list:
101+
- listitem:
102+
- text: Mon
103+
- img "Mon"
104+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
105+
- text: /\d+° \d+°/
106+
- listitem:
107+
- text: Tue
108+
- img "Tue"
109+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
110+
- text: /\d+° \d+°/
111+
- listitem:
112+
- text: Wed
113+
- img "Wed"
114+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
115+
- text: /\d+° \d+°/
116+
- listitem:
117+
- text: Thu
118+
- img "Thu"
119+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
120+
- text: /\d+° \d+°/
121+
- listitem:
122+
- text: Fri
123+
- img "Fri"
124+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
125+
- text: /\d+° \d+°/
Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)