From fb494e5e3045d16c0591d89af9ba9b3a6b0beb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 9 May 2023 17:31:54 +0200 Subject: [PATCH 1/3] ci: create version_info.json file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Will be used for exporting version metrics. Signed-off-by: Jakub SokoĊ‚owski --- Jenkinsfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 268239fe..cc4df545 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,5 @@ +import groovy.json.JsonBuilder + pipeline { agent { label 'linux' } @@ -45,6 +47,17 @@ pipeline { } stages { + stage('Prep') { + steps { script { + def jobMetaJson = new JsonBuilder([ + git_commit: env.GIT_COMMIT.take(7), + git_branch: env.GIT_BRANCH, + build_id: env.BUILD_ID, + ]).toPrettyString() + sh "echo '${jobMetaJson}' > version_info.json" + } } + } + stage('Build') { steps { script { dir("spiffworkflow-${params.COMPONENT}") { From c7e43c58ce90a9e0dd260cd3d065de2b9a8a59d7 Mon Sep 17 00:00:00 2001 From: Madhurya Liyanage Date: Tue, 9 May 2023 21:29:36 +0530 Subject: [PATCH 2/3] Enabled only the 'Without Files' describe --- .../cypress/pilot/NDR_PP1/consultingfees.cy.js | 2 +- spiffworkflow-frontend/cypress/pilot/NDR_PP1/equipment.cy.js | 2 +- .../cypress/pilot/NDR_PP1/initiaterequest.cy.js | 4 ++-- .../cypress/pilot/NDR_PP1/learninganddev.cy.js | 4 ++-- spiffworkflow-frontend/cypress/pilot/NDR_PP1/otherfees.cy.js | 2 +- .../cypress/pilot/NDR_PP1/softwarelicense.cy.js | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/consultingfees.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/consultingfees.cy.js index 334b9ee9..51c8027f 100644 --- a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/consultingfees.cy.js +++ b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/consultingfees.cy.js @@ -86,7 +86,7 @@ const submitWithUser = ( }; //Consulting Fees Path - Without Files -describe('Consulting Fees Path - Without Files', () => { +describe.only('Consulting Fees Path - Without Files', () => { Cypress._.times(1, () => { //Budget owner approves the request it('Budget owner approves', () => { diff --git a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/equipment.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/equipment.cy.js index ff4ef564..2930e025 100644 --- a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/equipment.cy.js +++ b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/equipment.cy.js @@ -89,7 +89,7 @@ const submitWithUser = ( }; //Equipment Path - Without Files -describe('Equipment Path - Without Files', () => { +describe.only('Equipment Path - Without Files', () => { Cypress._.times(1, () => { //Out of Policy. People Ops Partner Group and Budget owner approves the request diff --git a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/initiaterequest.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/initiaterequest.cy.js index 1eb7f770..63172bde 100644 --- a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/initiaterequest.cy.js +++ b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/initiaterequest.cy.js @@ -1,6 +1,6 @@ //Software and License - Without Files -describe('Initiate a Request - Without Files', () => { +describe.only('Initiate a Request - Without Files', () => { Cypress._.times(1, () => { //Submit a Software and License request - Without Files it('Submit a Software and License request', () => { @@ -610,7 +610,7 @@ describe('Initiate a Request - Without Files', () => { }); //Cancel a Software and License request 2- Without Files - it.only('Cancel a Software and License request 2', () => { + it('Cancel a Software and License request 2', () => { let username = Cypress.env('requestor_username'); let password = Cypress.env('requestor_password'); cy.log('=====username : ' + username); diff --git a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/learninganddev.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/learninganddev.cy.js index 887fa635..98a4941b 100644 --- a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/learninganddev.cy.js +++ b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/learninganddev.cy.js @@ -85,7 +85,7 @@ const submitWithUser = ( }; //Learning and Development Path - Without Files -describe('Learning and Development Path - Without Files', () => { +describe.only('Learning and Development Path - Without Files', () => { Cypress._.times(1, () => { //People Ops Partner Group approves the request @@ -252,7 +252,7 @@ describe('Learning and Development Path - Without Files', () => { cy.contains('Task: Enter NDR Items', { timeout: 60000 }); */ cy.get('#root_item_0_sub_category').select('books'); - cy.get('#root_item_0_item_name').clear().type('The role of the L&D function has evolved to meet the demands of digital transformation and a modern workforce.'); + cy.get('#root_item_0_item_name').clear().type('The role of the L&D function has evolved to meet the demands of digital transformation and a modern.'); 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'); diff --git a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/otherfees.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/otherfees.cy.js index b49fddf8..0c47ac27 100644 --- a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/otherfees.cy.js +++ b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/otherfees.cy.js @@ -85,7 +85,7 @@ const submitWithUser = ( cy.wait(2000); }; -describe('Other Fees Path - Without Files', () => { +describe.only('Other Fees Path - Without Files', () => { Cypress._.times(1, () => { //Budget owner approves the request diff --git a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/softwarelicense.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/softwarelicense.cy.js index c0bbf9f5..dbb09350 100644 --- a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/softwarelicense.cy.js +++ b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/softwarelicense.cy.js @@ -88,7 +88,7 @@ const submitWithUser = ( }; //Software and Licenses Path - Without Files -describe('Software and Licenses Path - Without Files', () => { +describe.only('Software and Licenses Path - Without Files', () => { Cypress._.times(1, () => { From ff078cbc801af121c0dd853f0958f058a36aed7e Mon Sep 17 00:00:00 2001 From: Madhurya Liyanage Date: Tue, 9 May 2023 21:36:54 +0530 Subject: [PATCH 3/3] Updated button paths and added some waits --- spiffworkflow-frontend/cypress/support/commands.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/spiffworkflow-frontend/cypress/support/commands.js b/spiffworkflow-frontend/cypress/support/commands.js index 5531d7bd..0737e842 100644 --- a/spiffworkflow-frontend/cypress/support/commands.js +++ b/spiffworkflow-frontend/cypress/support/commands.js @@ -59,11 +59,13 @@ Cypress.Commands.add('login', (username, password) => { }); Cypress.Commands.add('logout', (selector, ...args) => { - cy.getBySel('logout-button').click(); - + cy.wait(2000); + //cy.getBySel('logout-button').click(); + cy.get('#root > div > header > div.cds--header__global > span:nth-child(3) > button > svg').click(); if (Cypress.env('SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK') === true) { // otherwise we can click logout, quickly load the next page, and the javascript // doesn't have time to actually sign you out + //cy.wait(4000); cy.contains('Sign in to your account'); } else { cy.get('#spiff-login-button').should('exist'); @@ -104,7 +106,10 @@ Cypress.Commands.add( (expectAutoRedirectToHumanTask = false, returnToProcessModelShow = true) => { // cy.getBySel('start-process-instance').click(); // click on button with text Start - cy.get('button') + //cy.get('button') + //cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/new-demand-request-procurement > div > button') + cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/request-goods-services > div > button') + //cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/raise-new-demand-request > div > button') .contains(/^Start$/) .click(); if (expectAutoRedirectToHumanTask) {