2022-06-16 17:31:13 -04:00
|
|
|
describe('process-groups', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.visit('/');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('can create a new group and navigate there', () => {
|
|
|
|
const uuid = () => Cypress._.random(0, 1e6)
|
|
|
|
const id = uuid()
|
2022-06-17 14:28:47 -04:00
|
|
|
const groupDisplayName = `Test Group 1 ${id}`;
|
2022-06-16 17:31:13 -04:00
|
|
|
const groupId = `test-group-1-${id}`;
|
2022-06-17 14:28:47 -04:00
|
|
|
cy.createGroup(groupId, groupDisplayName);
|
2022-06-16 17:31:13 -04:00
|
|
|
|
|
|
|
cy.contains('Home').click();
|
|
|
|
cy.contains(groupId);
|
|
|
|
cy.contains(groupId).click()
|
|
|
|
cy.url().should('include', `process-groups/${groupId}`);
|
|
|
|
cy.contains(`Process Group: ${groupId}`);
|
|
|
|
})
|
|
|
|
|
|
|
|
it('can paginate items', () => {
|
|
|
|
cy.get("#pagination-page-dropdown")
|
|
|
|
.type("typing_to_open_dropdown_box....FIXME")
|
|
|
|
.find('.dropdown-item')
|
|
|
|
.contains(/^2$/)
|
|
|
|
.click();
|
|
|
|
|
|
|
|
cy.contains(/^1-2 of \d+$/);
|
|
|
|
cy.getBySel("pagination-next-button").click();
|
|
|
|
cy.contains(/^3-4 of \d+$/);
|
|
|
|
cy.getBySel("pagination-previous-button").click();
|
|
|
|
cy.contains(/^1-2 of \d+$/);
|
|
|
|
})
|
|
|
|
})
|