Front fix permissions selection #51
ci.yml
on: pull_request
test
1m 13s
build
0s
sonarcloud
0s
Annotations
21 errors and 5 warnings
format
Process completed with exit code 1.
|
lint:
src/Components/SideBar/index.jsx#L13
'checkModule' is defined but never used
|
lint:
src/Components/SideBar/index.jsx#L22
'permissions' is assigned a value but never used
|
lint:
src/Pages/Protected/Permissions/permissionsHandler.jsx#L1
'React' is defined but never used
|
lint:
src/Pages/Protected/Permissions/permissionsHandler.jsx#L2
'axios' is defined but never used
|
lint:
src/Pages/Protected/Permissions/permissionsHandler.jsx#L4
'Search' is defined but never used
|
lint:
src/Pages/Protected/Permissions/permissionsHandler.jsx#L6
'getUser' is defined but never used
|
lint:
src/Pages/Protected/Permissions/permissionsHandler.jsx#L12
'setSearchQuery' is assigned a value but never used
|
lint:
src/Pages/Protected/Permissions/permissionsHandler.jsx#L13
'setSearch' is assigned a value but never used
|
lint:
src/Pages/Protected/Permissions/permissionsHandler.jsx#L59
'handleSearch' is assigned a value but never used
|
lint:
src/Pages/Protected/Permissions/permissionsHandler.jsx#L106
'index' is defined but never used
|
src/Routes/permissionProtect.test.jsx > PermissionProtect Component > should navigate to '/unauthorized' when user does not have permission:
src/Routes/permissionProtect.test.jsx#L75
TestingLibraryElementError: Unable to find an element with the text: Unauthorized. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div>
Protected Content
</div>
</div>
</body>
Ignored nodes: comments, script, style
<html>
<head />
<body>
<div>
<div>
Protected Content
</div>
</div>
</body>
</html>
❯ Proxy.waitForWrapper node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/wait-for.js:163:27
❯ src/Routes/permissionProtect.test.jsx:75:11
|
src/Routes/permissionProtect.test.jsx > PermissionProtect Component > should navigate to '/unauthorized' when user role is not defined:
src/Routes/permissionProtect.test.jsx#L83
TestingLibraryElementError: Unable to find an element with the text: Unauthorized. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div>
Protected Content
</div>
</div>
</body>
Ignored nodes: comments, script, style
<html>
<head />
<body>
<div>
<div>
Protected Content
</div>
</div>
</body>
</html>
❯ Proxy.waitForWrapper node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/wait-for.js:163:27
❯ src/Routes/permissionProtect.test.jsx:83:11
|
src/Utils/permissions.test.jsx > checkModule > should return false for non-existing module "profile":
src/Utils/permissions.test.jsx#L35
AssertionError: expected true to be false // Object.is equality
- Expected
+ Received
- false
+ true
❯ src/Utils/permissions.test.jsx:35:49
|
src/Utils/permissions.test.jsx > checkAction > should return true for action "read" in module "users":
src/Utils/permissions.test.jsx#L41
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ src/Utils/permissions.test.jsx:41:46
|
src/Utils/permissions.test.jsx > checkAction > should return true for action "write" in module "users":
src/Utils/permissions.test.jsx#L45
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ src/Utils/permissions.test.jsx:45:47
|
src/Utils/permissions.test.jsx > checkAction > should return true for action "read" in module "settings":
src/Utils/permissions.test.jsx#L49
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ src/Utils/permissions.test.jsx:49:46
|
src/Utils/permissions.test.jsx > checkAction > should return true for action "view" in module "dashboard":
src/Utils/permissions.test.jsx#L57
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ src/Utils/permissions.test.jsx:57:46
|
src/Utils/permissions.test.jsx > checkAction > should return true for action "edit" in module "dashboard":
src/Utils/permissions.test.jsx#L61
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ src/Utils/permissions.test.jsx:61:46
|
src/Pages/Protected/Supplier/UpdateSupplier/index.test.jsx > SupplierUpdate > validates form correctly before submitting:
src/Pages/Protected/Supplier/UpdateSupplier/index.test.jsx#L114
TestingLibraryElementError: Unable to find an element with the text: Salvar. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<section
class="container-benefits"
>
<div
class="forms-container-supplier"
>
<h1>
Visualização de fornecedor
</h1>
<h3>
Dados pessoais
</h3>
<div
class="MuiFormControl-root MuiTextField-root css-ami1jz-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled MuiFormLabel-colorPrimary Mui-disabled MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled css-e4w4as-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="field-nome/razão-social"
id="field-nome/razão-social-label"
>
Nome/Razão social
</label>
<div
class="MuiInputBase-root MuiFilledInput-root MuiFilledInput-underline MuiInputBase-colorPrimary Mui-disabled MuiInputBase-formControl css-batk84-MuiInputBase-root-MuiFilledInput-root"
>
<input
aria-invalid="false"
class="MuiInputBase-input MuiFilledInput-input Mui-disabled css-10botns-MuiInputBase-input-MuiFilledInput-input"
disabled=""
id="field-nome/razão-social"
type="text"
value=""
/>
</div>
</div>
<div
class="db-supplier"
>
<div
class="MuiFormControl-root css-2vnt94-MuiFormControl-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled css-e4w4as-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
id="label-Classificação de pessoa"
>
Classificação de pessoa
</label>
<div
class="MuiInputBase-root MuiFilledInput-root MuiFilledInput-underline MuiInputBase-colorPrimary MuiInputBase-formControl css-mck6no-MuiInputBase-root-MuiFilledInput-root-MuiSelect-root"
>
<div
aria-controls=":rk:"
aria-expanded="false"
aria-haspopup="listbox"
aria-labelledby="label-Classificação de pessoa select-Classificação de pessoa"
class="MuiSelect-select MuiSelect-filled MuiInputBase-input MuiFilledInput-input css-d9oaum-MuiSelect-select-MuiInputBase-input-MuiFilledInput-input"
id="select-Classificação de pessoa"
role="combobox"
tabindex="0"
>
<span
class="notranslate"
>
</span>
</div>
<input
aria-hidden="true"
aria-invalid="false"
class="MuiSelect-nativeInput css-yf8vq0-MuiSelect-nativeInput"
tabindex="-1"
value=""
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSelect-icon MuiSelect-iconFilled css-hfutr2-MuiSvgIcon-root-MuiSelect-icon"
data-testid="ArrowDropDownIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M7 10l5 5 5-5z"
/>
</svg>
</div>
</div>
<div
class="MuiFormCon
|
src/Pages/Protected/Supplier/UpdateSupplier/index.test.jsx > SupplierUpdate > deletes supplier correctly:
src/Pages/Protected/Supplier/UpdateSupplier/index.test.jsx#L179
TestingLibraryElementError: Unable to find an element with the text: Deletar. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<section
class="container-benefits"
>
<div
class="forms-container-supplier"
>
<h1>
Visualização de fornecedor
</h1>
<h3>
Dados pessoais
</h3>
<div
class="MuiFormControl-root MuiTextField-root css-ami1jz-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled MuiFormLabel-colorPrimary Mui-disabled MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled css-e4w4as-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="field-nome/razão-social"
id="field-nome/razão-social-label"
>
Nome/Razão social
</label>
<div
class="MuiInputBase-root MuiFilledInput-root MuiFilledInput-underline MuiInputBase-colorPrimary Mui-disabled MuiInputBase-formControl css-batk84-MuiInputBase-root-MuiFilledInput-root"
>
<input
aria-invalid="false"
class="MuiInputBase-input MuiFilledInput-input Mui-disabled css-10botns-MuiInputBase-input-MuiFilledInput-input"
disabled=""
id="field-nome/razão-social"
type="text"
value=""
/>
</div>
</div>
<div
class="db-supplier"
>
<div
class="MuiFormControl-root css-2vnt94-MuiFormControl-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled css-e4w4as-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
id="label-Classificação de pessoa"
>
Classificação de pessoa
</label>
<div
class="MuiInputBase-root MuiFilledInput-root MuiFilledInput-underline MuiInputBase-colorPrimary MuiInputBase-formControl css-mck6no-MuiInputBase-root-MuiFilledInput-root-MuiSelect-root"
>
<div
aria-controls=":r17:"
aria-expanded="false"
aria-haspopup="listbox"
aria-labelledby="label-Classificação de pessoa select-Classificação de pessoa"
class="MuiSelect-select MuiSelect-filled MuiInputBase-input MuiFilledInput-input css-d9oaum-MuiSelect-select-MuiInputBase-input-MuiFilledInput-input"
id="select-Classificação de pessoa"
role="combobox"
tabindex="0"
>
<span
class="notranslate"
>
</span>
</div>
<input
aria-hidden="true"
aria-invalid="false"
class="MuiSelect-nativeInput css-yf8vq0-MuiSelect-nativeInput"
tabindex="-1"
value=""
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSelect-icon MuiSelect-iconFilled css-hfutr2-MuiSvgIcon-root-MuiSelect-icon"
data-testid="ArrowDropDownIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M7 10l5 5 5-5z"
/>
</svg>
</div>
</div>
<div
class="MuiFormC
|
format
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
lint:
src/Pages/Protected/FinancialMovements/FinancialList/index.jsx#L47
React Hook useEffect has a missing dependency: 'storagedUser.token'. Either include it or remove the dependency array
|
lint:
src/Pages/Protected/MembershipRequests/index.jsx#L45
React Hook useEffect has a missing dependency: 'members'. Either include it or remove the dependency array
|
test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|