some updates for NDR PP1 w/ burnettk

This commit is contained in:
jasquat 2023-05-12 11:05:35 -04:00
parent 8e3597e930
commit 46f4350f9e
7 changed files with 7835 additions and 7112 deletions

File diff suppressed because it is too large Load Diff

View File

@ -27,16 +27,26 @@ const submitWithUser = (
cy.wait(2000);
// approve!
if (approvaltype === "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('.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('.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") {
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 Details', { timeout: 60000 });
cy.get('button')
@ -48,20 +58,20 @@ const submitWithUser = (
.contains(/^Submit$/)
.click(); */
// Form 3
cy.contains(
'Task: Review the Request',
{ timeout: 60000 });
cy.contains('Task: Review the 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.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();
@ -72,7 +82,6 @@ const submitWithUser = (
cy.get('button')
.contains(/^Continue$/)
.click();
}
cy.visit('/');
@ -86,14 +95,13 @@ const submitWithUser = (
};
describe.only('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);
const username = Cypress.env('requestor_username');
const password = Cypress.env('requestor_password');
cy.log(`=====username : ${username}`);
cy.log(`=====password : ${password}`);
cy.login(username, password);
cy.visit('/');
@ -116,10 +124,7 @@ describe.only('Other Fees Path - Without Files', () => {
.click();
*/
cy.contains(
'Request Goods or Services',
{ timeout: 60000 }
);
cy.contains('Request Goods or Services', { timeout: 60000 });
// cy.wait(5000);
cy.url().then((currentUrl) => {
@ -127,11 +132,15 @@ describe.only('Other Fees Path - Without Files', () => {
// extract the digits after /tasks
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
const projectId = Cypress.env('project_id');
cy.wait(2000);
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_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('25-11-2025');
cy.get('body').click();
@ -145,24 +154,28 @@ describe.only('Other Fees Path - Without Files', () => {
*/
// item 0
cy.get('#root_item_0_sub_category').select('bounties');
cy.get('#root_item_0_item_name').clear().type('A bounty is a payment or reward of money to locate');
cy.get('#root_item_0_item_name')
.clear()
.type('A bounty is a payment or reward of money to locate');
cy.get('#root_item_0_qty').clear().type('2');
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('2416');
cy.get('#root_item > div:nth-child(3) > p > button').click();
// item 1
cy.get('#root_item_1_sub_category').select('coworking');
cy.get('#root_item_1_item_name').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
cy.get('#root_item_1_item_name')
.clear()
.type(
'A consultant (from Latin: consultare "to deliberate") is a professional'
);
cy.get('#root_item_1_qty').clear().type('1');
cy.get('#root_item_1_currency_type').select('Crypto');
cy.get('#root_item_1_currency').select('SNT');
cy.get('#root_item_1_unit_price').type('1355');
cy.get('button')
.contains(/^Submit$/)
.click();
@ -172,18 +185,20 @@ describe.only('Other Fees Path - Without Files', () => {
{ 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('.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.get('button')
.contains(/^Return to Home$/)
.click();
@ -192,28 +207,27 @@ describe.only('Other Fees Path - Without Files', () => {
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
const budgetOwnerUsername = Cypress.env('budgetowner_username');
const budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log(`=====budgetOwnerUsername : ${budgetOwnerUsername}`);
cy.log(`=====budgetOwnerPassword : ${budgetOwnerPassword}`);
submitWithUser(
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Check Existing Budget',
"approve"
'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);
const username = Cypress.env('requestor_username');
const password = Cypress.env('requestor_password');
cy.log(`=====username : ${username}`);
cy.log(`=====password : ${password}`);
cy.login(username, password);
cy.visit('/');
@ -236,10 +250,7 @@ describe.only('Other Fees Path - Without Files', () => {
.click();
*/
cy.contains(
'Request Goods or Services',
{ timeout: 60000 }
);
cy.contains('Request Goods or Services', { timeout: 60000 });
// cy.wait(5000);
cy.url().then((currentUrl) => {
@ -247,11 +258,15 @@ describe.only('Other Fees Path - Without Files', () => {
// extract the digits after /tasks
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
const projectId = Cypress.env('project_id');
cy.wait(2000);
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_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('24-02-2036');
cy.get('body').click();
@ -264,13 +279,16 @@ describe.only('Other Fees Path - Without Files', () => {
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
*/
cy.get('#root_item_0_sub_category').select('coworking');
cy.get('#root_item_0_item_name').clear().type('Coworking is an arrangement in which workers for different companies share an office space');
cy.get('#root_item_0_item_name')
.clear()
.type(
'Coworking is an arrangement in which workers for different companies share an office space'
);
cy.get('#root_item_0_qty').clear().type('5');
cy.get('#root_item_0_currency_type').select('Fiat');
cy.get('#root_item_0_currency').select('EUR');
cy.get('#root_item_0_unit_price').type('250');
cy.get('button')
.contains(/^Submit$/)
.click();
@ -280,13 +298,16 @@ describe.only('Other Fees Path - Without Files', () => {
{ 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('.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();
@ -299,28 +320,27 @@ describe.only('Other Fees Path - Without Files', () => {
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
const budgetOwnerUsername = Cypress.env('budgetowner_username');
const budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log(`=====budgetOwnerUsername : ${budgetOwnerUsername}`);
cy.log(`=====budgetOwnerPassword : ${budgetOwnerPassword}`);
submitWithUser(
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
null,
"reject"
'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);
const username = Cypress.env('requestor_username');
const password = Cypress.env('requestor_password');
cy.log(`=====username : ${username}`);
cy.log(`=====password : ${password}`);
cy.login(username, password);
cy.visit('/');
@ -343,10 +363,7 @@ describe.only('Other Fees Path - Without Files', () => {
.click();
*/
cy.contains(
'Request Goods or Services',
{ timeout: 60000 }
);
cy.contains('Request Goods or Services', { timeout: 60000 });
// cy.wait(5000);
cy.url().then((currentUrl) => {
@ -354,11 +371,15 @@ describe.only('Other Fees Path - Without Files', () => {
// extract the digits after /tasks
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
const projectId = Cypress.env('project_id');
cy.wait(2000);
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_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('05-02-2025');
cy.get('body').click();
@ -371,13 +392,16 @@ describe.only('Other Fees Path - Without Files', () => {
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
*/
cy.get('#root_item_0_sub_category').select('bounties');
cy.get('#root_item_0_item_name').clear().type('Coworking is not only about providing a physical place, but also about establishing a community.');
cy.get('#root_item_0_item_name')
.clear()
.type(
'Coworking is not only about providing a physical place, but also about establishing a community.'
);
cy.get('#root_item_0_qty').clear().type('4');
cy.get('#root_item_0_currency_type').select('Crypto');
cy.get('#root_item_0_currency').select('SNT');
cy.get('#root_item_0_unit_price').type('450');
cy.get('button')
.contains(/^Submit$/)
.click();
@ -387,13 +411,16 @@ describe.only('Other Fees Path - Without Files', () => {
{ 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('.cds--text-area__wrapper')
.find('#root')
.type(
"Its 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();
@ -406,17 +433,17 @@ describe.only('Other Fees Path - Without Files', () => {
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
const budgetOwnerUsername = Cypress.env('budgetowner_username');
const budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log(`=====budgetOwnerUsername : ${budgetOwnerUsername}`);
cy.log(`=====budgetOwnerPassword : ${budgetOwnerPassword}`);
submitWithUser(
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
null,
"needmoreinfo"
'needmoreinfo'
);
// requestor sending additional info
@ -425,7 +452,7 @@ describe.only('Other Fees Path - Without Files', () => {
password,
processInstanceId,
null,
"providemoreinfo"
'providemoreinfo'
);
// budget owner approves second time
@ -434,24 +461,21 @@ describe.only('Other Fees Path - Without Files', () => {
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Check Existing Budget',
"approve"
'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);
const username = Cypress.env('requestor_username');
const password = Cypress.env('requestor_password');
cy.log(`=====username : ${username}`);
cy.log(`=====password : ${password}`);
cy.login(username, password);
cy.visit('/');
@ -474,10 +498,7 @@ describe('Other Fees Path - With Files', () => {
.click();
*/
cy.contains(
'Request Goods or Services',
{ timeout: 60000 }
);
cy.contains('Request Goods or Services', { timeout: 60000 });
// cy.wait(5000);
cy.url().then((currentUrl) => {
@ -485,11 +506,15 @@ describe('Other Fees Path - With Files', () => {
// extract the digits after /tasks
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
const projectId = Cypress.env('project_id');
cy.wait(2000);
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_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('15-11-2025');
cy.get('body').click();
@ -503,7 +528,9 @@ describe('Other Fees Path - With Files', () => {
*/
// item 0
cy.get('#root_item_0_sub_category').select('bounties');
cy.get('#root_item_0_item_name').clear().type('A bounty is a payment or reward of money to locate');
cy.get('#root_item_0_item_name')
.clear()
.type('A bounty is a payment or reward of money to locate');
cy.get('#root_item_0_qty').clear().type('2');
cy.get('#root_item_0_currency_type').select('Fiat');
cy.get('#root_item_0_currency').select('AUD');
@ -513,7 +540,11 @@ describe('Other Fees Path - With Files', () => {
// item 1
cy.get('#root_item_1_sub_category').select('coworking');
cy.get('#root_item_1_item_name').clear().type('A consultant (from Latin: consultare "to deliberate") is a professional');
cy.get('#root_item_1_item_name')
.clear()
.type(
'A consultant (from Latin: consultare "to deliberate") is a professional'
);
cy.get('#root_item_1_qty').clear().type('1');
cy.get('#root_item_1_currency_type').select('Crypto');
cy.get('#root_item_1_currency').select('DAI');
@ -528,47 +559,59 @@ describe('Other Fees Path - With Files', () => {
{ 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('.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('#root > div:nth-child(3) > p > button').click();
cy.get("input[type=file]")
.attachFile(['lorem-ipsum.pdf']);
cy.get('input[type=file]').attachFile(['lorem-ipsum.pdf']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['png-5mb-1.png']);
cy.get('input[type=file]').attachFile(['png-5mb-1.png']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['Free_Test_Data_1MB_PDF.pdf']);
cy.get('input[type=file]').attachFile(['Free_Test_Data_1MB_PDF.pdf']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(4) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(4) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.get('input[type=file]').attachFile(['sampletext.txt']);
cy.wait(2000);
@ -576,7 +619,6 @@ describe('Other Fees Path - With Files', () => {
// cy.get('input[value="Submit the Request"]').click();
cy.get('button')
.contains(/^Submit$/)
.click();
@ -590,28 +632,27 @@ describe('Other Fees Path - With Files', () => {
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
const budgetOwnerUsername = Cypress.env('budgetowner_username');
const budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log(`=====budgetOwnerUsername : ${budgetOwnerUsername}`);
cy.log(`=====budgetOwnerPassword : ${budgetOwnerPassword}`);
submitWithUser(
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Check Existing Budget',
"approve"
'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);
const username = Cypress.env('requestor_username');
const password = Cypress.env('requestor_password');
cy.log(`=====username : ${username}`);
cy.log(`=====password : ${password}`);
cy.login(username, password);
cy.visit('/');
@ -634,10 +675,7 @@ describe('Other Fees Path - With Files', () => {
.click();
*/
cy.contains(
'Request Goods or Services',
{ timeout: 60000 }
);
cy.contains('Request Goods or Services', { timeout: 60000 });
// cy.wait(5000);
cy.url().then((currentUrl) => {
@ -645,11 +683,15 @@ describe('Other Fees Path - With Files', () => {
// extract the digits after /tasks
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
const projectId = Cypress.env('project_id');
cy.wait(2000);
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_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('20-02-2026');
cy.get('body').click();
@ -662,13 +704,16 @@ describe('Other Fees Path - With Files', () => {
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
*/
cy.get('#root_item_0_sub_category').select('coworking');
cy.get('#root_item_0_item_name').clear().type('Coworking is not only about providing a physical place, but also about establishing a community');
cy.get('#root_item_0_item_name')
.clear()
.type(
'Coworking is not only about providing a physical place, but also about establishing a community'
);
cy.get('#root_item_0_qty').clear().type('5');
cy.get('#root_item_0_currency_type').select('Fiat');
cy.get('#root_item_0_currency').select('EUR');
cy.get('#root_item_0_unit_price').type('250');
cy.get('button')
.contains(/^Submit$/)
.click();
@ -678,47 +723,59 @@ describe('Other Fees Path - With Files', () => {
{ 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('.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('#root > div:nth-child(3) > p > button').click();
cy.get("input[type=file]")
.attachFile(['lorem-ipsum.pdf']);
cy.get('input[type=file]').attachFile(['lorem-ipsum.pdf']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['png-5mb-1.png']);
cy.get('input[type=file]').attachFile(['png-5mb-1.png']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['Free_Test_Data_1MB_PDF.pdf']);
cy.get('input[type=file]').attachFile(['Free_Test_Data_1MB_PDF.pdf']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(4) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(4) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.get('input[type=file]').attachFile(['sampletext.txt']);
cy.wait(2000);
@ -726,7 +783,6 @@ describe('Other Fees Path - With Files', () => {
// cy.get('input[value="Submit the Request"]').click();
cy.get('button')
.contains(/^Submit$/)
.click();
@ -740,28 +796,27 @@ describe('Other Fees Path - With Files', () => {
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
const budgetOwnerUsername = Cypress.env('budgetowner_username');
const budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log(`=====budgetOwnerUsername : ${budgetOwnerUsername}`);
cy.log(`=====budgetOwnerPassword : ${budgetOwnerPassword}`);
submitWithUser(
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
null,
"reject"
'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);
const username = Cypress.env('requestor_username');
const password = Cypress.env('requestor_password');
cy.log(`=====username : ${username}`);
cy.log(`=====password : ${password}`);
cy.login(username, password);
cy.visit('/');
@ -784,10 +839,7 @@ describe('Other Fees Path - With Files', () => {
.click();
*/
cy.contains(
'Request Goods or Services',
{ timeout: 60000 }
);
cy.contains('Request Goods or Services', { timeout: 60000 });
// cy.wait(5000);
cy.url().then((currentUrl) => {
@ -795,11 +847,15 @@ describe('Other Fees Path - With Files', () => {
// extract the digits after /tasks
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
const projectId = Cypress.env('project_id');
cy.wait(2000);
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_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('12-02-2025');
cy.get('body').click();
@ -812,13 +868,16 @@ describe('Other Fees Path - With Files', () => {
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
*/
cy.get('#root_item_0_sub_category').select('bounties');
cy.get('#root_item_0_item_name').clear().type('Coworking is distinct from business accelerators, business incubators, and executive suites.');
cy.get('#root_item_0_item_name')
.clear()
.type(
'Coworking is distinct from business accelerators, business incubators, and executive suites.'
);
cy.get('#root_item_0_qty').clear().type('4');
cy.get('#root_item_0_currency_type').select('Crypto');
cy.get('#root_item_0_currency').select('SNT');
cy.get('#root_item_0_unit_price').type('450');
cy.get('button')
.contains(/^Submit$/)
.click();
@ -828,47 +887,59 @@ describe('Other Fees Path - With Files', () => {
{ 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('.cds--text-area__wrapper')
.find('#root')
.type(
"Its 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('#root > div:nth-child(3) > p > button').click();
cy.get("input[type=file]")
.attachFile(['lorem-ipsum.pdf']);
cy.get('input[type=file]').attachFile(['lorem-ipsum.pdf']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['png-5mb-1.png']);
cy.get('input[type=file]').attachFile(['png-5mb-1.png']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['Free_Test_Data_1MB_PDF.pdf']);
cy.get('input[type=file]').attachFile(['Free_Test_Data_1MB_PDF.pdf']);
cy.wait(1000);
cy.get('#root > div:nth-child(3) > p > button').click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(4) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(4) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(3) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get('#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg').click();
cy.get(
'#root > div.row.array-item-list > div:nth-child(2) > div > div.cds--sm\\:col-span-1.cds--md\\:col-span-1.cds--lg\\:col-span-1.cds--css-grid-column > div > div > button.btn.btn-default.array-item-move-up > svg'
).click();
cy.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.get('input[type=file]').attachFile(['sampletext.txt']);
cy.wait(2000);
@ -876,7 +947,6 @@ describe('Other Fees Path - With Files', () => {
// cy.get('input[value="Submit the Request"]').click();
cy.get('button')
.contains(/^Submit$/)
.click();
@ -890,17 +960,17 @@ describe('Other Fees Path - With Files', () => {
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log('=====budgetOwnerUsername : ' + budgetOwnerUsername);
cy.log('=====budgetOwnerPassword : ' + budgetOwnerPassword);
const budgetOwnerUsername = Cypress.env('budgetowner_username');
const budgetOwnerPassword = Cypress.env('budgetowner_password');
cy.log(`=====budgetOwnerUsername : ${budgetOwnerUsername}`);
cy.log(`=====budgetOwnerPassword : ${budgetOwnerPassword}`);
submitWithUser(
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
null,
"needmoreinfo"
'needmoreinfo'
);
// requestor sending additional info
@ -909,7 +979,7 @@ describe('Other Fees Path - With Files', () => {
password,
processInstanceId,
null,
"providemoreinfo"
'providemoreinfo'
);
// budget owner approves second time
@ -918,11 +988,9 @@ describe('Other Fees Path - With Files', () => {
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Check Existing Budget',
"approve"
'approve'
);
});
});
});
});

View File

@ -119,7 +119,11 @@ export default function ProcessInterstitial() {
) {
return (
<div style={{ padding: '10px 0 0 0' }}>
<Button kind="secondary" onClick={() => navigate(`/tasks`)}>
<Button
kind="secondary"
data-qa="return-to-home-button"
onClick={() => navigate(`/tasks`)}
>
Return to Home
</Button>
</div>