Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUR-242, SUR-323 - Setup Tests for UI components #159

Merged
merged 86 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
92d7aca
Installed required libraries for the unit test
jaieds Oct 18, 2024
f0b4d5f
Updated the git ignore and storybook config
jaieds Oct 18, 2024
8ddfd9b
Added test runner config
jaieds Oct 18, 2024
bd16bfd
Added a test for Button component
jaieds Oct 18, 2024
6003012
Add a test for the Select component
jaieds Oct 18, 2024
f0aca45
chore: Added a comment
jaieds Oct 18, 2024
e17f23d
chore: Lint
jaieds Oct 18, 2024
d1fd52b
Removed unused code and files
jaieds Oct 18, 2024
81b82b1
Create storybook-tests.yml
jaieds Oct 18, 2024
35da252
Updated the branch name
jaieds Oct 18, 2024
bd1d489
fix: CI Install dependencies step
jaieds Oct 18, 2024
0294b38
fix: CI Build Storybook command
jaieds Oct 18, 2024
7666152
fix: CI build storybook command
jaieds Oct 18, 2024
cf541b1
fix: CI build force-ui before building the storybook
jaieds Oct 18, 2024
a29351f
Revert "Removed unused code and files"
jaieds Oct 18, 2024
ffc694a
Merge branch 'dev' into SUR-242
jaieds Oct 31, 2024
3b97c24
chore: Removed .js file and updated package-lock
jaieds Oct 31, 2024
10a3d6e
fix: Error while building Storybook
jaieds Oct 31, 2024
21f6262
Removed duplicate files
jaieds Oct 31, 2024
4256261
Initialized accessibility fixes branch
JelenaTakac Nov 5, 2024
da3aaa3
Fixed accessibility violation for Alert component
JelenaTakac Nov 8, 2024
f169840
Fixed accessibility violation for Breadcrumb component
JelenaTakac Nov 8, 2024
9340ab9
Fixed accessibility violation for Progress Bar component
JelenaTakac Nov 11, 2024
65bf5f9
Fixed accessibility violation for Pagination component
JelenaTakac Nov 11, 2024
5aaa030
Merge branch 'dev' into SUR-242
jaieds Nov 12, 2024
dc76b79
Added a helper function to extract type
jaieds Nov 12, 2024
4f4025f
Restore test for the button and select component
jaieds Nov 12, 2024
33f814b
chore: Lint
jaieds Nov 12, 2024
895d39d
fix: Select component test
jaieds Nov 12, 2024
d7cd895
Merge branch 'dev' into SUR-242
jaieds Nov 12, 2024
4ef7551
Update package-lock.json
jaieds Nov 12, 2024
3f4c510
fix: Accessibility alert for Button icon
jaieds Nov 12, 2024
a69b0dd
Fixed accessibility violation for Datapicker component
JelenaTakac Nov 12, 2024
1b2df14
Merge branch 'SUR-242' into SUR-323/accessibility-fixes
JelenaTakac Nov 12, 2024
1d134b7
Added accessibility fixes for Alert, Breadcrumb, Progress Bar and Dat…
JelenaTakac Nov 12, 2024
60f642e
Fixed 'Buttons must have discernible text' issue for Area, Bar and Pi…
JelenaTakac Nov 12, 2024
4ef3477
fix: Dropdown not visible
jaieds Nov 13, 2024
04323d1
Spread other props to the Avatar
jaieds Nov 13, 2024
29d7209
fix: DropdownMenu component accessibility issues
jaieds Nov 13, 2024
acc1091
Resolved a11y violation "Elements must meet minimum color contrast ra…
JelenaTakac Nov 13, 2024
fd4b4c3
fix: Menu component accessibility issue
jaieds Nov 13, 2024
167ee35
Disabled color contrast accessibility violation
jaieds Nov 13, 2024
bbfaee1
fix: Area & Bar chart accessibility issues
jaieds Nov 13, 2024
d20ad4d
fix: The Tooltip is not visible
jaieds Nov 13, 2024
0141848
Update the test runner config
jaieds Nov 13, 2024
472601e
fix: Cards story accessibility issue
jaieds Nov 13, 2024
48d8a19
fix: Drawer component accessibility issue
jaieds Nov 13, 2024
6779851
fix: Pie chart accessibility issues
jaieds Nov 13, 2024
9e55288
disabled accessibility check for the templates
jaieds Nov 13, 2024
212b4a8
Merge branch 'SUR-323/accessibility-fixes' into SUR-323-Fixes
jaieds Nov 13, 2024
3a2651d
Update Area, bar and pie chart component
jaieds Nov 13, 2024
657d806
disabled editor input component accessibility issue
jaieds Nov 13, 2024
6286479
fix: Pagination component accessibility issues
jaieds Nov 13, 2024
5ba78e6
Fixed Input component a11y violations
JelenaTakac Nov 13, 2024
3452dcd
Fixed Radio Button component a11y violation
JelenaTakac Nov 13, 2024
1076079
Fixed Switch component a11y violation
JelenaTakac Nov 13, 2024
8cab8e9
Fixed TextArea component a11y violation
JelenaTakac Nov 13, 2024
43eb792
Fixed a11y violation for Widget Blocks story in Card component
JelenaTakac Nov 13, 2024
3937cf7
Delete tsconfig.app.tsbuildinfo
jaieds Nov 14, 2024
810e795
Update package-lock.json
jaieds Nov 14, 2024
51cccf6
Merge branch 'SUR-323-Fixes' of github.com:brainstormforce/force-ui i…
jaieds Nov 14, 2024
2f04796
chore: Lint
jaieds Nov 14, 2024
81f666d
Removed sr-only label and added aria-label instead
jaieds Nov 14, 2024
08e5a4a
refactor: Removed extra variable
jaieds Nov 14, 2024
11dd657
refactor: Replaced sr-only label with the aria-label
jaieds Nov 14, 2024
71f1437
Add the role attribute to the breadcrumb separator
jaieds Nov 14, 2024
36757a1
fix: Breadcrumb component accessibility issue
jaieds Nov 14, 2024
acd8600
fix: Menu component accessibility issue
jaieds Nov 14, 2024
8a6cf9b
fix: Select component accessibility issue
jaieds Nov 14, 2024
dd30742
fix: Accessibility issues of templates
jaieds Nov 14, 2024
070dad9
chore: Lint
jaieds Nov 14, 2024
5cb290f
Removed static aria attribute
jaieds Nov 14, 2024
02eb78d
fix: z-index of the dropdown
jaieds Nov 14, 2024
9a8aec1
Removed color contrast ratio ignore rule
jaieds Nov 14, 2024
b8c19df
Update storybook-tests.yml
jaieds Nov 14, 2024
b05a3b4
Removed ignore rule
jaieds Nov 14, 2024
7322063
Ignore rule only for the editor input
jaieds Nov 14, 2024
f6bcde7
fix: Select component transition
jaieds Nov 15, 2024
5401c60
fix: type to search
jaieds Nov 15, 2024
baee63c
Disable color contrast ratio check
jaieds Nov 15, 2024
825070a
Merge pull request #189 from brainstormforce/SUR-323-Fixes
vrundakansara Nov 18, 2024
bacc5f4
Merge branch 'dev' into SUR-242
jaieds Nov 18, 2024
ed679da
Installed vite plugin to preserve directives
jaieds Nov 18, 2024
db2e994
Updated the Vite config and ts config
jaieds Nov 18, 2024
c671dad
Use `use client` directive for the Nextjs
jaieds Nov 18, 2024
d134f70
Merge pull request #190 from brainstormforce/next-js-fix
vrundakansara Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/storybook-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Storybook Tests'
on:
push:
branches:
- SUR-242
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build force-ui
run: npm run build --silent
- name: Build Storybook
run: npm run build-storybook --silent
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on tcp:127.0.0.1:6006 && yarn test-storybook"
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ dist/*
.DS_Store
*storybook.log
storybook-static/*
*.zip
*.zip
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
1 change: 1 addition & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const config = {
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
],
swc: () => ({
jsc: {
Expand Down
15 changes: 15 additions & 0 deletions .storybook/test-runner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { injectAxe, checkA11y } = require('axe-playwright');

module.exports = {
async preVisit(page) {
await injectAxe(page);
},
async postVisit(page) {
await checkA11y(page, '#storybook-root', {
detailedReport: true,
detailedReportOptions: {
html: true,
},
});
},
};
Loading
Loading