2022-06-16 21:31:13 +00:00
|
|
|
describe('process-groups', () => {
|
|
|
|
beforeEach(() => {
|
2022-07-29 18:44:57 +00:00
|
|
|
cy.login();
|
|
|
|
});
|
|
|
|
afterEach(() => {
|
|
|
|
cy.logout();
|
2022-06-16 21:31:13 +00:00
|
|
|
});
|
|
|
|
|
2022-06-20 18:45:15 +00:00
|
|
|
it('can perform crud operations', () => {
|
2022-06-27 16:29:14 +00:00
|
|
|
const uuid = () => Cypress._.random(0, 1e6);
|
|
|
|
const id = uuid();
|
2022-06-17 18:28:47 +00:00
|
|
|
const groupDisplayName = `Test Group 1 ${id}`;
|
2022-06-20 19:07:09 +00:00
|
|
|
const newGroupDisplayName = `${groupDisplayName} edited`;
|
2022-06-16 21:31:13 +00:00
|
|
|
const groupId = `test-group-1-${id}`;
|
2022-06-17 18:28:47 +00:00
|
|
|
cy.createGroup(groupId, groupDisplayName);
|
2022-06-16 21:31:13 +00:00
|
|
|
|
|
|
|
cy.contains('Home').click();
|
|
|
|
cy.contains(groupId);
|
2022-06-27 16:29:14 +00:00
|
|
|
cy.contains(groupId).click();
|
2022-06-16 21:31:13 +00:00
|
|
|
cy.url().should('include', `process-groups/${groupId}`);
|
|
|
|
cy.contains(`Process Group: ${groupId}`);
|
2022-06-20 18:45:15 +00:00
|
|
|
|
2022-06-20 19:07:09 +00:00
|
|
|
cy.contains('Edit process group').click();
|
|
|
|
cy.get('input[name=display_name]').clear().type(newGroupDisplayName);
|
|
|
|
cy.contains('Submit').click();
|
|
|
|
cy.contains(`Process Group: ${groupId}`);
|
|
|
|
|
|
|
|
cy.contains('Edit process group').click();
|
2022-06-27 16:29:14 +00:00
|
|
|
cy.get('input[name=display_name]').should(
|
|
|
|
'have.value',
|
|
|
|
newGroupDisplayName
|
|
|
|
);
|
2022-06-20 19:07:09 +00:00
|
|
|
|
2022-06-20 18:45:15 +00:00
|
|
|
cy.contains('Delete Process Group').click();
|
|
|
|
cy.url().should('include', `process-groups`);
|
|
|
|
cy.contains(groupId).should('not.exist');
|
2022-06-27 16:29:14 +00:00
|
|
|
});
|
2022-06-16 21:31:13 +00:00
|
|
|
|
|
|
|
it('can paginate items', () => {
|
2022-06-20 18:45:15 +00:00
|
|
|
cy.basicPaginationTest();
|
2022-06-27 16:29:14 +00:00
|
|
|
});
|
|
|
|
});
|