2022-10-12 14:21:49 +00:00
|
|
|
describe('process-groups', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.login();
|
|
|
|
});
|
|
|
|
afterEach(() => {
|
|
|
|
cy.logout();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('can perform crud operations', () => {
|
|
|
|
const uuid = () => Cypress._.random(0, 1e6);
|
|
|
|
const id = uuid();
|
|
|
|
const groupDisplayName = `Test Group 1 ${id}`;
|
|
|
|
const newGroupDisplayName = `${groupDisplayName} edited`;
|
|
|
|
const groupId = `test-group-1-${id}`;
|
|
|
|
cy.createGroup(groupId, groupDisplayName);
|
|
|
|
|
|
|
|
cy.contains('Process Groups').click();
|
|
|
|
cy.contains(groupDisplayName).click();
|
|
|
|
cy.url().should('include', `process-groups/${groupId}`);
|
|
|
|
cy.contains(`Process Group: ${groupDisplayName}`);
|
|
|
|
|
2022-11-23 14:38:45 +00:00
|
|
|
cy.getBySel('edit-process-group-button').click();
|
2023-11-09 19:59:35 +00:00
|
|
|
cy.wait(1000); // wait for the page to load before clearing the field
|
|
|
|
cy.getBySel('process-group-display-name-input').clear();
|
|
|
|
cy.getBySel('process-group-display-name-input').type(newGroupDisplayName);
|
2022-10-12 14:21:49 +00:00
|
|
|
cy.contains('Submit').click();
|
|
|
|
cy.contains(`Process Group: ${newGroupDisplayName}`);
|
|
|
|
|
2022-11-23 14:38:45 +00:00
|
|
|
cy.getBySel('delete-process-group-button').click();
|
2022-10-12 14:21:49 +00:00
|
|
|
cy.contains('Are you sure');
|
2022-11-21 21:58:39 +00:00
|
|
|
cy.getBySel('delete-process-group-button-modal-confirmation-dialog')
|
|
|
|
.find('.cds--btn--danger')
|
|
|
|
.click();
|
2022-10-12 14:21:49 +00:00
|
|
|
cy.url().should('include', `process-groups`);
|
2022-12-27 20:42:22 +00:00
|
|
|
cy.contains(newGroupDisplayName).should('not.exist');
|
|
|
|
|
|
|
|
// meaning the process group list page is loaded, so we can sign out safely without worrying about ajax requests failing
|
2023-02-16 17:09:44 +00:00
|
|
|
cy.getBySel('process-groups-loaded').should('exist');
|
2022-10-12 14:21:49 +00:00
|
|
|
});
|
|
|
|
|
2022-11-21 02:28:23 +00:00
|
|
|
// process groups no longer has pagination post-tiles
|
|
|
|
// it('can paginate items', () => {
|
|
|
|
// cy.basicPaginationTest();
|
|
|
|
// });
|
2022-10-12 14:21:49 +00:00
|
|
|
});
|