Skip to content

Commit 40cb31a

Browse files
authored
Merge branch 'dev' into test
2 parents aa5ef3b + 1f49b26 commit 40cb31a

File tree

279 files changed

+22591
-8197
lines changed

Some content is hidden

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

279 files changed

+22591
-8197
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: BackstopJS Visual Regression Tests
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
backstop-tests:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 60
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 20
19+
cache: yarn
20+
21+
- name: Install dependencies
22+
run: yarn install --frozen-lockfile
23+
24+
- name: Build packages
25+
run: lerna run build
26+
27+
- name: Start Storybook
28+
run: yarn storybook -p 6006 &
29+
30+
- name: Wait for Storybook to be available
31+
run: npx wait-on http://localhost:6006 --timeout 120000
32+
33+
- name: Run BackstopJS tests
34+
run: yarn backstop:test

.github/workflows/unit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
branches: ['dev']
99

1010
jobs:
11-
build:
11+
unit-tests:
1212
runs-on: ubuntu-latest
1313

1414
steps:
@@ -18,6 +18,6 @@ jobs:
1818
with:
1919
node-version: 20.x
2020
cache: 'npm'
21-
- run: npx yarn install
21+
- run: yarn install --production=false
2222
- run: lerna run build
2323
- run: npm run test --workspaces

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,8 @@ coverage/
4747
lerna-debug.log
4848

4949
.history/
50+
51+
# BackstopJS - ignore generated test files and reports
52+
/backstop_data/bitmaps_test/
53+
/backstop_data/html_report/
54+
/backstop_data/ci_report/

.storybook/preview-head.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,17 @@
1919
.sbdocs-h3 {
2020
color: #3a569b !important;
2121
}
22+
23+
/* Add 1rem padding when editor isn't visible to mimic DFE */
24+
.cove-storybook:not(:has(.isEditor)) {
25+
padding: 1rem;
26+
}
27+
28+
/* Remove Storybook's default padding to prevent double padding */
29+
#storybook-root,
30+
body.sb-main-padded,
31+
body.sb-show-main.sb-main-padded {
32+
padding: 0 !important;
33+
}
2234
</style>
2335
<link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/5.0/css/app.min.css?_=71669" />

0 commit comments

Comments
 (0)