Remove typescript errors #35
run-tests-v1.yml
on: pull_request
test-api
1m 40s
test-frontend
49s
Annotations
6 errors and 1 warning
src/pages/__tests__/ForgotPasswordCode.test.tsx:
frontend/src/services/user.ts#L13
TypeError: Cannot read properties of undefined (reading 'injectEndpoints')
❯ src/services/user.ts:13:21
❯ src/redux/authSlice.ts:2:31
|
src/pages/__tests__/ResetPassword.test.tsx:
frontend/src/features/authentication/ResetPasswordContext.tsx#L5
Error: [vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock
❯ src/features/authentication/ResetPasswordContext.tsx:5:31
❯ src/pages/__tests__/ResetPassword.test.tsx:43:25
Caused by: TypeError: Cannot read properties of undefined (reading 'injectEndpoints')
❯ src/services/user.ts:13:21
❯ src/redux/authSlice.ts:2:31
|
src/features/authentication/__tests__/SignUpForm.test.tsx > <SignUpForm /> > displays loading spinner when token is loading:
frontend/src/features/authentication/__tests__/SignUpForm.test.tsx#L103
TestingLibraryElementError: Unable to find an accessible element with the role "progressbar"
Here are the accessible roles:
textbox:
Name "First name":
<input
aria-invalid="false"
autocomplete="username"
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="firstName"
name="firstName"
type="text"
value=""
/>
Name "Last name":
<input
aria-invalid="false"
autocomplete="username"
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="lastName"
name="lastName"
type="text"
value=""
/>
Name "Email address":
<input
aria-invalid="false"
autocomplete="username"
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="email"
name="email"
type="text"
value=""
/>
--------------------------------------------------
button:
Name "toggle password visibility":
<button
aria-label="toggle password visibility"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-edgeEnd MuiIconButton-sizeMedium css-1yq5fb3-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
type="button"
/>
Name "Sign up":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeLarge MuiButton-containedSizeLarge MuiButton-colorPrimary MuiButton-disableElevation MuiButton-fullWidth Mui-disabled MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeLarge MuiButton-containedSizeLarge MuiButton-colorPrimary MuiButton-disableElevation MuiButton-fullWidth css-13a105y-MuiButtonBase-root-MuiButton-root"
disabled=""
tabindex="-1"
type="submit"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<form
class="MuiStack-root css-o3b74m-MuiStack-root"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-outlined css-1qvw4ml-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="firstName"
id="firstName-label"
>
First name
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-dy9lmd-MuiInputBase-root-MuiOutlinedInput-root"
>
<input
aria-invalid="false"
autocomplete="username"
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="firstName"
name="firstName"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
class="MuiOutlinedInput-notchedOutline css-1d3z3hw-MuiOutlinedInput-notchedOutline"
>
<legend
class="css-yjsfm1"
>
<span>
First name
</span>
</legend>
</fieldset>
</div>
</div>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-outlined css-1qvw4ml-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="lastName"
id="lastNa
|
src/features/authentication/__tests__/SignUpForm.test.tsx > <SignUpForm /> > displays loading spinner when signing up as coordinator:
frontend/src/features/authentication/__tests__/SignUpForm.test.tsx#L117
TestingLibraryElementError: Unable to find an accessible element with the role "progressbar"
Here are the accessible roles:
textbox:
Name "First name":
<input
aria-invalid="false"
autocomplete="username"
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="firstName"
name="firstName"
type="text"
value=""
/>
Name "Last name":
<input
aria-invalid="false"
autocomplete="username"
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="lastName"
name="lastName"
type="text"
value=""
/>
Name "Email address":
<input
aria-invalid="false"
autocomplete="username"
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="email"
name="email"
type="text"
value=""
/>
--------------------------------------------------
button:
Name "toggle password visibility":
<button
aria-label="toggle password visibility"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-edgeEnd MuiIconButton-sizeMedium css-1yq5fb3-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
type="button"
/>
Name "Sign up":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeLarge MuiButton-containedSizeLarge MuiButton-colorPrimary MuiButton-disableElevation MuiButton-fullWidth Mui-disabled MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeLarge MuiButton-containedSizeLarge MuiButton-colorPrimary MuiButton-disableElevation MuiButton-fullWidth css-13a105y-MuiButtonBase-root-MuiButton-root"
disabled=""
tabindex="-1"
type="submit"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<form
class="MuiStack-root css-o3b74m-MuiStack-root"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-outlined css-1qvw4ml-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="firstName"
id="firstName-label"
>
First name
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-dy9lmd-MuiInputBase-root-MuiOutlinedInput-root"
>
<input
aria-invalid="false"
autocomplete="username"
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="firstName"
name="firstName"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
class="MuiOutlinedInput-notchedOutline css-1d3z3hw-MuiOutlinedInput-notchedOutline"
>
<legend
class="css-yjsfm1"
>
<span>
First name
</span>
</legend>
</fieldset>
</div>
</div>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-outlined css-1qvw4ml-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="lastName"
id="lastNa
|
test-frontend
Process completed with exit code 1.
|
test-api
Process completed with exit code 1.
|
test-api
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-python@v4. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|