remove pilot cypress tests and update others for admin in path removal w/ burnettk

This commit is contained in:
jasquat 2023-09-25 16:03:46 -04:00
parent e9bd81d1cb
commit c3fdbc0f69
11 changed files with 3 additions and 19139 deletions

@ -172,7 +172,7 @@ describe('process-instances', () => {
});
it('can filter', () => {
cy.visit('/admin/process-instances/all');
cy.visit('/process-instances/all');
cy.contains('All Process Instances');
cy.get('.process-instance-list-row-variant-all');
cy.assertAtLeastOneItemInPaginatedResults();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,97 +0,0 @@
const approveWithUser = (
username,
processInstanceId,
expectAdditionalApprovalInfoPage = false,
password = null
) => {
if (!password) {
password = username;
}
cy.login(username, password);
cy.visit('/admin/process-instances/find-by-id');
cy.get('#process-instance-id-input').type(processInstanceId);
cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains('Tasks I can complete', { timeout: 60000 });
cy.get('.cds--btn').contains(/^Go$/).click();
// approve!
cy.get('#root-app').click();
cy.get('button')
.contains(/^Submit$/)
.click();
if (expectAdditionalApprovalInfoPage) {
cy.contains(expectAdditionalApprovalInfoPage, { timeout: 60000 });
cy.get('button')
.contains(/^Continue$/)
.click();
}
cy.location({ timeout: 60000 }).should((loc) => {
expect(loc.pathname).to.eq('/tasks');
});
cy.logout();
};
describe('pp1', () => {
it('can run PP1', () => {
cy.login('core-a1.contributor', 'core-a1.contributor');
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Request Goods/Services').click();
cy.runPrimaryBpmnFile(true);
cy.url().then((currentUrl) => {
// if url is "/tasks/8/d37c2f0f-016a-4066-b669-e0925b759560"
// extract the digits after /tasks
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.get('#root_project').select('18564');
cy.get('#root_category').select('soft_and_lic');
cy.get('#root_purpose').clear().type('need the software for my work');
cy.get('#root_criticality').select('High');
cy.get('#root_period').clear().type('2023-10-10');
cy.get('#root_vendor').clear().type('sartography');
cy.get('#root_payment_method').select('Bank Transfer');
cy.get('#root_project').select('18564');
cy.get('#root_category').select('soft_and_lic');
cy.get('#root_item_0_sub_category').select('op_src');
cy.get('#root_item_0_item_name').clear().type('spiffworkflow');
cy.get('#root_item_0_qty').clear().type('1');
cy.get('#root_item_0_currency_type').select('Fiat');
cy.get('#root_item_0_currency').select('AUD');
cy.get('#root_item_0_unit_price').type('100');
cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains(
'Review and provide any supporting information or files for your request.',
{ timeout: 60000 }
);
cy.contains('Submit the Request').click();
cy.get('input[value="Submit the Request"]').click();
cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.logout();
approveWithUser(
'infra.project-lead',
processInstanceId,
'Task: Reminder: Check Existing Budget',
'infra.project-leadx'
);
approveWithUser('ppg.ba-a1.sme', processInstanceId);
approveWithUser('security-a1.sme', processInstanceId);
approveWithUser(
'infra-a1.sme',
processInstanceId,
'Task: Update Application Landscape'
);
approveWithUser('legal-a1.sme', processInstanceId);
});
});
});

@ -38,11 +38,11 @@ Cypress.Commands.add('navigateToHome', () => {
});
Cypress.Commands.add('navigateToAdmin', () => {
cy.visit('/admin');
cy.visit('/process-groups');
});
Cypress.Commands.add('login', (username, password) => {
cy.visit('/admin');
cy.visit('/process-groups');
let usernameToUse = username;
let passwordToUse = password;
if (!usernameToUse) {