-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathActionMenu.visual.spec.ts
More file actions
161 lines (133 loc) · 5.94 KB
/
Copy pathActionMenu.visual.spec.ts
File metadata and controls
161 lines (133 loc) · 5.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*
* Do not modify this file directly.
* This file was generated by: playwright.generate-tests.ts.
* Regenerate using: npm run test:visual:generate
*/
import {test, expect} from '@playwright/test'
// eslint-disable-next-line i18n-text/no-en
test.describe('Visual Comparison: ActionMenu', () => {
test('ActionMenu / Default', async ({page}) => {
await page.goto('http://localhost:6006/iframe.html?args=&id=components-actionmenu--default&viewMode=story', {
waitUntil: 'networkidle',
})
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Single Selection', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--single-selection&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Default Mode All Variants', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--default-mode-all-variants&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Default Mode Leading Visual', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--default-mode-leading-visual&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Split Button Mode', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--split-button-mode&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Split Button Mode Disabled', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--split-button-mode-disabled&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Split Button Mode All Variants', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--split-button-mode-all-variants&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Split Button Mode In Hero', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--split-button-mode-in-hero&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / In Stack', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--in-stack&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Sizes', async ({page}) => {
await page.goto('http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--sizes&viewMode=story', {
waitUntil: 'networkidle',
})
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Longer Button Text', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--longer-button-text&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Longer Lists', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--longer-lists&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Disabled Menu', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--disabled-menu&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
test('ActionMenu / Anchored Positioning Overrides', async ({page}) => {
await page.goto(
'http://localhost:6006/iframe.html?args=&id=components-actionmenu-features--anchored-positioning-overrides&viewMode=story',
{waitUntil: 'networkidle'},
)
await page.locator('body.sb-show-main').waitFor({state: 'visible'})
await page.waitForTimeout(500)
await expect(page).toHaveScreenshot({fullPage: true})
})
})