Skip to content

Commit

Permalink
ISPN-14698 create and delete role
Browse files Browse the repository at this point in the history
  • Loading branch information
karesti committed Oct 20, 2023
1 parent fb66451 commit e4e0b1a
Show file tree
Hide file tree
Showing 21 changed files with 857 additions and 227 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 18.18.0
node-version: 20.7.0
cache: 'npm'

- name: Install
Expand Down
21 changes: 21 additions & 0 deletions cypress/e2e/1_acess_management.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ describe('Global stats', () => {
cy.contains('admin');
cy.contains('Superuser');
});

it('successfully creates and removes a role', () => {
// create
cy.get('button[data-cy="createRoleButton"]').click();
cy.get("[aria-label=role-name-input]").type("aRole");
cy.get("[aria-label=role-description-input]").type("aRole description");
cy.get("[data-cy=dropdown-button-permissions").click();
cy.get("#select-multi-typeahead-ALL").click();
cy.get("[aria-label=Create]").click();
cy.contains('Role aRole has been created');
cy.contains('aRole description');

// remove
cy.get("[aria-label=aRole-menu]").click();
cy.get("[aria-label=deleteRole]").click();
cy.get("[aria-label=Delete]").click();
cy.contains('Role aRole has been deleted');
cy.contains('aRole description').should('not.exist');
});


});
120 changes: 60 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 10 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,22 @@
"webpack-merge": "^5.9.0"
},
"dependencies": {
"@patternfly/react-charts": "^7.0.0",
"@patternfly/react-code-editor": "^5.0.0",
"@patternfly/react-core": "^5.0.0",
"@patternfly/react-icons": "^5.0.0",
"@patternfly/react-charts": "^7.1.1",
"@patternfly/react-code-editor": "^5.1.0",
"@patternfly/react-core": "^5.1.1",
"@patternfly/react-icons": "^5.1.1",
"@patternfly/react-log-viewer": "^5.0.0",
"@patternfly/react-styles": "^5.0.0",
"@patternfly/react-table": "^5.0.0",
"@patternfly/react-tokens": "^5.0.0",
"i18next": "^23.4.4",
"@patternfly/react-styles": "^5.1.1",
"@patternfly/react-table": "^5.1.1",
"@patternfly/react-tokens": "^5.1.1",
"i18next": "^23.5.1",
"i18next-browser-languagedetector": "^7.1.0",
"i18next-http-backend": "^2.2.1",
"i18next-http-backend": "^2.2.2",
"keycloak-js": "^22.0.1",
"monaco-editor": "^0.34.0",
"numeral": "^2.0.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^13.0.3",
"react-monaco-editor": "^0.51.0",
"react-i18next": "^13.3.0",
"react-syntax-highlighter": "^15.5.0"
}
}
4 changes: 1 addition & 3 deletions src/app/AccessManagement/AccessManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ const AccessManager = () => {
setShowAccessControl(tabIndex == '1');
};
const buildTabs = () => {
const tabs: AccessTab[] = [
{ name: t('access-management.tab-roles'), key: '0' },
];
const tabs: AccessTab[] = [{ name: t('access-management.tab-roles'), key: '0' }];

return (
<Nav data-cy="navigationTabs" onSelect={handleTabClick} variant={'tertiary'}>
Expand Down
Loading

0 comments on commit e4e0b1a

Please sign in to comment.