cetirizine

An experimental matrix client written in reactjs utilizing tailwind and storybook
git clone git://archive.git.mtrnord.blog/MTRNord/cetirizine.git
Log | Files | Refs | README | LICENSE

commit 044f901a1cdcf6a2739c9251c3da5ed3c8ebe4dc
parent 6a4f5dea4c6da7216c72027c53106cc539fad8b4
Author: MTRNord <mtrnord1@gmail.com>
Date:   Mon, 15 May 2023 21:57:58 +0200

Fix more issues with the CI

Diffstat:
M.github/workflows/percy.yaml | 5+++--
M.github/workflows/storybook-tests.yml | 8+++++---
M.storybook/test-runner.ts | 2++
Msrc/components/events/messageEvent.stories.tsx | 2+-
4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/percy.yaml b/.github/workflows/percy.yaml @@ -22,6 +22,7 @@ jobs: - run: | export NODE_OPTIONS="--max_old_space_size=4096" npm install + npm install concurrently http-server wait-on npx browserslist@latest --update-db env: # also other environment variable @@ -33,7 +34,7 @@ jobs: - run: | export NODE_OPTIONS="--max_old_space_size=4096" npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ - "npx http-server storybook-static --port 6006 --silent" \ - "npx wait-on tcp:6006 && npm run percy" + "npx http-server storybook-static --port 6006" \ + "echo \"Starting test\" && npx wait-on -l tcp:127.0.0.1:6006 && npm run percy" env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} diff --git a/.github/workflows/storybook-tests.yml b/.github/workflows/storybook-tests.yml @@ -13,7 +13,9 @@ jobs: node-version: "18.x" registry-url: https://npm.pkg.github.com/ - name: Install dependencies - run: npm install + run: | + npm install + npm install concurrently http-server wait-on env: # also other environment variable NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -27,7 +29,7 @@ jobs: run: | export NODE_OPTIONS="--max_old_space_size=4096 --experimental-vm-modules" npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ - "npx http-server storybook-static --port 6006 --silent" \ - "npx wait-on tcp:6006 && npm run test-storybook -- --coverage --browsers firefox chromium" + "npx http-server storybook-static --port 6006" \ + "echo \"Starting test\" && npx wait-on -l tcp:127.0.0.1:6006 && npm run test-storybook -- --coverage --browsers firefox chromium" - name: Build lcov.info run: npx nyc report --reporter=lcov -t coverage/storybook --report-dir coverage/storybook diff --git a/.storybook/test-runner.ts b/.storybook/test-runner.ts @@ -2,6 +2,7 @@ import { injectAxe, checkA11y } from 'axe-playwright'; import type { TestRunnerConfig } from '@storybook/test-runner'; +import { defaultMatrixClient } from "../src/app/sdk/client"; /* * See https://storybook.js.org/docs/react/writing-tests/test-runner#test-hook-api-experimental @@ -12,6 +13,7 @@ export const a11yConfig: TestRunnerConfig = { await injectAxe(page); }, async postRender(page) { + await checkA11y(page, '#storybook-root', { detailedReport: true, detailedReportOptions: { diff --git a/src/components/events/messageEvent.stories.tsx b/src/components/events/messageEvent.stories.tsx @@ -47,7 +47,7 @@ export const FormattedEvent: Story = { }; // @ts-ignore -defaultMatrixClient.hostname = "https://matrix.org"; +defaultMatrixClient.user.hostname = "https://matrix.org"; export const ImageEvent: Story = { args: {