Skip to content

Commit 0588572

Browse files
authored
Merge cbcc5cd into 2651510
2 parents 2651510 + cbcc5cd commit 0588572

File tree

12 files changed

+1756
-2315
lines changed

12 files changed

+1756
-2315
lines changed

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,84 @@ jobs:
179179
if: ${{ needs.vrt-runner.result == 'failure' }}
180180
run: exit 1
181181

182+
vrt-runner-all-flags:
183+
runs-on: ubuntu-latest-8-cores
184+
strategy:
185+
fail-fast: false
186+
matrix:
187+
shard: [1, 2, 3, 4]
188+
env:
189+
PRIMER_REACT_CSS_MODULES_TEAM: 1
190+
PRIMER_REACT_CSS_MODULES_STAFF: 1
191+
PRIMER_REACT_CSS_MODULES_GA: 1
192+
steps:
193+
- uses: actions/checkout@v4
194+
- name: Use Node.js 20.x
195+
uses: actions/setup-node@v4
196+
with:
197+
node-version: 22
198+
cache: 'npm'
199+
- run: npm i -g npm@^10.5.1
200+
- name: Install dependencies
201+
run: npm ci
202+
- name: Build storybook
203+
run: npx storybook build
204+
working-directory: packages/react
205+
- name: Run storybook
206+
id: storybook
207+
working-directory: packages/react
208+
run: |
209+
npx serve -l 6006 storybook-static &
210+
pid=$!
211+
echo "pid=$pid" >> $GITHUB_OUTPUT
212+
sleep 5
213+
- name: Run VRT
214+
uses: docker://mcr.microsoft.com/playwright:v1.43.0-jammy
215+
env:
216+
STORYBOOK_URL: 'http://172.17.0.1:6006'
217+
with:
218+
args: npx playwright test --grep @vrt --shard="${{ matrix.shard }}/${{ strategy.job-total }}"
219+
- name: Stop storybook
220+
run: kill ${{ steps.storybook.outputs.pid }}
221+
- name: Upload report
222+
if: ${{ always() }}
223+
uses: actions/upload-artifact@v4
224+
with:
225+
name: vrt-all-flags-${{ matrix.shard }}
226+
path: blob-report
227+
retention-days: 1
228+
229+
vrt-all-flags:
230+
if: ${{ always() }}
231+
runs-on: ubuntu-latest
232+
needs: vrt-runner-all-flags
233+
steps:
234+
- uses: actions/checkout@v4
235+
- name: Use Node.js 20.x
236+
uses: actions/setup-node@v4
237+
with:
238+
node-version: 22
239+
cache: 'npm'
240+
- run: npm i -g npm@^10.5.1
241+
- name: install dependencies
242+
run: npm ci
243+
- name: download all reports
244+
uses: actions/download-artifact@v4
245+
with:
246+
path: all-blob-reports
247+
pattern: vrt-all-flags-*
248+
merge-multiple: true
249+
- name: merge all reports
250+
run: npx playwright merge-reports --reporter html ./all-blob-reports
251+
- name: Upload report
252+
uses: actions/upload-artifact@v4
253+
with:
254+
name: vrt-all-flags
255+
path: playwright-report
256+
- name: check vrt-runner job status
257+
if: ${{ needs.vrt-runner.result == 'failure' }}
258+
run: exit 1
259+
182260
aat-runner:
183261
runs-on: ubuntu-latest-8-cores
184262
strategy:

e2e/components/Banner.test.ts

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,6 @@ test.describe('Banner', () => {
8282
id: story.id,
8383
globals: {
8484
colorScheme: theme,
85-
featureFlags: {
86-
primer_react_css_modules_team: true,
87-
},
88-
},
89-
})
90-
91-
// Default state
92-
expect(await page.screenshot()).toMatchSnapshot(`Banner.${story.title}.${theme}.png`)
93-
})
94-
95-
test('default (styled-components) @vrt', async ({page}) => {
96-
await visit(page, {
97-
id: story.id,
98-
globals: {
99-
colorScheme: theme,
100-
featureFlags: {
101-
primer_react_css_modules_team: false,
102-
},
10385
},
10486
})
10587

@@ -112,22 +94,6 @@ test.describe('Banner', () => {
11294
id: story.id,
11395
globals: {
11496
colorScheme: theme,
115-
featureFlags: {
116-
primer_react_css_modules_team: true,
117-
},
118-
},
119-
})
120-
await expect(page).toHaveNoViolations()
121-
})
122-
123-
test('axe (styled-components) @aat', async ({page}) => {
124-
await visit(page, {
125-
id: story.id,
126-
globals: {
127-
colorScheme: theme,
128-
featureFlags: {
129-
primer_react_css_modules_team: false,
130-
},
13197
},
13298
})
13399
await expect(page).toHaveNoViolations()
@@ -140,29 +106,6 @@ test.describe('Banner', () => {
140106
test(`${name} @vrt`, async ({page}) => {
141107
await visit(page, {
142108
id: story.id,
143-
globals: {
144-
featureFlags: {
145-
primer_react_css_modules_team: true,
146-
},
147-
},
148-
})
149-
const width = viewports[name]
150-
151-
await page.setViewportSize({
152-
width,
153-
height: 667,
154-
})
155-
expect(await page.screenshot()).toMatchSnapshot(`Banner.${story.title}.${name}.png`)
156-
})
157-
158-
test(`${name} (styled-components) @vrt`, async ({page}) => {
159-
await visit(page, {
160-
id: story.id,
161-
globals: {
162-
featureFlags: {
163-
primer_react_css_modules_team: false,
164-
},
165-
},
166109
})
167110
const width = viewports[name]
168111

0 commit comments

Comments
 (0)