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}`);
|
|
|
|
|
|
|
|
cy.contains('Edit process group').click();
|
|
|
|
cy.get('input[name=display_name]').clear().type(newGroupDisplayName);
|
|
|
|
cy.contains('Submit').click();
|
|
|
|
cy.contains(`Process Group: ${newGroupDisplayName}`);
|
|
|
|
|
|
|
|
cy.contains('Edit process group').click();
|
|
|
|
cy.get('input[name=display_name]').should(
|
|
|
|
'have.value',
|
|
|
|
newGroupDisplayName
|
|
|
|
);
|
|
|
|
|
2022-11-04 21:37:32 +00:00
|
|
|
cy.contains('Delete').click();
|
2022-10-12 14:21:49 +00:00
|
|
|
cy.contains('Are you sure');
|
2022-11-04 19:07:40 +00:00
|
|
|
cy.getBySel('modal-confirmation-dialog').find('.cds--btn--danger').click();
|
2022-10-12 14:21:49 +00:00
|
|
|
cy.url().should('include', `process-groups`);
|
|
|
|
cy.contains(groupId).should('not.exist');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('can paginate items', () => {
|
|
|
|
cy.basicPaginationTest();
|
|
|
|
});
|
|
|
|
});
|