Merge pull request #18 from fga-eps-mds/front_fix_permissions #55
ci.yml
on: push
test
1m 11s
build
0s
sonarcloud
0s
Annotations
21 errors and 5 warnings
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
|
format
Process completed with exit code 1.
|
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/Roles/RolesUpdatePage/index.test.jsx > RolesUpdatePage > renders correctly:
src/Pages/Protected/Roles/RolesUpdatePage/index.test.jsx#L44
TestingLibraryElementError: Unable to find an element with the text: Financeiro. 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"
>
<div
class="forms-container"
>
<h1>
Atualização de Perfil
</h1>
<h3>
Informações do Perfil
</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 MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled css-e4w4as-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="field-nome-do-perfil"
id="field-nome-do-perfil-label"
>
Nome do Perfil
</label>
<div
class="MuiInputBase-root MuiFilledInput-root MuiFilledInput-underline MuiInputBase-colorPrimary MuiInputBase-formControl css-batk84-MuiInputBase-root-MuiFilledInput-root"
>
<input
aria-invalid="false"
class="MuiInputBase-input MuiFilledInput-input css-10botns-MuiInputBase-input-MuiFilledInput-input"
id="field-nome-do-perfil"
type="text"
value=""
/>
</div>
</div>
<label
class="invalid"
>
Nome é um campo obrigatório!
</label>
<div
class="permission-list-box"
>
<h3>
Lista de Permissões
</h3>
<div
class="permissions-list"
/>
</div>
<div
class="double-buttons-roles"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary css-11sdlmy-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
>
DELETAR
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary css-1s5txyf-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
>
SALVAR
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
</div>
</div>
</section>
</div>
</body>
❯ Object.getElementError node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/config.js:37:19
❯ node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
❯ node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
❯ node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
❯ src/Pages/Protected/Roles/RolesUpdatePage/index.test.jsx:44:19
|
src/Pages/Protected/Roles/RolesUpdatePage/index.test.jsx > RolesUpdatePage > toggles checkboxes correctly:
src/Pages/Protected/Roles/RolesUpdatePage/index.test.jsx#L75
TestingLibraryElementError: Unable to find an element with the text: Financeiro. 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"
>
<div
class="forms-container"
>
<h1>
Atualização de Perfil
</h1>
<h3>
Informações do Perfil
</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 MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-filled css-e4w4as-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="field-nome-do-perfil"
id="field-nome-do-perfil-label"
>
Nome do Perfil
</label>
<div
class="MuiInputBase-root MuiFilledInput-root MuiFilledInput-underline MuiInputBase-colorPrimary MuiInputBase-formControl css-batk84-MuiInputBase-root-MuiFilledInput-root"
>
<input
aria-invalid="false"
class="MuiInputBase-input MuiFilledInput-input css-10botns-MuiInputBase-input-MuiFilledInput-input"
id="field-nome-do-perfil"
type="text"
value=""
/>
</div>
</div>
<label
class="invalid"
>
Nome é um campo obrigatório!
</label>
<div
class="permission-list-box"
>
<h3>
Lista de Permissões
</h3>
<div
class="permissions-list"
/>
</div>
<div
class="double-buttons-roles"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary css-11sdlmy-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
>
DELETAR
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary css-1s5txyf-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
>
SALVAR
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
</div>
</div>
</section>
</div>
</body>
❯ Object.getElementError node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/config.js:37:19
❯ node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
❯ node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
❯ node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
❯ src/Pages/Protected/Roles/RolesUpdatePage/index.test.jsx:75:31
|
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
|
format
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|