merged in main and resolved conflicts w/ burnettk

This commit is contained in:
jasquat 2023-04-18 11:04:44 -04:00
commit 3c3dd6000c
15 changed files with 16106 additions and 14816 deletions

View File

@ -617,6 +617,10 @@ class ProcessInstanceReportService:
HumanTaskUserModel,
and_(HumanTaskUserModel.human_task_id == HumanTaskModel.id, HumanTaskUserModel.user_id == user.id),
)
if report_filter.has_active_status:
process_instance_query = process_instance_query.filter(
HumanTaskModel.completed.is_(False) # type: ignore
)
if report_filter.with_tasks_assigned_to_my_group is True:
group_model_join_conditions = [GroupModel.id == HumanTaskModel.lane_assignment_id]

View File

@ -82,9 +82,9 @@ const submitWithUser = (
//Consulting Fees Path - Without Files
describe('Consulting Fees Path - Without Files', () => {
Cypress._.times(5, () => {
Cypress._.times(1, () => {
//Budget owner approves the request
it('Budget owner approves', () => {
it.only('Budget owner approves', () => {
let username = Cypress.env('requestor_username');
let password = Cypress.env('requestor_password');
cy.log('=====username : ' + username);
@ -94,24 +94,25 @@ describe('Consulting Fees Path - Without Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -121,45 +122,47 @@ describe('Consulting Fees Path - Without Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
cy.wait(2000);
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 professionals area of expertise.');
cy.get('#root_criticality').select('High');
cy.get('#root_period').clear().type('2025-12-25');
cy.get('#root_period').clear().type('25-12-2025');
cy.get('body').click();
cy.get('#root_vendor').clear().type('Embassar');
cy.get('#root_payment_method').select('Bank Transfer');
cy.get('button')
/*cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
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_item_0_sub_category').select('ambassadors');
cy.get('#root_item_0_item_name').clear().type('An ambassador is an official envoy, especially a high-ranking diplomat who represents a state.');
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('ETH');
cy.get('#root_item_0_unit_price').type('1.15');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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_item_1_sub_category').select('consultants');
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('Fiat');
cy.get('#root_item_1_currency').select('CAD');
cy.get('#root_item_1_unit_price').type('1355');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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('#root_item_2_sub_category').select('freelancers');
cy.get('#root_item_2_item_name').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
cy.get('#root_item_2_qty').clear().type('6');
cy.get('#root_item_2_currency_type').select('Crypto');
cy.get('#root_item_2_currency').select('SNT');
cy.get('#root_item_2_unit_price').type('2300');
cy.get('button')
@ -183,8 +186,9 @@ describe('Consulting Fees Path - Without Files', () => {
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -195,7 +199,7 @@ describe('Consulting Fees Path - Without Files', () => {
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Request Additional Budget',
'Task: Reminder: Check Existing Budget',
"approve"
);
@ -213,24 +217,25 @@ describe('Consulting Fees Path - Without Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -240,46 +245,48 @@ describe('Consulting Fees Path - Without Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
cy.wait(2000);
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_period').clear().type('24-10-2032');
cy.get('body').click();
cy.get('#root_vendor').clear().type('Consultancy.uk');
cy.get('#root_payment_method').select('Crypto Transfer');
cy.get('button')
/*cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
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_item_0_sub_category').select('consultants');
cy.get('#root_item_0_item_name').clear().type('Software development consultants with Python background');
cy.get('#root_item_0_qty').clear().type('5');
cy.get('#root_item_0_currency_type').select('Crypto');
cy.get('#root_item_0_currency').select('DAI');
cy.get('#root_item_0_unit_price').type('1500');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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_item_1_sub_category').select('consultants');
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('Fiat');
cy.get('#root_item_1_currency').select('CAD');
cy.get('#root_item_1_unit_price').type('1355');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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('#root_item_2_sub_category').select('freelancers');
cy.get('#root_item_2_item_name').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
cy.get('#root_item_2_qty').clear().type('6');
cy.get('#root_item_2_currency_type').select('Crypto');
cy.get('#root_item_2_currency').select('SNT');
cy.get('#root_item_2_unit_price').type('2300');
cy.get('button')
@ -302,8 +309,9 @@ describe('Consulting Fees Path - Without Files', () => {
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -332,24 +340,25 @@ describe('Consulting Fees Path - Without Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -359,46 +368,48 @@ describe('Consulting Fees Path - Without Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
cy.wait(2000);
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_period').clear().type('05-04-2028');
cy.get('body').click();
cy.get('#root_vendor').clear().type('Upwork');
cy.get('#root_payment_method').select('Debit Card');
cy.get('button')
/*cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
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_item_0_sub_category').select('freelancers');
cy.get('#root_item_0_item_name').clear().type('Freelancers to do the Python development and front end react app development');
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('1750');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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_item_1_sub_category').select('consultants');
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('Fiat');
cy.get('#root_item_1_currency').select('CAD');
cy.get('#root_item_1_unit_price').type('1355');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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('#root_item_2_sub_category').select('freelancers');
cy.get('#root_item_2_item_name').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
cy.get('#root_item_2_qty').clear().type('6');
cy.get('#root_item_2_currency_type').select('Crypto');
cy.get('#root_item_2_currency').select('SNT');
cy.get('#root_item_2_unit_price').type('2300');
@ -422,8 +433,9 @@ describe('Consulting Fees Path - Without Files', () => {
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -452,7 +464,7 @@ describe('Consulting Fees Path - Without Files', () => {
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Request Additional Budget',
'Task: Reminder: Check Existing Budget',
"approve"
);
@ -466,7 +478,7 @@ describe('Consulting Fees Path - Without Files', () => {
describe('Consulting Fees Path - With Files', () => {
Cypress._.times(1, () => {
//Budget owner approves the request
it('Budget owner approves', () => {
it.only('Budget owner approves', () => {
let username = Cypress.env('requestor_username');
let password = Cypress.env('requestor_password');
cy.log('=====username : ' + username);
@ -476,24 +488,25 @@ describe('Consulting Fees Path - With Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -503,46 +516,48 @@ describe('Consulting Fees Path - With Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
cy.wait(2000);
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 professionals area of expertise.');
cy.get('#root_criticality').select('High');
cy.get('#root_period').clear().type('2025-12-25');
cy.get('#root_period').clear().type('05-12-2025');
cy.get('body').click();
cy.get('#root_vendor').clear().type('Embassar');
cy.get('#root_payment_method').select('Bank Transfer');
cy.get('button')
/*cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
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_item_0_sub_category').select('ambassadors');
cy.get('#root_item_0_item_name').clear().type('An ambassador is an official envoy, especially a high-ranking diplomat who represents a state.');
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('ETH');
cy.get('#root_item_0_unit_price').type('1.15');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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_item_1_sub_category').select('consultants');
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('Fiat');
cy.get('#root_item_1_currency').select('CAD');
cy.get('#root_item_1_unit_price').type('1355');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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('#root_item_2_sub_category').select('freelancers');
cy.get('#root_item_2_item_name').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
cy.get('#root_item_2_qty').clear().type('6');
cy.get('#root_item_2_currency_type').select('Crypto');
cy.get('#root_item_2_currency').select('SNT');
cy.get('#root_item_2_unit_price').type('2300');
cy.get('button')
@ -556,8 +571,47 @@ describe('Consulting Fees Path - With Files', () => {
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', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
.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.wait(1000);
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.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.wait(1000);
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.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.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.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.wait(2000);
cy.contains('Submit the Request').click();
@ -569,8 +623,9 @@ describe('Consulting Fees Path - With Files', () => {
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -581,7 +636,7 @@ describe('Consulting Fees Path - With Files', () => {
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Request Additional Budget',
'Task: Reminder: Check Existing Budget',
"approve"
);
@ -599,24 +654,25 @@ describe('Consulting Fees Path - With Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -626,46 +682,48 @@ describe('Consulting Fees Path - With Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
cy.wait(2000);
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_period').clear().type('14-10-2029');
cy.get('body').click();
cy.get('#root_vendor').clear().type('Consultancy.uk');
cy.get('#root_payment_method').select('Crypto Transfer');
cy.get('button')
/*cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
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_item_0_sub_category').select('consultants');
cy.get('#root_item_0_item_name').clear().type('Software development consultants with Python background');
cy.get('#root_item_0_qty').clear().type('5');
cy.get('#root_item_0_currency_type').select('Crypto');
cy.get('#root_item_0_currency').select('DAI');
cy.get('#root_item_0_unit_price').type('1500');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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_item_1_sub_category').select('consultants');
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('Fiat');
cy.get('#root_item_1_currency').select('CAD');
cy.get('#root_item_1_unit_price').type('1355');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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('#root_item_2_sub_category').select('freelancers');
cy.get('#root_item_2_item_name').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
cy.get('#root_item_2_qty').clear().type('6');
cy.get('#root_item_2_currency_type').select('Crypto');
cy.get('#root_item_2_currency').select('SNT');
cy.get('#root_item_2_unit_price').type('2300');
cy.get('button')
@ -679,8 +737,47 @@ describe('Consulting Fees Path - With Files', () => {
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', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
.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.wait(1000);
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.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.wait(1000);
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.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.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.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.wait(2000);
cy.contains('Submit the Request').click();
@ -691,8 +788,9 @@ describe('Consulting Fees Path - With Files', () => {
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -721,24 +819,25 @@ describe('Consulting Fees Path - With Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -748,45 +847,47 @@ describe('Consulting Fees Path - With Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let projectId = Cypress.env('project_id');
cy.wait(2000);
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_period').clear().type('05-04-2024');
cy.get('body').click();
cy.get('#root_vendor').clear().type('Upwork');
cy.get('#root_payment_method').select('Debit Card');
cy.get('button')
/*cy.get('button')
.contains(/^Submit$/)
.click();
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
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_item_0_sub_category').select('freelancers');
cy.get('#root_item_0_item_name').clear().type('Freelancers to do the Python development and front end react app development');
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('1750');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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_item_1_sub_category').select('consultants');
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('Fiat');
cy.get('#root_item_1_currency').select('CAD');
cy.get('#root_item_1_unit_price').type('1355');
cy.get('#root > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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('#root_item_2_sub_category').select('freelancers');
cy.get('#root_item_2_item_name').clear().type('Find & hire top freelancers, web developers & designers inexpensively. ');
cy.get('#root_item_2_qty').clear().type('6');
cy.get('#root_item_2_currency_type').select('Crypto');
cy.get('#root_item_2_currency').select('SNT');
cy.get('#root_item_2_unit_price').type('2300');
cy.get('button')
@ -800,8 +901,47 @@ describe('Consulting Fees Path - With Files', () => {
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('#root > div:nth-child(3) > p > button').click();
cy.get("input[type=file]")
.attachFile(['lorem-ipsum.pdf', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
.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.wait(1000);
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.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.wait(1000);
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.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.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.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.wait(2000);
cy.contains('Submit the Request').click();
@ -812,8 +952,9 @@ describe('Consulting Fees Path - With Files', () => {
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -842,7 +983,7 @@ describe('Consulting Fees Path - With Files', () => {
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Request Additional Budget',
'Task: Reminder: Check Existing Budget',
"approve"
);

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,7 @@ describe('Other Fees Path - Without Files', () => {
Cypress._.times(1, () => {
//Budget owner approves the request
it('Budget owner approves', () => {
it.only('Budget owner approves', () => {
let username = Cypress.env('requestor_username');
let password = Cypress.env('requestor_password');
cy.log('=====username : ' + username);
@ -94,24 +94,25 @@ describe('Other Fees Path - Without Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -121,36 +122,39 @@ describe('Other Fees Path - Without Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let 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_criticality').select('High');
cy.get('#root_period').clear().type('2025-11-25');
cy.get('#root_period').clear().type('25-11-2025');
cy.get('body').click();
cy.get('#root_vendor').clear().type('ABC CO');
cy.get('#root_payment_method').select('Reimbursement');
cy.get('button')
/*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_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_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 > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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('#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_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')
@ -174,8 +178,9 @@ describe('Other Fees Path - Without Files', () => {
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -186,7 +191,7 @@ describe('Other Fees Path - Without Files', () => {
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Request Additional Budget',
'Task: Reminder: Check Existing Budget',
"approve"
);
@ -204,24 +209,25 @@ describe('Other Fees Path - Without Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -231,24 +237,27 @@ describe('Other Fees Path - Without Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let 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_criticality').select('Medium');
cy.get('#root_period').clear().type('2024-02-06');
cy.get('#root_period').clear().type('24-02-2036');
cy.get('body').click();
cy.get('#root_vendor').clear().type('CO-WORK ENG');
cy.get('#root_payment_method').select('Bank Transfer');
cy.get('button')
/*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('#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_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')
@ -271,8 +280,9 @@ describe('Other Fees Path - Without Files', () => {
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -301,24 +311,25 @@ describe('Other Fees Path - Without Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -328,24 +339,27 @@ describe('Other Fees Path - Without Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let 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_criticality').select('Low');
cy.get('#root_period').clear().type('2025-02-25');
cy.get('#root_period').clear().type('05-02-2025');
cy.get('body').click();
cy.get('#root_vendor').clear().type('Bounty Co');
cy.get('#root_payment_method').select('Crypto Transfer');
cy.get('button')
/*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('#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_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')
@ -368,8 +382,9 @@ describe('Other Fees Path - Without Files', () => {
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -398,7 +413,7 @@ describe('Other Fees Path - Without Files', () => {
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Request Additional Budget',
'Task: Reminder: Check Existing Budget',
"approve"
);
@ -412,7 +427,7 @@ describe('Other Fees Path - With Files', () => {
Cypress._.times(1, () => {
//Budget owner approves the request
it('Budget owner approves', () => {
it.only('Budget owner approves', () => {
let username = Cypress.env('requestor_username');
let password = Cypress.env('requestor_password');
cy.log('=====username : ' + username);
@ -422,24 +437,25 @@ describe('Other Fees Path - With Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -449,35 +465,38 @@ describe('Other Fees Path - With Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let 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_criticality').select('High');
cy.get('#root_period').clear().type('2025-11-25');
cy.get('#root_period').clear().type('15-11-2025');
cy.get('body').click();
cy.get('#root_vendor').clear().type('Embassar');
cy.get('#root_payment_method').select('Reimbursement');
cy.get('button')
/*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_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_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 > div:nth-child(3) > p > button').click();
cy.get('#root_item > 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('#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_qty').clear().type('1');
cy.get('#root_item_1_currency_type').select('Crypto');
cy.get('#root_item_1_currency').select('DAI');
cy.get('#root_item_1_unit_price').type('4250');
cy.get('button')
.contains(/^Submit$/)
@ -490,8 +509,47 @@ describe('Other Fees Path - With Files', () => {
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', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
.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.wait(1000);
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.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.wait(1000);
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.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.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.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.wait(2000);
cy.contains('Submit the Request').click();
@ -503,8 +561,9 @@ describe('Other Fees Path - With Files', () => {
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -515,7 +574,7 @@ describe('Other Fees Path - With Files', () => {
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Request Additional Budget',
'Task: Reminder: Check Existing Budget',
"approve"
);
@ -533,24 +592,25 @@ describe('Other Fees Path - With Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -560,24 +620,27 @@ describe('Other Fees Path - With Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let 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_criticality').select('Medium');
cy.get('#root_period').clear().type('2024-02-06');
cy.get('#root_period').clear().type('20-02-2026');
cy.get('body').click();
cy.get('#root_vendor').clear().type('CO-WORK ENG');
cy.get('#root_payment_method').select('Bank Transfer');
cy.get('button')
/*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('#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_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')
@ -591,8 +654,47 @@ describe('Other Fees Path - With Files', () => {
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', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
.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.wait(1000);
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.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.wait(1000);
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.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.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.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.wait(2000);
cy.contains('Submit the Request').click();
@ -603,8 +705,9 @@ describe('Other Fees Path - With Files', () => {
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -633,24 +736,25 @@ describe('Other Fees Path - With Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Raise New Demand Request');
cy.contains('Request Goods/Services');
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('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',
'Request Goods/Services',
{ timeout: 60000 }
);
@ -660,24 +764,27 @@ describe('Other Fees Path - With Files', () => {
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
cy.log('==###############===processInstanceId : ', processInstanceId);
let 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_criticality').select('Low');
cy.get('#root_period').clear().type('2025-02-25');
cy.get('#root_period').clear().type('12-02-2025');
cy.get('body').click();
cy.get('#root_vendor').clear().type('BOUNTY');
cy.get('#root_payment_method').select('Crypto Transfer');
cy.get('button')
/*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('#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_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')
@ -691,8 +798,47 @@ describe('Other Fees Path - With Files', () => {
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('#root > div:nth-child(3) > p > button').click();
cy.get("input[type=file]")
.attachFile(['lorem-ipsum.pdf', 'png-5mb-1.png', 'Free_Test_Data_1MB_PDF.pdf', 'sampletext.txt']);
.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.wait(1000);
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.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.wait(1000);
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.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.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.wait(1000);
cy.get("input[type=file]")
.attachFile(['sampletext.txt']);
cy.wait(2000);
cy.contains('Submit the Request').click();
@ -703,8 +849,9 @@ describe('Other Fees Path - With Files', () => {
.contains(/^Submit$/)
.click();
cy.contains('Tasks for my open instances', { timeout: 60000 });
cy.contains('Started by me', { timeout: 60000 });
cy.logout();
cy.wait(1000);
let budgetOwnerUsername = Cypress.env('budgetowner_username');
let budgetOwnerPassword = Cypress.env('budgetowner_password');
@ -733,7 +880,7 @@ describe('Other Fees Path - With Files', () => {
budgetOwnerUsername,
budgetOwnerPassword,
processInstanceId,
'Task: Reminder: Request Additional Budget',
'Task: Reminder: Check Existing Budget',
"approve"
);

File diff suppressed because it is too large Load Diff

View File

@ -7,11 +7,10 @@
"@babel/plugin-transform-react-jsx": "^7.18.6",
"@babel/preset-react": "^7.18.6",
"@carbon/icons-react": "^11.10.0",
"@carbon/react": "^1.16.0",
"@carbon/react": "^1.27.0",
"@carbon/styles": "^1.16.0",
"@casl/ability": "^6.3.2",
"@casl/react": "^3.1.0",
"@ginkgo-bioworks/react-json-schema-form-builder": "^2.9.0",
"@monaco-editor/react": "^4.4.5",
"@mui/material": "^5.10.14",
"@react-icons/all-files": "^4.1.0",
@ -66,14 +65,6 @@
"overrides": {
"postcss-preset-env": {
"autoprefixer": "10.4.5"
},
"@ginkgo-bioworks/react-json-schema-form-builder": {
"react": "^18.2.0",
"bootstrap": "^5.2.0-beta1"
},
"@carbon/react": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"scripts": {

View File

@ -1397,12 +1397,22 @@ export default function ProcessInstanceListTable({
);
}
if (column.accessor === 'waiting_for') {
return <td>{getWaitingForTableCellComponent(row)}</td>;
return (
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
<td
onClick={navigateToProcessInstance}
onKeyDown={navigateToProcessInstance}
>
{getWaitingForTableCellComponent(row)}
</td>
);
}
if (column.accessor === 'updated_at_in_seconds') {
return (
<TableCellWithTimeAgoInWords
timeInSeconds={row.updated_at_in_seconds}
onClick={navigateToProcessInstance}
onKeyDown={navigateToProcessInstance}
/>
);
}
@ -1410,7 +1420,7 @@ export default function ProcessInstanceListTable({
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
<td
data-qa={`process-instance-show-link-${column.accessor}`}
onKeyDown={navigateToProcessModel}
onKeyDown={navigateToProcessInstance}
onClick={navigateToProcessInstance}
>
{formatter(row, value)}

View File

@ -4,13 +4,22 @@ import { convertSecondsToFormattedDateTime } from '../helpers';
type OwnProps = {
timeInSeconds: number;
onClick?: any;
onKeyDown?: any;
};
export default function TableCellWithTimeAgoInWords({
timeInSeconds,
onClick = null,
onKeyDown = null,
}: OwnProps) {
return (
<td title={convertSecondsToFormattedDateTime(timeInSeconds) || '-'}>
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
<td
title={convertSecondsToFormattedDateTime(timeInSeconds) || '-'}
onClick={onClick}
onKeyDown={onKeyDown}
>
{timeInSeconds ? TimeAgo.inWords(timeInSeconds) : '-'}
</td>
);

View File

@ -890,7 +890,7 @@ export default function ProcessModelEditDiagram() {
const path = generatePath(
'/admin/process-models/:process_model_id/form/:file_name',
{
process_model_id: params.process_model_id,
process_model_id: params.process_model_id || null,
file_name: fileName,
}
);
@ -902,7 +902,7 @@ export default function ProcessModelEditDiagram() {
const path = generatePath(
'/admin/process-models/:process_model_id/files/:file_name',
{
process_model_id: params.process_model_id,
process_model_id: params.process_model_id || null,
file_name: file.name,
}
);

View File

@ -11,7 +11,6 @@ import {
ComboBox,
Button,
ButtonSet,
// @ts-ignore
} from '@carbon/react';
import MDEditor from '@uiw/react-md-editor';

View File

@ -143,7 +143,6 @@ export default function BaseInputTemplate<
<>
<TextInput
id={id}
name={id}
className="text-input"
helperText={helperText}
invalid={invalid}

View File

@ -1,59 +1,92 @@
// @ts-ignore
import { Select, SelectItem } from '@carbon/react';
import { WidgetProps, processSelectValue } from '@rjsf/utils';
import { ChangeEvent, FocusEvent, SyntheticEvent, useCallback } from 'react';
import {
enumOptionsValueForIndex,
FormContextType,
RJSFSchema,
StrictRJSFSchema,
WidgetProps,
} from '@rjsf/utils';
function SelectWidget({
function getValue(event: SyntheticEvent<HTMLSelectElement>, multiple: boolean) {
if (multiple) {
return Array.from((event.target as HTMLSelectElement).options)
.slice()
.filter((o) => o.selected)
.map((o) => o.value);
}
return (event.target as HTMLSelectElement).value;
}
/** The `SelectWidget` is a widget for rendering dropdowns.
* It is typically used with string properties constrained with enum options.
*
* @param props - The `WidgetProps` for this component
*/
function SelectWidget<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any
>({
schema,
uiSchema,
id,
options,
label,
required,
value,
disabled,
readonly,
value,
multiple,
autofocus,
multiple = false,
autofocus = false,
onChange,
onBlur,
onFocus,
uiSchema,
placeholder,
rawErrors = [],
}: WidgetProps) {
const { enumOptions, enumDisabled } = options;
}: WidgetProps<T, S, F>) {
const { enumOptions, enumDisabled, emptyValue: optEmptyVal } = options;
const emptyValue = multiple ? [] : '';
const _onChange = ({
target: { value },
}: React.ChangeEvent<{ name?: string; value: unknown }>) =>
onChange(processSelectValue(schema, value, options));
const _onBlur = ({ target: { value } }: React.FocusEvent<HTMLInputElement>) =>
onBlur(id, processSelectValue(schema, value, options));
const _onFocus = ({
target: { value },
}: React.FocusEvent<HTMLInputElement>) =>
onFocus(id, processSelectValue(schema, value, options));
const handleFocus = useCallback(
(event: FocusEvent<HTMLSelectElement>) => {
const newValue = getValue(event, multiple);
return onFocus(
id,
enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal)
);
},
[onFocus, id, schema, multiple, options]
);
const handleBlur = useCallback(
(event: FocusEvent<HTMLSelectElement>) => {
const newValue = getValue(event, multiple);
return onBlur(
id,
enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal)
);
},
[onBlur, id, schema, multiple, options]
);
const handleChange = useCallback(
(event: ChangeEvent<HTMLSelectElement>) => {
const newValue = getValue(event, multiple);
return onChange(
enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal)
);
},
[onChange, schema, multiple, options]
);
let labelToUse = label;
if (uiSchema && uiSchema['ui:title']) {
labelToUse = uiSchema['ui:title'];
} else if (schema && schema.title) {
labelToUse = schema.title;
}
let helperText = null;
if (uiSchema && uiSchema['ui:help']) {
helperText = uiSchema['ui:help'];
}
if (required) {
labelToUse = `${labelToUse}*`;
}
let invalid = false;
let errorMessageForField = null;
if (rawErrors && rawErrors.length > 0) {
invalid = true;
// errorMessageForField = `${labelToUse.replace(/\*$/, '')} ${rawErrors[0]}`;
errorMessageForField = rawErrors[0];
}
@ -71,9 +104,9 @@ function SelectWidget({
disabled={disabled || readonly}
autoFocus={autofocus}
error={rawErrors.length > 0}
onChange={_onChange}
onBlur={_onBlur}
onFocus={_onFocus}
onChange={handleChange}
onBlur={handleBlur}
onFocus={handleFocus}
invalid={invalid}
invalidText={errorMessageForField}
InputLabelProps={{

View File

@ -0,0 +1,2 @@
// carbon/react is not very typescript safe so ignore it
declare module '@carbon/react';