Merge remote-tracking branch 'origin/main' into feature/store_boundary_events_properly
This commit is contained in:
commit
5ca0452588
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"project_id": "18606",
|
||||||
|
"SPIFFWORKFLOW_FRONTEND_USERNAME": "core-a1.contributor",
|
||||||
|
"SPIFFWORKFLOW_FRONTEND_PASSWORD": "core-a1.contributor",
|
||||||
|
"requestor_username": "core-a1.contributor",
|
||||||
|
"requestor_password": "core-a1.contributor",
|
||||||
|
"budgetowner_username": "fluffy.project-lead",
|
||||||
|
"budgetowner_password": "fluffy.project-lead",
|
||||||
|
"peopleopssme_username": "peopleops.partner-a1.sme",
|
||||||
|
"peopleopssme_password": "peopleops.partner-a1.sme",
|
||||||
|
"ppgbasme_username": "ppg.ba-a1.sme",
|
||||||
|
"ppgbasme_password": "ppg.ba-a1.sme",
|
||||||
|
"securitysme_username": "security-a1.sme",
|
||||||
|
"securitysme_password": "security-a1.sme",
|
||||||
|
"infrasme_username": "infra-a1.sme",
|
||||||
|
"infrasme_password": "infra-a1.sme",
|
||||||
|
"legalsme_username": "legal-a1.sme",
|
||||||
|
"legalsme_password": "legal-a1.sme",
|
||||||
|
"SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK": true
|
||||||
|
}
|
|
@ -0,0 +1,856 @@
|
||||||
|
const submitWithUser = (
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
processInstanceId,
|
||||||
|
expectAdditionalApprovalInfoPage = false,
|
||||||
|
approvaltype
|
||||||
|
) => {
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.log('========Login with : ', username);
|
||||||
|
cy.log('========processInstanceId: ', processInstanceId);
|
||||||
|
cy.login(username, password);
|
||||||
|
|
||||||
|
cy.wait(1000);
|
||||||
|
cy.log('=======visit find by id : ');
|
||||||
|
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();
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
// approve!
|
||||||
|
if (approvaltype === "approve") {
|
||||||
|
cy.get('#root > label:nth-child(1)').click();
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type(username.concat(' is approving this.'));
|
||||||
|
} else if (approvaltype === "reject") {
|
||||||
|
cy.get('#root > label:nth-child(3)').click();
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type(username.concat(' is rejecting this.'));
|
||||||
|
} else if (approvaltype === "needmoreinfo") {
|
||||||
|
cy.get('#root > label:nth-child(2)').click();
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type(username.concat(' needs additional info. A software license is a document that provides legally binding guidelines for the use and distribution of software.Software licenses typically provide end users with the right to END.'));
|
||||||
|
} else if (approvaltype === "providemoreinfo") {
|
||||||
|
//Form 1
|
||||||
|
cy.contains('Task: Submit New Demand Request Details', { timeout: 60000 });
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
//Form 2
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
//Form 3
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 });
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').clear().type('Providing additional info. It\’s free and easy to post a job. Simply fill in a title, description and budget and competitive bids come within minutes. No job is too big or too small. We\'ve got people for jobs of any size.');
|
||||||
|
|
||||||
|
cy.contains('Submit the Request').click();
|
||||||
|
cy.get('input[value="Submit the Request"]').click();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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.wait(2000);
|
||||||
|
cy.logout();
|
||||||
|
cy.wait(2000);
|
||||||
|
};
|
||||||
|
|
||||||
|
//Consulting Fees Path - Without Files
|
||||||
|
describe('Consulting Fees Path - Without Files', () => {
|
||||||
|
Cypress._.times(5, () => {
|
||||||
|
//Budget owner approves the request
|
||||||
|
it('Budget owner approves', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('consult_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Consulting ==== Management consulting includes a broad range of activities, and the many firms and their members often define these practices quite differently. One way to categorize the activities is in terms of the professional’s area of expertise.');
|
||||||
|
cy.get('#root_criticality').select('High');
|
||||||
|
cy.get('#root_period').clear().type('2025-12-25');
|
||||||
|
cy.get('#root_vendor').clear().type('Embassar');
|
||||||
|
cy.get('#root_payment_method').select('Bank Transfer');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
//item 0
|
||||||
|
cy.get('#root_0_sub_category').select('ambassadors');
|
||||||
|
cy.get('#root_0_item').clear().type('An ambassador is an official envoy, especially a high-ranking diplomat who represents a state.');
|
||||||
|
cy.get('#root_0_qty').clear().type('4');
|
||||||
|
cy.get('#root_0_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_0_currency').select('ETH');
|
||||||
|
cy.get('#root_0_unit_price').type('1.15');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 1
|
||||||
|
cy.get('#root_1_sub_category').select('consultants');
|
||||||
|
cy.get('#root_1_item').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
|
||||||
|
cy.get('#root_1_qty').clear().type('1');
|
||||||
|
cy.get('#root_1_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_1_currency').select('CAD');
|
||||||
|
cy.get('#root_1_unit_price').type('1355');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 2
|
||||||
|
cy.get('#root_2_sub_category').select('freelancers');
|
||||||
|
cy.get('#root_2_item').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
|
||||||
|
cy.get('#root_2_qty').clear().type('6');
|
||||||
|
cy.get('#root_2_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_2_currency').select('SNT');
|
||||||
|
cy.get('#root_2_unit_price').type('2300');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('For professionals working in the professional services, \‘consultant\’ and advisor\’ are often used and fall under common terminology. Consultancy.uk zooms in on this field to get a closer look. \n https://www.consultancy.uk/career/what-is-consulting');
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
'Task: Reminder: Request Additional Budget',
|
||||||
|
"approve"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Budget owner rejects the request
|
||||||
|
it('Budget owner rejects', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('consult_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Consulting is defined as the practise of providing a third party with expertise on a matter in exchange for a fee. The service may involve either advisory or implementation services.');
|
||||||
|
cy.get('#root_criticality').select('Medium');
|
||||||
|
cy.get('#root_period').clear().type('2024-10-02');
|
||||||
|
cy.get('#root_vendor').clear().type('Consultancy.uk');
|
||||||
|
cy.get('#root_payment_method').select('Crypto Transfer');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
|
||||||
|
//Item 0
|
||||||
|
cy.get('#root_0_sub_category').select('consultants');
|
||||||
|
cy.get('#root_0_item').clear().type('Software development consultants with Python background');
|
||||||
|
cy.get('#root_0_qty').clear().type('5');
|
||||||
|
cy.get('#root_0_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_0_currency').select('DAI');
|
||||||
|
cy.get('#root_0_unit_price').type('1500');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 1
|
||||||
|
cy.get('#root_1_sub_category').select('consultants');
|
||||||
|
cy.get('#root_1_item').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
|
||||||
|
cy.get('#root_1_qty').clear().type('1');
|
||||||
|
cy.get('#root_1_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_1_currency').select('CAD');
|
||||||
|
cy.get('#root_1_unit_price').type('1355');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 2
|
||||||
|
cy.get('#root_2_sub_category').select('freelancers');
|
||||||
|
cy.get('#root_2_item').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
|
||||||
|
cy.get('#root_2_qty').clear().type('6');
|
||||||
|
cy.get('#root_2_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_2_currency').select('SNT');
|
||||||
|
cy.get('#root_2_unit_price').type('2300');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('For professionals working in the professional services, ‘consultant’ and advisor’ are often used and fall under common terminology. Consultancy.uk zooms in on this field to get a closer look. \n https://www.consultancy.uk/career/what-is-consulting');
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"reject"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Budget owner request for additional details
|
||||||
|
it('Budget owner need more info', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('consult_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Freelancing - Freelancing is doing specific work for clients without committing to full-time employment. Freelancers often take on multiple projects with different clients simultaneously. IRS considers freelancers to be self-employed individuals.');
|
||||||
|
cy.get('#root_criticality').select('Low');
|
||||||
|
cy.get('#root_period').clear().type('2025-04-15');
|
||||||
|
cy.get('#root_vendor').clear().type('Upwork');
|
||||||
|
cy.get('#root_payment_method').select('Debit Card');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
|
||||||
|
//item 0
|
||||||
|
cy.get('#root_0_sub_category').select('freelancers');
|
||||||
|
cy.get('#root_0_item').clear().type('Freelancers to do the Python development and front end react app development');
|
||||||
|
cy.get('#root_0_qty').clear().type('4');
|
||||||
|
cy.get('#root_0_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_0_currency').select('SNT');
|
||||||
|
cy.get('#root_0_unit_price').type('1750');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 1
|
||||||
|
cy.get('#root_1_sub_category').select('consultants');
|
||||||
|
cy.get('#root_1_item').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
|
||||||
|
cy.get('#root_1_qty').clear().type('1');
|
||||||
|
cy.get('#root_1_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_1_currency').select('CAD');
|
||||||
|
cy.get('#root_1_unit_price').type('1355');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 2
|
||||||
|
cy.get('#root_2_sub_category').select('freelancers');
|
||||||
|
cy.get('#root_2_item').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
|
||||||
|
cy.get('#root_2_qty').clear().type('6');
|
||||||
|
cy.get('#root_2_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_2_currency').select('SNT');
|
||||||
|
cy.get('#root_2_unit_price').type('2300');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('It\’s free and easy to post a job. Simply fill in a title, description and budget and competitive bids come within minutes. No job is too big or too small. We\'ve got freelancers for jobs of any size or budget across 1800 skills. No job is too complex.');
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"needmoreinfo"
|
||||||
|
);
|
||||||
|
|
||||||
|
//requestor sending additional info
|
||||||
|
submitWithUser(
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"providemoreinfo"
|
||||||
|
);
|
||||||
|
|
||||||
|
//budget owner approves second time
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
'Task: Reminder: Request Additional Budget',
|
||||||
|
"approve"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Consulting Fees Path - With Files
|
||||||
|
describe('Consulting Fees Path - With Files', () => {
|
||||||
|
Cypress._.times(1, () => {
|
||||||
|
//Budget owner approves the request
|
||||||
|
it('Budget owner approves', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('consult_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Consulting ==== Management consulting includes a broad range of activities, and the many firms and their members often define these practices quite differently. One way to categorize the activities is in terms of the professional’s area of expertise.');
|
||||||
|
cy.get('#root_criticality').select('High');
|
||||||
|
cy.get('#root_period').clear().type('2025-12-25');
|
||||||
|
cy.get('#root_vendor').clear().type('Embassar');
|
||||||
|
cy.get('#root_payment_method').select('Bank Transfer');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
|
||||||
|
//item 0
|
||||||
|
cy.get('#root_0_sub_category').select('ambassadors');
|
||||||
|
cy.get('#root_0_item').clear().type('An ambassador is an official envoy, especially a high-ranking diplomat who represents a state.');
|
||||||
|
cy.get('#root_0_qty').clear().type('4');
|
||||||
|
cy.get('#root_0_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_0_currency').select('ETH');
|
||||||
|
cy.get('#root_0_unit_price').type('1.15');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 1
|
||||||
|
cy.get('#root_1_sub_category').select('consultants');
|
||||||
|
cy.get('#root_1_item').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
|
||||||
|
cy.get('#root_1_qty').clear().type('1');
|
||||||
|
cy.get('#root_1_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_1_currency').select('CAD');
|
||||||
|
cy.get('#root_1_unit_price').type('1355');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 2
|
||||||
|
cy.get('#root_2_sub_category').select('freelancers');
|
||||||
|
cy.get('#root_2_item').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
|
||||||
|
cy.get('#root_2_qty').clear().type('6');
|
||||||
|
cy.get('#root_2_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_2_currency').select('SNT');
|
||||||
|
cy.get('#root_2_unit_price').type('2300');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('For professionals working in the professional services, ‘consultant’ and advisor’ are often used and fall under common terminology. Consultancy.uk zooms in on this field to get a closer look. \n https://www.consultancy.uk/career/what-is-consulting');
|
||||||
|
|
||||||
|
cy.get("input[type=file]")
|
||||||
|
.attachFile(['lorem-ipsum.pdf', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
'Task: Reminder: Request Additional Budget',
|
||||||
|
"approve"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Budget owner rejects the request
|
||||||
|
it('Budget owner rejects', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('consult_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Consulting is defined as the practise of providing a third party with expertise on a matter in exchange for a fee. The service may involve either advisory or implementation services.');
|
||||||
|
cy.get('#root_criticality').select('Medium');
|
||||||
|
cy.get('#root_period').clear().type('2024-10-02');
|
||||||
|
cy.get('#root_vendor').clear().type('Consultancy.uk');
|
||||||
|
cy.get('#root_payment_method').select('Crypto Transfer');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
|
||||||
|
//item 0
|
||||||
|
cy.get('#root_0_sub_category').select('consultants');
|
||||||
|
cy.get('#root_0_item').clear().type('Software development consultants with Python background');
|
||||||
|
cy.get('#root_0_qty').clear().type('5');
|
||||||
|
cy.get('#root_0_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_0_currency').select('DAI');
|
||||||
|
cy.get('#root_0_unit_price').type('1500');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 1
|
||||||
|
cy.get('#root_1_sub_category').select('consultants');
|
||||||
|
cy.get('#root_1_item').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
|
||||||
|
cy.get('#root_1_qty').clear().type('1');
|
||||||
|
cy.get('#root_1_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_1_currency').select('CAD');
|
||||||
|
cy.get('#root_1_unit_price').type('1355');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 2
|
||||||
|
cy.get('#root_2_sub_category').select('freelancers');
|
||||||
|
cy.get('#root_2_item').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
|
||||||
|
cy.get('#root_2_qty').clear().type('6');
|
||||||
|
cy.get('#root_2_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_2_currency').select('SNT');
|
||||||
|
cy.get('#root_2_unit_price').type('2300');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('For professionals working in the professional services, ‘consultant’ and advisor’ are often used and fall under common terminology. Consultancy.uk zooms in on this field to get a closer look. \n https://www.consultancy.uk/career/what-is-consulting');
|
||||||
|
|
||||||
|
cy.get("input[type=file]")
|
||||||
|
.attachFile(['lorem-ipsum.pdf', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"reject"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Budget owner request for additional details
|
||||||
|
it('Budget owner need more info', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('consult_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Freelancing - Freelancing is doing specific work for clients without committing to full-time employment. Freelancers often take on multiple projects with different clients simultaneously. IRS considers freelancers to be self-employed individuals.');
|
||||||
|
cy.get('#root_criticality').select('Low');
|
||||||
|
cy.get('#root_period').clear().type('2025-04-15');
|
||||||
|
cy.get('#root_vendor').clear().type('Upwork');
|
||||||
|
cy.get('#root_payment_method').select('Debit Card');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
//item 0
|
||||||
|
cy.get('#root_0_sub_category').select('freelancers');
|
||||||
|
cy.get('#root_0_item').clear().type('Freelancers to do the Python development and front end react app development');
|
||||||
|
cy.get('#root_0_qty').clear().type('4');
|
||||||
|
cy.get('#root_0_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_0_currency').select('SNT');
|
||||||
|
cy.get('#root_0_unit_price').type('1750');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 1
|
||||||
|
cy.get('#root_1_sub_category').select('consultants');
|
||||||
|
cy.get('#root_1_item').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
|
||||||
|
cy.get('#root_1_qty').clear().type('1');
|
||||||
|
cy.get('#root_1_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_1_currency').select('CAD');
|
||||||
|
cy.get('#root_1_unit_price').type('1355');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 2
|
||||||
|
cy.get('#root_2_sub_category').select('freelancers');
|
||||||
|
cy.get('#root_2_item').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
|
||||||
|
cy.get('#root_2_qty').clear().type('6');
|
||||||
|
cy.get('#root_2_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_2_currency').select('SNT');
|
||||||
|
cy.get('#root_2_unit_price').type('2300');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('It\’s free and easy to post a job. Simply fill in a title, description and budget and competitive bids come within minutes. No job is too big or too small. We\'ve got freelancers for jobs of any size or budget across 1800 skills. No job is too complex.');
|
||||||
|
|
||||||
|
cy.get("input[type=file]")
|
||||||
|
.attachFile(['lorem-ipsum.pdf', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"needmoreinfo"
|
||||||
|
);
|
||||||
|
|
||||||
|
//requestor sending additional info
|
||||||
|
submitWithUser(
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"providemoreinfo"
|
||||||
|
);
|
||||||
|
|
||||||
|
//budget owner approves second time
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
'Task: Reminder: Request Additional Budget',
|
||||||
|
"approve"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,744 @@
|
||||||
|
const submitWithUser = (
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
processInstanceId,
|
||||||
|
expectAdditionalApprovalInfoPage = false,
|
||||||
|
approvaltype
|
||||||
|
) => {
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.log('========Login with : ', username);
|
||||||
|
cy.log('========processInstanceId: ', processInstanceId);
|
||||||
|
cy.login(username, password);
|
||||||
|
|
||||||
|
cy.wait(1000);
|
||||||
|
cy.log('=======visit find by id : ');
|
||||||
|
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();
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
// approve!
|
||||||
|
if (approvaltype === "approve") {
|
||||||
|
cy.get('#root > label:nth-child(1)').click();
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type(username.concat(' is approving this.'));
|
||||||
|
} else if (approvaltype === "reject") {
|
||||||
|
cy.get('#root > label:nth-child(3)').click();
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type(username.concat(' is rejecting this.'));
|
||||||
|
} else if (approvaltype === "needmoreinfo") {
|
||||||
|
cy.get('#root > label:nth-child(2)').click();
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type(username.concat(' needs additional info. Coworking is not only about providing a physical place, but also about establishing a community. Its rapid growth has been seen as a possible way for city planners to address.'));
|
||||||
|
} else if (approvaltype === "providemoreinfo") {
|
||||||
|
//Form 1
|
||||||
|
cy.contains('Task: Submit New Demand Request Details', { timeout: 60000 });
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
//Form 2
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
//Form 3
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 });
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').clear().type('Providing additional info. Coworking tends to fall into two sides: Those that are real-estate-centric (all about selling desks and offices first) while others are community-centric (focused on building community that happens to also have offices)');
|
||||||
|
|
||||||
|
cy.contains('Submit the Request').click();
|
||||||
|
cy.get('input[value="Submit the Request"]').click();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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.wait(2000);
|
||||||
|
cy.logout();
|
||||||
|
cy.wait(2000);
|
||||||
|
};
|
||||||
|
|
||||||
|
describe('Other Fees Path - Without Files', () => {
|
||||||
|
|
||||||
|
Cypress._.times(1, () => {
|
||||||
|
//Budget owner approves the request
|
||||||
|
it('Budget owner approves', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('other_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Other Fees and Expenses means, collectively, all fees and expenses payable to Lenders under the Loan Documents, other than principal, interest and default interest/penalty amounts.');
|
||||||
|
cy.get('#root_criticality').select('High');
|
||||||
|
cy.get('#root_period').clear().type('2025-11-25');
|
||||||
|
cy.get('#root_vendor').clear().type('ABC CO');
|
||||||
|
cy.get('#root_payment_method').select('Reimbursement');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
//item 0
|
||||||
|
cy.get('#root_0_sub_category').select('bounties');
|
||||||
|
cy.get('#root_0_item').clear().type('A bounty is a payment or reward of money to locate');
|
||||||
|
cy.get('#root_0_qty').clear().type('2');
|
||||||
|
cy.get('#root_0_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_0_currency').select('AUD');
|
||||||
|
cy.get('#root_0_unit_price').type('2416');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 1
|
||||||
|
cy.get('#root_1_sub_category').select('coworking');
|
||||||
|
cy.get('#root_1_item').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
|
||||||
|
cy.get('#root_1_qty').clear().type('1');
|
||||||
|
cy.get('#root_1_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_1_currency').select('SNT');
|
||||||
|
cy.get('#root_1_unit_price').type('1355');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('For professionals working in the professional services, ‘consultant’ and advisor’ are often used and fall under common terminology. Consultancy.uk zooms in on this field to get a closer look. \n https://www.consultancy.uk/career/what-is-consulting');
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
'Task: Reminder: Request Additional Budget',
|
||||||
|
"approve"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Budget owner rejects the request
|
||||||
|
it('Budget owner rejects', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('other_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Other Fees and Expenses means, collectively, all fees and expenses payable to Lenders under the Loan Documents, other than principal, interest and default interest/penalty amounts.');
|
||||||
|
cy.get('#root_criticality').select('Medium');
|
||||||
|
cy.get('#root_period').clear().type('2024-02-06');
|
||||||
|
cy.get('#root_vendor').clear().type('CO-WORK ENG');
|
||||||
|
cy.get('#root_payment_method').select('Bank Transfer');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
cy.get('#root_0_sub_category').select('coworking');
|
||||||
|
cy.get('#root_0_item').clear().type('Coworking is an arrangement in which workers for different companies share an office space');
|
||||||
|
cy.get('#root_0_qty').clear().type('5');
|
||||||
|
cy.get('#root_0_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_0_currency').select('EUR');
|
||||||
|
cy.get('#root_0_unit_price').type('250');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('For professionals working in the professional services, ‘consultant’ and advisor’ are often used and fall under common terminology. Consultancy.uk zooms in on this field to get a closer look. \n https://www.consultancy.uk/career/what-is-consulting');
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"reject"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Budget owner request for additional details
|
||||||
|
it('Budget owner need more info', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('other_fees');
|
||||||
|
cy.get('#root_purpose').clear().type(' It allows cost savings and convenience through the use of common infrastructures, such as equipment, utilities and receptionist and custodial services, and in some cases refreshments and parcel services.\nhttps://en.wikipedia.org/wiki/Coworking');
|
||||||
|
cy.get('#root_criticality').select('Low');
|
||||||
|
cy.get('#root_period').clear().type('2025-02-25');
|
||||||
|
cy.get('#root_vendor').clear().type('Bounty Co');
|
||||||
|
cy.get('#root_payment_method').select('Crypto Transfer');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
cy.get('#root_0_sub_category').select('bounties');
|
||||||
|
cy.get('#root_0_item').clear().type('Coworking is not only about providing a physical place, but also about establishing a community.');
|
||||||
|
cy.get('#root_0_qty').clear().type('4');
|
||||||
|
cy.get('#root_0_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_0_currency').select('SNT');
|
||||||
|
cy.get('#root_0_unit_price').type('450');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('It\’s free and easy to post a job. Simply fill in a title, description and budget and competitive bids come within minutes. No job is too big or too small. We\'ve got freelancers for jobs of any size or budget across 1800 skills. No job is too complex.');
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"needmoreinfo"
|
||||||
|
);
|
||||||
|
|
||||||
|
//requestor sending additional info
|
||||||
|
submitWithUser(
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"providemoreinfo"
|
||||||
|
);
|
||||||
|
|
||||||
|
//budget owner approves second time
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
'Task: Reminder: Request Additional Budget',
|
||||||
|
"approve"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Other Fees Path - With Files', () => {
|
||||||
|
|
||||||
|
Cypress._.times(1, () => {
|
||||||
|
//Budget owner approves the request
|
||||||
|
it('Budget owner approves', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('other_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('It allows cost savings and convenience through the use of common infrastructures, such as equipment, utilities and receptionist and custodial services, and in some cases refreshments and parcel acceptance services');
|
||||||
|
cy.get('#root_criticality').select('High');
|
||||||
|
cy.get('#root_period').clear().type('2025-11-25');
|
||||||
|
cy.get('#root_vendor').clear().type('Embassar');
|
||||||
|
cy.get('#root_payment_method').select('Reimbursement');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
//item 0
|
||||||
|
cy.get('#root_0_sub_category').select('bounties');
|
||||||
|
cy.get('#root_0_item').clear().type('A bounty is a payment or reward of money to locate');
|
||||||
|
cy.get('#root_0_qty').clear().type('2');
|
||||||
|
cy.get('#root_0_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_0_currency').select('AUD');
|
||||||
|
cy.get('#root_0_unit_price').type('2416');
|
||||||
|
|
||||||
|
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||||
|
|
||||||
|
//item 1
|
||||||
|
cy.get('#root_1_sub_category').select('coworking');
|
||||||
|
cy.get('#root_1_item').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
|
||||||
|
cy.get('#root_1_qty').clear().type('1');
|
||||||
|
cy.get('#root_1_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_1_currency').select('DAI');
|
||||||
|
cy.get('#root_1_unit_price').type('4250');
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('For professionals working in the professional services, ‘consultant’ and advisor’ are often used and fall under common terminology. Consultancy.uk zooms in on this field to get a closer look. \n https://www.consultancy.uk/career/what-is-consulting');
|
||||||
|
|
||||||
|
cy.get("input[type=file]")
|
||||||
|
.attachFile(['lorem-ipsum.pdf', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
'Task: Reminder: Request Additional Budget',
|
||||||
|
"approve"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Budget owner rejects the request
|
||||||
|
it('Budget owner rejects', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('other_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('Other Fees and Expenses means, collectively, all fees and expenses payable to Lenders under the Loan Documents, other than principal, interest and default interest/penalty amounts.');
|
||||||
|
cy.get('#root_criticality').select('Medium');
|
||||||
|
cy.get('#root_period').clear().type('2024-02-06');
|
||||||
|
cy.get('#root_vendor').clear().type('CO-WORK ENG');
|
||||||
|
cy.get('#root_payment_method').select('Bank Transfer');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
cy.get('#root_0_sub_category').select('coworking');
|
||||||
|
cy.get('#root_0_item').clear().type('Coworking is not only about providing a physical place, but also about establishing a community');
|
||||||
|
cy.get('#root_0_qty').clear().type('5');
|
||||||
|
cy.get('#root_0_currency_type').select('Fiat');
|
||||||
|
cy.get('#root_0_currency').select('EUR');
|
||||||
|
cy.get('#root_0_unit_price').type('250');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('For professionals working in the professional services, ‘consultant’ and advisor’ are often used and fall under common terminology. Consultancy.uk zooms in on this field to get a closer look. \n https://www.consultancy.uk/career/what-is-consulting');
|
||||||
|
|
||||||
|
cy.get("input[type=file]")
|
||||||
|
.attachFile(['lorem-ipsum.pdf', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"reject"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Budget owner request for additional details
|
||||||
|
it('Budget owner need more info', () => {
|
||||||
|
let username = Cypress.env('requestor_username');
|
||||||
|
let password = Cypress.env('requestor_password');
|
||||||
|
cy.log('=====username : ' + username);
|
||||||
|
cy.log('=====password : ' + password);
|
||||||
|
|
||||||
|
cy.login(username, password);
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Start New +').click();
|
||||||
|
cy.contains('Raise New Demand Request');
|
||||||
|
|
||||||
|
cy.runPrimaryBpmnFile(true);
|
||||||
|
|
||||||
|
cy.contains('Please select the type of request to start the process.');
|
||||||
|
// wait a second to ensure we can click the radio button
|
||||||
|
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get('input#root-procurement').click();
|
||||||
|
cy.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Submit a new demand request for the procurement of needed items',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
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.log('==###############===processInstanceId : ', processInstanceId);
|
||||||
|
let projectId = Cypress.env('project_id');
|
||||||
|
cy.get('#root_project').select(projectId);
|
||||||
|
cy.get('#root_category').select('other_fees');
|
||||||
|
cy.get('#root_purpose').clear().type('It allows cost savings and convenience through the use of common infrastructures, such as equipment, utilities and receptionist and custodial services, and in some cases refreshments and parcel services.\nhttps://en.wikipedia.org/wiki/Coworking');
|
||||||
|
cy.get('#root_criticality').select('Low');
|
||||||
|
cy.get('#root_period').clear().type('2025-02-25');
|
||||||
|
cy.get('#root_vendor').clear().type('BOUNTY');
|
||||||
|
cy.get('#root_payment_method').select('Crypto Transfer');
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||||
|
cy.get('#root_0_sub_category').select('bounties');
|
||||||
|
cy.get('#root_0_item').clear().type('Coworking is distinct from business accelerators, business incubators, and executive suites.');
|
||||||
|
cy.get('#root_0_qty').clear().type('4');
|
||||||
|
cy.get('#root_0_currency_type').select('Crypto');
|
||||||
|
cy.get('#root_0_currency').select('SNT');
|
||||||
|
cy.get('#root_0_unit_price').type('450');
|
||||||
|
|
||||||
|
|
||||||
|
cy.get('button')
|
||||||
|
.contains(/^Submit$/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.contains(
|
||||||
|
'Review and provide any supporting information or files for your request.',
|
||||||
|
{ timeout: 60000 }
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('.cds--text-area__wrapper').find('#root').type('It\’s free and easy to post a job. Simply fill in a title, description and budget and competitive bids come within minutes. No job is too big or too small. We\'ve got freelancers for jobs of any size or budget across 1800 skills. No job is too complex.');
|
||||||
|
|
||||||
|
cy.get("input[type=file]")
|
||||||
|
.attachFile(['lorem-ipsum.pdf', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
let budgetOwnerUsername = Cypress.env('budgetowner_username');
|
||||||
|
let budgetOwnerPassword = Cypress.env('budgetowner_password');
|
||||||
|
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
|
||||||
|
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
|
||||||
|
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"needmoreinfo"
|
||||||
|
);
|
||||||
|
|
||||||
|
//requestor sending additional info
|
||||||
|
submitWithUser(
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
processInstanceId,
|
||||||
|
null,
|
||||||
|
"providemoreinfo"
|
||||||
|
);
|
||||||
|
|
||||||
|
//budget owner approves second time
|
||||||
|
submitWithUser(
|
||||||
|
budgetOwnerUsername,
|
||||||
|
budgetOwnerPassword,
|
||||||
|
processInstanceId,
|
||||||
|
'Task: Reminder: Request Additional Budget',
|
||||||
|
"approve"
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 5.0 MiB |
Binary file not shown.
After Width: | Height: | Size: 5.0 MiB |
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
|
||||||
|
<bpmn:process id="Process_o8prjc6" isExecutable="true">
|
||||||
|
<bpmn:startEvent id="StartEvent_1">
|
||||||
|
<bpmn:outgoing>Flow_1wvr4fo</bpmn:outgoing>
|
||||||
|
</bpmn:startEvent>
|
||||||
|
<bpmn:sequenceFlow id="Flow_1wvr4fo" sourceRef="StartEvent_1" targetRef="Activity_021jb39" />
|
||||||
|
<bpmn:endEvent id="Event_1hpucme">
|
||||||
|
<bpmn:incoming>Flow_14wkay5</bpmn:incoming>
|
||||||
|
</bpmn:endEvent>
|
||||||
|
<bpmn:sequenceFlow id="Flow_03aokn9" sourceRef="Activity_021jb39" targetRef="Activity_06y4ypg" />
|
||||||
|
<bpmn:serviceTask id="Activity_021jb39">
|
||||||
|
<bpmn:extensionElements>
|
||||||
|
<spiffworkflow:serviceTaskOperator id="waku/SendMessage" resultVariable="the_var">
|
||||||
|
<spiffworkflow:parameters>
|
||||||
|
<spiffworkflow:parameter id="message" type="str" value=""TETING FROM TEST"" />
|
||||||
|
<spiffworkflow:parameter id="message_type" type="str" value=""wakuext_sendOneToOneMessage"" />
|
||||||
|
<spiffworkflow:parameter id="recipient" type="str" value="["0x04a4209153d1df6e531102f2e98e16ec85fbcb8c563c2f8fcd2737626d1963ced9d17581a8dad7c90c1ab60b0bf56279e5b19ea3147b6b1a147e002cd96e42b294"]" />
|
||||||
|
</spiffworkflow:parameters>
|
||||||
|
</spiffworkflow:serviceTaskOperator>
|
||||||
|
</bpmn:extensionElements>
|
||||||
|
<bpmn:incoming>Flow_1wvr4fo</bpmn:incoming>
|
||||||
|
<bpmn:outgoing>Flow_03aokn9</bpmn:outgoing>
|
||||||
|
</bpmn:serviceTask>
|
||||||
|
<bpmn:sequenceFlow id="Flow_14wkay5" sourceRef="Activity_06y4ypg" targetRef="Event_1hpucme" />
|
||||||
|
<bpmn:manualTask id="Activity_06y4ypg">
|
||||||
|
<bpmn:incoming>Flow_03aokn9</bpmn:incoming>
|
||||||
|
<bpmn:outgoing>Flow_14wkay5</bpmn:outgoing>
|
||||||
|
</bpmn:manualTask>
|
||||||
|
</bpmn:process>
|
||||||
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||||
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_o8prjc6">
|
||||||
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||||
|
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Event_1hpucme_di" bpmnElement="Event_1hpucme">
|
||||||
|
<dc:Bounds x="812" y="159" width="36" height="36" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Activity_12tj4p6_di" bpmnElement="Activity_021jb39">
|
||||||
|
<dc:Bounds x="270" y="137" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Activity_0rbl68g_di" bpmnElement="Activity_06y4ypg">
|
||||||
|
<dc:Bounds x="530" y="137" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_1wvr4fo_di" bpmnElement="Flow_1wvr4fo">
|
||||||
|
<di:waypoint x="215" y="177" />
|
||||||
|
<di:waypoint x="270" y="177" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_03aokn9_di" bpmnElement="Flow_03aokn9">
|
||||||
|
<di:waypoint x="370" y="177" />
|
||||||
|
<di:waypoint x="530" y="177" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_14wkay5_di" bpmnElement="Flow_14wkay5">
|
||||||
|
<di:waypoint x="630" y="177" />
|
||||||
|
<di:waypoint x="812" y="177" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
</bpmndi:BPMNPlane>
|
||||||
|
</bpmndi:BPMNDiagram>
|
||||||
|
</bpmn:definitions>
|
|
@ -1,6 +1,7 @@
|
||||||
import { string } from 'prop-types';
|
import { string } from 'prop-types';
|
||||||
import { modifyProcessIdentifierForPathParam } from '../../src/helpers';
|
import { modifyProcessIdentifierForPathParam } from '../../src/helpers';
|
||||||
import { miscDisplayName } from './helpers';
|
import { miscDisplayName } from './helpers';
|
||||||
|
import 'cypress-file-upload';
|
||||||
|
|
||||||
// ***********************************************
|
// ***********************************************
|
||||||
// This example commands.js shows you how to
|
// This example commands.js shows you how to
|
||||||
|
@ -102,8 +103,9 @@ Cypress.Commands.add(
|
||||||
(expectAutoRedirectToHumanTask = false) => {
|
(expectAutoRedirectToHumanTask = false) => {
|
||||||
// cy.getBySel('start-process-instance').click();
|
// cy.getBySel('start-process-instance').click();
|
||||||
// click on button with text Start
|
// click on button with text Start
|
||||||
|
//cy.get('button')
|
||||||
cy.get('button')
|
// cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/new-demand-request-procurement > div > button')
|
||||||
|
cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/raise-new-demand-request > div > button')
|
||||||
.contains(/^Start$/)
|
.contains(/^Start$/)
|
||||||
.click();
|
.click();
|
||||||
if (expectAutoRedirectToHumanTask) {
|
if (expectAutoRedirectToHumanTask) {
|
||||||
|
|
|
@ -72,6 +72,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
||||||
"@typescript-eslint/parser": "^5.30.6",
|
"@typescript-eslint/parser": "^5.30.6",
|
||||||
"cypress": "^12",
|
"cypress": "^12",
|
||||||
|
"cypress-file-upload": "^5.0.8",
|
||||||
"eslint": "^8.19.0",
|
"eslint": "^8.19.0",
|
||||||
"eslint_d": "^12.2.0",
|
"eslint_d": "^12.2.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
|
@ -10024,6 +10025,18 @@
|
||||||
"node": "^14.0.0 || ^16.0.0 || >=18.0.0"
|
"node": "^14.0.0 || ^16.0.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/cypress-file-upload": {
|
||||||
|
"version": "5.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz",
|
||||||
|
"integrity": "sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.2.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"cypress": ">3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cypress-plugin-config": {
|
"node_modules/cypress-plugin-config": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/cypress-plugin-config/-/cypress-plugin-config-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/cypress-plugin-config/-/cypress-plugin-config-1.2.0.tgz",
|
||||||
|
@ -39829,6 +39842,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"cypress-file-upload": {
|
||||||
|
"version": "5.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz",
|
||||||
|
"integrity": "sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {}
|
||||||
|
},
|
||||||
"cypress-plugin-config": {
|
"cypress-plugin-config": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/cypress-plugin-config/-/cypress-plugin-config-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/cypress-plugin-config/-/cypress-plugin-config-1.2.0.tgz",
|
||||||
|
|
|
@ -108,6 +108,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
||||||
"@typescript-eslint/parser": "^5.30.6",
|
"@typescript-eslint/parser": "^5.30.6",
|
||||||
"cypress": "^12",
|
"cypress": "^12",
|
||||||
|
"cypress-file-upload": "^5.0.8",
|
||||||
"eslint": "^8.19.0",
|
"eslint": "^8.19.0",
|
||||||
"eslint_d": "^12.2.0",
|
"eslint_d": "^12.2.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
|
|
Loading…
Reference in New Issue