Conversation
| - run: | ||
| name: Install Xvfb | ||
| command: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y xvfb libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 | ||
| - run: | ||
| name: Start Xvfb | ||
| command: | | ||
| Xvfb :99 -screen 0 1280x1024x24 & | ||
| echo "export DISPLAY=:99" >> $BASH_ENV | ||
| background: true |
There was a problem hiding this comment.
Apparently this is needed for cypress to run well in circleci
| "parserOptions": { | ||
| "ecmaVersion": 2020, | ||
| "ecmaVersion": 2022, | ||
| "sourceType": "module", | ||
| "ecmaFeatures": { | ||
| "jsx": true | ||
| } | ||
| }, | ||
| "plugins": ["react", "@typescript-eslint"], | ||
| "plugins": [ | ||
| "react", | ||
| "react-hooks", | ||
| "@typescript-eslint" | ||
| ], | ||
| "extends": [ | ||
| "eslint:recommended", | ||
| "plugin:@typescript-eslint/recommended", | ||
| "plugin:react/recommended", | ||
| "plugin:prettier/recommended", | ||
| "plugin:react-hooks/recommended", |
| .sentryclirc | ||
|
|
||
| # Version control | ||
| yarn.lock |
There was a problem hiding this comment.
Added yarn.lock back to vc, we should really be deploying with the same versions
| let reporterRules = require('./reporter-rules.json') | ||
|
|
||
| module.exports = { | ||
| testEnvironment: 'jsdom', |
| "loglevel": "^1.8.0", | ||
| "mockdate": "^3.0.2", | ||
| "next": "^12", | ||
| "next": "13", |
| it('closes the details panel after the enter key is pressed', async () => { | ||
| const user = userEvent.setup() |
| const tenants = contacts?.filter?.((x) => x.tenureType === 'Tenant') ?? [] | ||
| const householdMembers = | ||
| contacts?.filter?.((x) => x.tenureType === 'HouseholdMember') ?? [] |
|
|
||
| const axios = require('axios') | ||
|
|
||
| jest.mock('next/router', () => ({ useRouter: jest.fn() })) |
| if ( | ||
| formState.rateScheduleItems.length < | ||
| arrayOfRateScheduleItemComponentIndexes.length | ||
| formState?.rateScheduleItems && | ||
| formState?.rateScheduleItems.length < | ||
| arrayOfRateScheduleItemComponentIndexes.length | ||
| ) { | ||
| arrayOfRateScheduleItemComponentIndexes.pop() | ||
| } |
There was a problem hiding this comment.
Fix bug when rateScheduleItems is null
| } | ||
| } | ||
| }, arrayOfRateScheduleItemComponentIndexes) | ||
| }, [arrayOfRateScheduleItemComponentIndexes]) |
There was a problem hiding this comment.
how did this ever work without a dependency array
| await act(async () => { | ||
| await waitForElementToBeRemoved([ | ||
| screen.getByTestId('spinner-locationAlerts'), | ||
| screen.getByTestId('spinner-personAlerts'), | ||
| ]) | ||
| }) |
There was a problem hiding this comment.
Remove old act syntax
| ? 'Reschedule appointment (non DRS)' | ||
| : 'Schedule appointment (non DRS)' | ||
|
|
||
| return ( | ||
| <> | ||
| <Link href={href}> | ||
| <a className="lbh-link">{linkText} (non DRS)</a> | ||
| <Link | ||
| href={href} | ||
| className="lbh-link" | ||
| > | ||
| {linkText} | ||
| </Link> |
There was a problem hiding this comment.
Move (non DRS) to linkText
| setLoading(false) | ||
| } | ||
|
|
||
| useEffect(async () => { |
There was a problem hiding this comment.
Fix useEffect by moving async logic into a function
| const onSubmit = async (e) => { | ||
| e.preventDefault() | ||
|
|
There was a problem hiding this comment.
Prevent form from reloading page within cypress tests
| const onGetToSummary = (data) => { | ||
| updateExistingTasksQuantities(data, tasks) | ||
|
|
||
| setAddedTasks( | ||
| e.rateScheduleItems | ||
| ? e.rateScheduleItems | ||
| .filter((e) => e != null) | ||
| .map((e, index) => { | ||
| return { id: index, ...e, code: e.code.split(' - ')[0] } | ||
| data.rateScheduleItems | ||
| ? data.rateScheduleItems | ||
| .filter((data) => data != null) | ||
| .map((data, index) => { | ||
| return { id: index, ...data, code: data.code.split(' - ')[0] } | ||
| }) | ||
| : [] | ||
| ) |
| @@ -1,4 +1,4 @@ | |||
| import { v4 as uuidv4 } from 'uuid' | |||
| const { v4: uuidv4 } = require('uuid') | |||
There was a problem hiding this comment.
Eslint doesnt like this package due to MJS (no recent updates). The options were to replace the package, or change the import syntax
https://nextjs.org/docs/pages/building-your-application/upgrading/version-13
https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor