Save as draft changed to Close
This commit is contained in:
parent
e301a937f7
commit
8fda5a476f
|
@ -331,8 +331,8 @@ describe.only('Initiate a Request - Without Files', () => {
|
|||
});
|
||||
});
|
||||
|
||||
//Save as Draft a Software and License request 1 - Without Files
|
||||
it('Save as Draft a Software and License request 1', () => {
|
||||
//Close a Software and License request 1 - Without Files
|
||||
it('Close a Software and License request 1', () => {
|
||||
let username = Cypress.env('requestor_username');
|
||||
let password = Cypress.env('requestor_password');
|
||||
cy.log('=====username : ' + username);
|
||||
|
@ -405,7 +405,7 @@ describe.only('Initiate a Request - Without Files', () => {
|
|||
cy.get('#root_item_1_unit_price').type('4500');
|
||||
|
||||
cy.get('button')
|
||||
.contains(/^Save as draft$/)
|
||||
.contains(/^Close$/)
|
||||
.click();
|
||||
|
||||
//cy.get('button')
|
||||
|
@ -419,8 +419,97 @@ describe.only('Initiate a Request - Without Files', () => {
|
|||
});
|
||||
});
|
||||
|
||||
//Save as Draft a Software and License request 2- Without Files
|
||||
it('Save as Draft a Software and License request 2', () => {
|
||||
//Close a Software and License request 2 - Without Files
|
||||
it('Close a Software and License request 2', () => {
|
||||
let username = Cypress.env('requestor_username');
|
||||
let password = Cypress.env('requestor_password');
|
||||
cy.log('=====username : ' + username);
|
||||
cy.log('=====password : ' + password);
|
||||
|
||||
cy.login(username, password);
|
||||
cy.visit('/');
|
||||
|
||||
cy.contains('Start New +').click();
|
||||
cy.contains('Request Goods or 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(
|
||||
'Request Goods or Services',
|
||||
{ timeout: 60000 }
|
||||
);
|
||||
|
||||
cy.url().then((currentUrl) => {
|
||||
// if url is "/tasks/8/d37c2f0f-016a-4066-b669-e0925b759560"
|
||||
// extract the digits after /tasks
|
||||
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
|
||||
cy.log('==###############===processInstanceId : ', processInstanceId);
|
||||
let projectId = Cypress.env('project_id');
|
||||
cy.wait(2000);
|
||||
cy.get('#root_project').select(projectId);
|
||||
cy.get('#root_category').select('soft_and_lic');
|
||||
cy.get('#root_purpose').clear().type('Sware\nA software license is a document that provides legally binding guidelines for the use and distribution of software.\nSoftware licenses typically provide end users with the right to one or more copies of the software without violating copyrights');
|
||||
cy.get('#root_criticality').select('High');
|
||||
cy.get('#root_period').clear().type('25-11-2025');
|
||||
cy.get('body').click();
|
||||
cy.get('#root_vendor').clear().type('Microsoft');
|
||||
cy.get('#root_payment_method').select('Reimbursement');
|
||||
/* cy.get('button')
|
||||
.contains(/^Submit$/)
|
||||
.click();
|
||||
|
||||
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||
*/
|
||||
//item 0
|
||||
cy.get('#root_item_0_sub_category').select('op_src');
|
||||
cy.get('#root_item_0_item_name').clear().type('Open source software is code that is designed to be publicly accessible anyone can see, modify, END');
|
||||
cy.get('#root_item_0_qty').clear().type('2');
|
||||
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('1915');
|
||||
|
||||
|
||||
cy.get('#root_item > div:nth-child(3) > p > button').click();
|
||||
|
||||
//item 1
|
||||
cy.get('#root_item_1_sub_category').select('lic_and_sub');
|
||||
cy.get('#root_item_1_item_name').clear().type('A software license is a document that provides legally binding guidelines for the use and distri END');
|
||||
//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('AED');
|
||||
//cy.get('#root_item_1_unit_price').type('4500');
|
||||
|
||||
cy.get('button')
|
||||
.contains(/^Close$/)
|
||||
.click();
|
||||
|
||||
//cy.get('button')
|
||||
// .contains(/^Return to Home$/)
|
||||
// .click();
|
||||
|
||||
cy.contains('Started by me', { timeout: 60000 });
|
||||
cy.logout();
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//Close a Software and License request 3 - Without Files
|
||||
it('Close a Software and License request 3', () => {
|
||||
let username = Cypress.env('requestor_username');
|
||||
let password = Cypress.env('requestor_password');
|
||||
cy.log('=====username : ' + username);
|
||||
|
@ -505,12 +594,12 @@ describe.only('Initiate a Request - Without Files', () => {
|
|||
cy.get('.cds--text-area__wrapper').find('#root').type('2021 Newest HP 17.3 inch FHD Laptop, AMD Ryzen 5 5500U 6core(Beat i7-1160G7, up to 4.0GHz),16GB RAM, 1TB PCIe SSD, Bluetooth 4.2, WiFi, HDMI, USB-A&C, Windows 10 S, w/Ghost Manta Accessories, Silver\nhttps://www.amazon.com/HP-i7-11G7-Bluetooth-Windows');
|
||||
|
||||
cy.get('button')
|
||||
.contains(/^Save as draft$/)
|
||||
.contains(/^Close$/)
|
||||
.click();
|
||||
|
||||
// cy.get('button')
|
||||
// .contains(/^Return to Home$/)
|
||||
// .click();
|
||||
// cy.get('button')
|
||||
// .contains(/^Return to Home$/)
|
||||
// .click();
|
||||
|
||||
cy.contains('Started by me', { timeout: 60000 });
|
||||
cy.logout();
|
||||
|
@ -701,7 +790,7 @@ describe.only('Initiate a Request - Without Files', () => {
|
|||
cy.get('button')
|
||||
.contains(/^Cancel Request$/)
|
||||
.click();
|
||||
|
||||
|
||||
cy.contains('Started by me', { timeout: 60000 });
|
||||
cy.logout();
|
||||
|
||||
|
@ -715,7 +804,7 @@ describe.only('Initiate a Request - Without Files', () => {
|
|||
describe('Initiate a Request - With Files', () => {
|
||||
Cypress._.times(1, () => {
|
||||
//Submit a Software and License request - Without Files
|
||||
it('Submit a Software and License request', () => {
|
||||
it('Submit a Software and License request - With Files', () => {
|
||||
let username = Cypress.env('requestor_username');
|
||||
let password = Cypress.env('requestor_password');
|
||||
cy.log('=====username : ' + username);
|
||||
|
@ -1020,7 +1109,7 @@ describe('Initiate a Request - With Files', () => {
|
|||
});
|
||||
|
||||
//Edit a Software and License request - With Files
|
||||
it('Edit a Software and License request', () => {
|
||||
it('Edit a Software and License request - With Files', () => {
|
||||
let username = Cypress.env('requestor_username');
|
||||
let password = Cypress.env('requestor_password');
|
||||
cy.log('=====username : ' + username);
|
||||
|
@ -1192,8 +1281,139 @@ describe('Initiate a Request - With Files', () => {
|
|||
});
|
||||
});
|
||||
|
||||
//Close a Software and License request 1 - With Files
|
||||
it('Close a Software and License request 1 - With Files', () => {
|
||||
let username = Cypress.env('requestor_username');
|
||||
let password = Cypress.env('requestor_password');
|
||||
cy.log('=====username : ' + username);
|
||||
cy.log('=====password : ' + password);
|
||||
|
||||
cy.login(username, password);
|
||||
cy.visit('/');
|
||||
|
||||
cy.contains('Start New +').click();
|
||||
cy.contains('Request Goods or 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(
|
||||
'Request Goods or Services',
|
||||
{ timeout: 60000 }
|
||||
);
|
||||
|
||||
cy.url().then((currentUrl) => {
|
||||
// if url is "/tasks/8/d37c2f0f-016a-4066-b669-e0925b759560"
|
||||
// extract the digits after /tasks
|
||||
const processInstanceId = currentUrl.match(/(?<=\/tasks\/)\d+/)[0];
|
||||
cy.log('==###############===processInstanceId : ', processInstanceId);
|
||||
let projectId = Cypress.env('project_id');
|
||||
cy.wait(2000);
|
||||
cy.get('#root_project').select(projectId);
|
||||
cy.get('#root_category').select('soft_and_lic');
|
||||
cy.get('#root_purpose').clear().type('Sware\nA software license is a document that provides legally binding guidelines for the use and distribution of software.\nSoftware licenses typically provide end users with the right to one or more copies of the software without violating copyrights');
|
||||
cy.get('#root_criticality').select('High');
|
||||
cy.get('#root_period').clear().type('25-11-2025');
|
||||
cy.get('body').click();
|
||||
cy.get('#root_vendor').clear().type('Microsoft');
|
||||
cy.get('#root_payment_method').select('Reimbursement');
|
||||
/* cy.get('button')
|
||||
.contains(/^Submit$/)
|
||||
.click();
|
||||
|
||||
cy.contains('Task: Enter NDR Items', { timeout: 60000 });
|
||||
*/
|
||||
//item 0
|
||||
cy.get('#root_item_0_sub_category').select('op_src');
|
||||
cy.get('#root_item_0_item_name').clear().type('Open source software is code that is designed to be publicly accessible anyone can see, modify, END');
|
||||
cy.get('#root_item_0_qty').clear().type('2');
|
||||
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('1915');
|
||||
|
||||
|
||||
cy.get('#root_item > div:nth-child(3) > p > button').click();
|
||||
|
||||
//item 1
|
||||
cy.get('#root_item_1_sub_category').select('lic_and_sub');
|
||||
cy.get('#root_item_1_item_name').clear().type('A software license is a document that provides legally binding guidelines for the use and distri END');
|
||||
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('AED');
|
||||
cy.get('#root_item_1_unit_price').type('4500');
|
||||
|
||||
|
||||
cy.get('button')
|
||||
.contains(/^Submit$/)
|
||||
.click();
|
||||
|
||||
cy.contains(
|
||||
'Review and provide any supporting information or files for your request.',
|
||||
{ timeout: 60000 }
|
||||
);
|
||||
|
||||
cy.get('.cds--text-area__wrapper').find('#root').type('2021 Newest HP 17.3 inch FHD Laptop, AMD Ryzen 5 5500U 6core(Beat i7-1160G7, up to 4.0GHz),16GB RAM, 1TB PCIe SSD, Bluetooth 4.2, WiFi, HDMI, USB-A&C, Windows 10 S, w/Ghost Manta Accessories, Silver\nhttps://www.amazon.com/HP-i7-11G7-Bluetooth-Windows');
|
||||
|
||||
cy.get('#root > div:nth-child(3) > p > button').click();
|
||||
|
||||
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.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(2000);
|
||||
|
||||
|
||||
cy.get('button')
|
||||
.contains(/^Close$/)
|
||||
.click();
|
||||
|
||||
cy.wait(3000);
|
||||
|
||||
// cy.get('button')
|
||||
// .contains(/^Return to Home$/)
|
||||
// .click();
|
||||
|
||||
cy.contains('Started by me', { timeout: 60000 });
|
||||
cy.logout();
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
//Cancel a Software and License request - With Files
|
||||
it('Cancel a Software and License request', () => {
|
||||
it('Cancel a Software and License request - With Files ', () => {
|
||||
let username = Cypress.env('requestor_username');
|
||||
let password = Cypress.env('requestor_password');
|
||||
cy.log('=====username : ' + username);
|
||||
|
|
Loading…
Reference in New Issue