Skip to content

Commit

Permalink
Merge pull request #1739 from fhlavac/master
Browse files Browse the repository at this point in the history
fix: fix users-and-user-groups E2E
  • Loading branch information
fhlavac authored Jan 6, 2025
2 parents a1faf2a + 2a18540 commit 4680d91
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 3 deletions.
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
# 1.0.0 (2025-01-06)


### Bug Fixes

* **basename:** basename for workspaces is calculated incorrectly ([#1699](https://github.com/fhlavac/insights-rbac-ui/issues/1699)) ([113a38e](https://github.com/fhlavac/insights-rbac-ui/commit/113a38e4d3475e79252a0e931c203056d6e77359))
* **deploy:** correct quay repository in frontend config ([#1693](https://github.com/fhlavac/insights-rbac-ui/issues/1693)) ([1f433e9](https://github.com/fhlavac/insights-rbac-ui/commit/1f433e927df2f3febc5301cedb775bdbea21caa8))
* **deploy:** correct quay repository in frontend config ([#1693](https://github.com/fhlavac/insights-rbac-ui/issues/1693)) ([800fbb7](https://github.com/fhlavac/insights-rbac-ui/commit/800fbb7bf3efec362ac3f08e7a690b3982f2b4c3))
* fix typo and update snapshots ([67923e9](https://github.com/fhlavac/insights-rbac-ui/commit/67923e98223249eed39edcb5b4158d1a2d025d81))
* fix users-and-user-groups E2E ([14dcf89](https://github.com/fhlavac/insights-rbac-ui/commit/14dcf89a4ca61c4ae99255c328a62d74bc046b88))
* hide service accounts table for default admin access ([#1709](https://github.com/fhlavac/insights-rbac-ui/issues/1709)) ([1452179](https://github.com/fhlavac/insights-rbac-ui/commit/1452179da1a55c17c486aed55d23e3a1a7e48285))
* issues with merge commit ([84917d3](https://github.com/fhlavac/insights-rbac-ui/commit/84917d3caab81a7970f80f148d3f9252582eb746))
* **konflux:** add rpms check to pull requests ([#1691](https://github.com/fhlavac/insights-rbac-ui/issues/1691)) ([81d51ff](https://github.com/fhlavac/insights-rbac-ui/commit/81d51fffbabaf08a4fa3a7461d0bba31407d892d))
* **konflux:** add rpms check to pull requests ([#1691](https://github.com/fhlavac/insights-rbac-ui/issues/1691)) ([981c7ce](https://github.com/fhlavac/insights-rbac-ui/commit/981c7ceae4bc46143f703f666484e2cea4338469))
* **konflux:** remove duplicate name of task ([#1723](https://github.com/fhlavac/insights-rbac-ui/issues/1723)) ([991729a](https://github.com/fhlavac/insights-rbac-ui/commit/991729a25b0121bda9802c762cb707e3a4757aa2))
* **konflux:** remove sbom json check ([#1722](https://github.com/fhlavac/insights-rbac-ui/issues/1722)) ([9fe1bce](https://github.com/fhlavac/insights-rbac-ui/commit/9fe1bcefd693fa180631164c10c9bd28f51d91d3))
* **konflux:** update buildah image sha ([#1719](https://github.com/fhlavac/insights-rbac-ui/issues/1719)) ([7d637b8](https://github.com/fhlavac/insights-rbac-ui/commit/7d637b801e731a7f5a88fb97e4d9062b18412d7c))
* **konflux:** update oci-ta and rpms scan image dependencies ([#1720](https://github.com/fhlavac/insights-rbac-ui/issues/1720)) ([1b2cf81](https://github.com/fhlavac/insights-rbac-ui/commit/1b2cf8171fb64ce0f3417335dbfda54b4e988973))
* lint ([516279f](https://github.com/fhlavac/insights-rbac-ui/commit/516279f3aa346dcd01d8a66cd3aa0aa15a77f04b))
* localize name filter strings ([0832973](https://github.com/fhlavac/insights-rbac-ui/commit/0832973c09fe7962a3c09c638510fefb9b3b2f8c))
* memoize users row data ([60deb9b](https://github.com/fhlavac/insights-rbac-ui/commit/60deb9b76285d3b6899ebe59d8d849f92ae9a384))
* **permission:** unable to load more than 2 pages in permissions ([#1688](https://github.com/fhlavac/insights-rbac-ui/issues/1688)) ([f150391](https://github.com/fhlavac/insights-rbac-ui/commit/f150391edead6b54b4c8255706024a1f09126f49))
* **permission:** unable to load more than 2 pages in permissions ([#1688](https://github.com/fhlavac/insights-rbac-ui/issues/1688)) ([2d08c25](https://github.com/fhlavac/insights-rbac-ui/commit/2d08c25204ab35488a01c1c05cb51c942f244510))
* **release:** fix release ([04b5593](https://github.com/fhlavac/insights-rbac-ui/commit/04b55936a99c38324af6458877da86265185b2eb))
* remove mapStateToProps and mapDispatchToProps ([d9179d6](https://github.com/fhlavac/insights-rbac-ui/commit/d9179d636346c3cbb00401820254ed00ff88de41))
* remove withRouter decorators ([5b17ed2](https://github.com/fhlavac/insights-rbac-ui/commit/5b17ed29b8a56abd124257d11d62b033c930e45c))
* replace useRouteMatch with useParams ([d23a2a2](https://github.com/fhlavac/insights-rbac-ui/commit/d23a2a25469e821d41ac14bb70b396f43402db53))
* update snapshots; localize string ([24a5d42](https://github.com/fhlavac/insights-rbac-ui/commit/24a5d42bb235a1ddd9b3e13d486d6bd9abfbba75))
* upgrade utility classes to PF5 ([750a18a](https://github.com/fhlavac/insights-rbac-ui/commit/750a18a60cdeacbee029b70ff1e7920f7b83e8f3))
* **UserAccess:** make user access cards look selected ([#1727](https://github.com/fhlavac/insights-rbac-ui/issues/1727)) ([2e58c45](https://github.com/fhlavac/insights-rbac-ui/commit/2e58c458ec9d9e529a1c953a7f8b5b941871165e))


### Features

* add create user group to user group list ([#1713](https://github.com/fhlavac/insights-rbac-ui/issues/1713)) ([6c4cd82](https://github.com/fhlavac/insights-rbac-ui/commit/6c4cd824ac893aaf9b367f3a78865e2da26f3e00))
* add detailed view to Workspaces ([#1682](https://github.com/fhlavac/insights-rbac-ui/issues/1682)) ([2f1efc1](https://github.com/fhlavac/insights-rbac-ui/commit/2f1efc1fdff0cdd77972b479d3d5a12ad300c204))
* add empty state and loading state to Users & User Groups ([#1707](https://github.com/fhlavac/insights-rbac-ui/issues/1707)) ([92ea430](https://github.com/fhlavac/insights-rbac-ui/commit/92ea430d3c461f11fa2428588e687fde4cab55c4))
* **common-auth-model:** add mocked requests ([#1695](https://github.com/fhlavac/insights-rbac-ui/issues/1695)) ([966361c](https://github.com/fhlavac/insights-rbac-ui/commit/966361cb70c7bf4784d549a05d46eb43f82dfe59))
* **common-auth:** add it api to invite and edit users ([#1718](https://github.com/fhlavac/insights-rbac-ui/issues/1718)) ([0ac978c](https://github.com/fhlavac/insights-rbac-ui/commit/0ac978c95903f6a1a79cd82899f15cc405e56089))
* create add to user group modal ([0112379](https://github.com/fhlavac/insights-rbac-ui/commit/011237902147bd8f7c6e702bb58524016d353269))
* create delete user groups modal ([#1703](https://github.com/fhlavac/insights-rbac-ui/issues/1703)) ([ed28740](https://github.com/fhlavac/insights-rbac-ui/commit/ed2874000ab2e090d0244865ccafe58aed2a5252))
* create user details view ([53ccf7a](https://github.com/fhlavac/insights-rbac-ui/commit/53ccf7a6970e48ff7881a910c69370950a433899))
* **invite-users:** add invite users modal via data driven forms ([#1706](https://github.com/fhlavac/insights-rbac-ui/issues/1706)) ([98cb047](https://github.com/fhlavac/insights-rbac-ui/commit/98cb047b14ff13885d7ce2ea3f92cdccd5a7df49))
* **konflux:** enablet unit tests on Konflux ([#1656](https://github.com/fhlavac/insights-rbac-ui/issues/1656)) ([527b4d8](https://github.com/fhlavac/insights-rbac-ui/commit/527b4d89273077820459004049fbd16b79e42d2b))
* **rbac:** add access-requests ([#754](https://github.com/fhlavac/insights-rbac-ui/issues/754)) ([7fa22b0](https://github.com/fhlavac/insights-rbac-ui/commit/7fa22b0bd7ee61f09e266e09ac2691b1f011fd2f))
* **RolesTable:** add bulk Delete Roles button ([7985c1e](https://github.com/fhlavac/insights-rbac-ui/commit/7985c1ed304bc793218635294527ed5a2cf11f4a))
* **RolesTable:** add sorting and filtering ([0558e6e](https://github.com/fhlavac/insights-rbac-ui/commit/0558e6ef4908da00ff6bc0a3a8f07305003327cf))
* **rolestable:** delete roles modal ([#1696](https://github.com/fhlavac/insights-rbac-ui/issues/1696)) ([546a465](https://github.com/fhlavac/insights-rbac-ui/commit/546a465963ea395fdb9c776313687b464d92b816))
* show WS enable alert only if user can perform this action ([#1681](https://github.com/fhlavac/insights-rbac-ui/issues/1681)) ([b89b2d3](https://github.com/fhlavac/insights-rbac-ui/commit/b89b2d3467f34996a36e5bd1052688fa4f021648))
* **userstable:** add delete user modal ([814f7f1](https://github.com/fhlavac/insights-rbac-ui/commit/814f7f161c513f7fe3bfd95c4909f30e10c18f30))
* **workspaces:** enable overview if feature flag enabled ([#1683](https://github.com/fhlavac/insights-rbac-ui/issues/1683)) ([59fa607](https://github.com/fhlavac/insights-rbac-ui/commit/59fa60744a0fe99304f4cda2795c0a2120036c49))


### Reverts

* Revert "Do not send username when creating service account ([#1559](https://github.com/fhlavac/insights-rbac-ui/issues/1559))" ([#1560](https://github.com/fhlavac/insights-rbac-ui/issues/1560)) ([a310c88](https://github.com/fhlavac/insights-rbac-ui/commit/a310c885ab44d063e378393b75f161aa04670704))
* Revert "Revert "Do not send username when creating service account ([#1559](https://github.com/fhlavac/insights-rbac-ui/issues/1559))" ([#1560](https://github.com/fhlavac/insights-rbac-ui/issues/1560))" ([#1561](https://github.com/fhlavac/insights-rbac-ui/issues/1561)) ([38dc92f](https://github.com/fhlavac/insights-rbac-ui/commit/38dc92fea5c5cd4db8a3dd1cbfe90cce572656a1))

# [1.16.0](https://github.com/RedHatInsights/insights-rbac-ui/compare/v1.15.6...v1.16.0) (2025-01-02)


Expand Down
23 changes: 20 additions & 3 deletions cypress/e2e/users-and-user-groups.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,17 @@ describe('Users and User Groups page', () => {
});

it('should display the User groups table and correct data', () => {
cy.visit('/iam/access-management/users-and-user-groups/user-groups');
cy.wait('@getUserGroups', { timeout: 30000 });
cy.visit('/iam/access-management/users-and-user-groups');
cy.wait('@getUsers', { timeout: 30000 });

// Check if the table exists
cy.get('[data-ouia-component-id^="iam-users-table"]').should('exist');

cy.get('[data-ouia-component-id="user-groups-tab-button"]').should('exist');
cy.get('[data-ouia-component-id="user-groups-tab-button"]').click();

cy.wait('@getUserGroups', { timeout: 30000 });

cy.get('[data-ouia-component-id^="iam-user-groups-table"]').should('exist');

// Verify the data in the table matches the mock data
Expand All @@ -121,12 +123,18 @@ describe('Users and User Groups page', () => {
});

it('should be able to open Add User Modal once an active user is selected', () => {
cy.visit('/iam/access-management/users-and-user-groups');
cy.wait('@getUsers', { timeout: 30000 });

cy.get('[aria-label="Select row 0"]').click();
cy.get('[data-ouia-component-id="iam-users-table-add-user-button"]').click();
cy.get('[data-ouia-component-id="add-user-group-modal"]').should('be.visible');
});

it('can view user details when a user is clicked', () => {
cy.visit('/iam/access-management/users-and-user-groups');
cy.wait('@getUsers', { timeout: 30000 });

cy.get('[data-ouia-component-id="iam-users-table-table-tr-0"]').click();
cy.get('[data-ouia-component-id="user-details-drawer"]').should('be.visible');
cy.get('[data-ouia-component-id="user-details-drawer"]').contains(mockUsers.data[0].first_name).should('exist');
Expand All @@ -135,20 +143,29 @@ describe('Users and User Groups page', () => {
});

it('should be able to open Delete User Groups Modal from row actions', () => {
cy.visit('/iam/access-management/users-and-user-groups/user-groups');
cy.wait('@getUserGroups', { timeout: 30000 });

cy.get('[data-ouia-component-id="user-groups-tab-button"]').click();
cy.get('[data-ouia-component-id^="iam-user-groups-table-table-td-0-7"]').click();
cy.get('[data-ouia-component-id^="iam-user-groups-table-table-td-0-7"] button').contains('Delete user group').click();
cy.get('[data-ouia-component-id="iam-user-groups-table-remove-user-modal"]').should('be.visible');
});

it('should be able to open Delete User Groups modal from toolbar', () => {
cy.visit('/iam/access-management/users-and-user-groups/user-groups');
cy.wait('@getUserGroups', { timeout: 30000 });

cy.get('[data-ouia-component-id="user-groups-tab-button"]').click();
cy.get('[data-ouia-component-id^="iam-user-groups-table-table-tr-0"]').find('input[type="checkbox"]').click();
cy.get('[data-ouia-component-id="iam-user-groups-table-actions-dropdown-menu-control"]').click();
cy.get('[data-ouia-component-id="iam-user-groups-table-actions-dropdown-menu-control"] button').contains('Delete user group').click();
});

it('should be able to open the Create User Groups Wizard from the toolbar', () => {
it.only('should be able to open the Create User Groups Wizard from the toolbar', () => {
cy.visit('/iam/access-management/users-and-user-groups/user-groups');
cy.wait('@getUserGroups', { timeout: 30000 });

cy.get('[data-ouia-component-id="add-group-wizard"]').should('not.exist');
cy.get('[data-ouia-component-id="user-groups-tab-button"]').click();
cy.get('[data-ouia-component-id="iam-user-groups-table-actions-dropdown-action-0"]').click();
Expand Down
1 change: 1 addition & 0 deletions src/smart-components/group/add-group/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const schemaBuilder = (container, enableServiceAccounts, enableRoles) =>
inModal: true,
showTitles: true,
title: intl.formatMessage(messages.createGroup),
'data-ouia-component-id': 'add-group-wizard',
container,
fields: [
{
Expand Down

0 comments on commit 4680d91

Please sign in to comment.