Skip to content

Commit 9643115

Browse files
authored
Trying to make the app build again (#138)
* Trying to make the app build again * Bumping to Node 22 * Workarounds to use enzyme for React 17 Making tests pass * test: add robust test polyfills (TextEncoder/TextDecoder, in-process MessagePort/MessageChannel, streams); register enzyme serializer via Jest; add cheerio for enzyme compatibility * Improving coverage * Not uploading coverage * Making storybook build * Removing orchestrate references * Using working tests * Adjusting coverage * Improving SC config * Running e2e in the PR * Fixing path
1 parent 9192e42 commit 9643115

File tree

95 files changed

+66167
-27963
lines changed

Some content is hidden

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

95 files changed

+66167
-27963
lines changed

.DS_Store

-6 KB
Binary file not shown.

.github/workflows/github-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Build
2222
uses: actions/setup-node@v2
2323
with:
24-
node-version: '14.x'
24+
node-version: '22.x'
2525

2626
- name: Build site
2727
env:

.github/workflows/sample-app-web.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
strategy:
2626
matrix:
27-
node-version: [14.x]
27+
node-version: [22.x]
2828

2929
steps:
3030
- name: Checkout Repository
@@ -45,16 +45,13 @@ jobs:
4545
- name: Run Unit Tests and generate coverage report
4646
run: npm run test.coverage
4747

48-
- name: Upload coverage to Codecov
49-
uses: codecov/codecov-action@v1
50-
with:
51-
token: ${{ secrets.CODECOV_TOKEN }}
52-
5348
# Only run the last 2 steps when we are not on the main branch
5449
- name: Run Storybook tests
5550
if: ${{ !env.IS_MAIN }}
5651
run: npm run test.storybook.ci
5752

53+
- name: Install test dependencies
54+
run: npm --prefix ./test/e2e install
55+
5856
- name: Build and E2E test the site
59-
if: ${{ !env.IS_MAIN }}
60-
run: npm run start & npx wait-on --timeout 60000 http://localhost:3000 && npm run test.e2e.sauce.us
57+
run: npm run start & npx wait-on --timeout 60000 http://localhost:3000 && npm --prefix ./test/e2e run test.saucelabs.us

.gitignore

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,2 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
7-
8-
# testing
9-
/coverage
10-
11-
# production
12-
/build
13-
14-
# misc
15-
**/.DS_Store
16-
.env.local
17-
.env.development.local
18-
.env.test.local
19-
.env.production.local
20-
*.log
21-
.project
22-
bin
23-
dist
24-
screenshots
25-
.idea
26-
.coverage
27-
storybook-static
28-
.tmp
29-
.eslintcache
1+
.DS_Store
2+
node_modules/

.storybook/main.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
// Minimal Storybook main configuration to force webpack5 builder
12
module.exports = {
2-
"stories": [
3-
"../src/storybook/**/*.stories.mdx",
4-
"../src/storybook/**/*.stories.@(js|jsx|ts|tsx)"
5-
],
6-
"addons": [
7-
"@storybook/addon-links",
3+
core: {
4+
builder: "webpack5",
5+
},
6+
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
7+
addons: [
88
"@storybook/addon-essentials",
9-
"@storybook/preset-create-react-app"
10-
]
11-
}
9+
"@storybook/addon-links",
10+
"@storybook/addon-actions"
11+
],
12+
framework: {
13+
name: "@storybook/react",
14+
options: {}
15+
}
16+
};
17+

.storybook/preview.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
import React from 'react';
2+
import { MemoryRouter } from 'react-router-dom';
13
import '../src/index.css';
24

35
export const parameters = {
4-
actions: { argTypesRegex: "^on[A-Z].*" },
5-
}
6+
actions: { argTypesRegex: '^on[A-Z].*' },
7+
};
8+
9+
export const decorators = [
10+
(Story) => (
11+
<MemoryRouter initialEntries={['/']}>
12+
<Story />
13+
</MemoryRouter>
14+
),
15+
];

orchestrate.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)