From 48a790acf927457c46ba9f338a2e599660af1adc Mon Sep 17 00:00:00 2001 From: Adel Bensaad Date: Thu, 17 Aug 2023 08:07:26 +0100 Subject: [PATCH 1/3] test: debug cucumber RP attributes exapmle --- cypress/e2e/context-selection/categories.feature | 3 +++ cypress/e2e/context-selection/categories/index.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/cypress/e2e/context-selection/categories.feature b/cypress/e2e/context-selection/categories.feature index 36e4fc1a4a..85544e46db 100644 --- a/cypress/e2e/context-selection/categories.feature +++ b/cypress/e2e/context-selection/categories.feature @@ -1,9 +1,12 @@ +@attributeKeyFeature:attributeValuFeature Feature: Category options for each category in the category combination connected to the data set can be selected + @attributeKeyScenario1:attributeValuScenario1 Scenario: No data set has been selected Given no data set has been selected yet Then the selector should not be displayed + @attributeKeyScenario2:attributeValuScenario2 Scenario: No org unit has been selected Given a data set and period but no org unit have been selected yet Then the selector should not be displayed diff --git a/cypress/e2e/context-selection/categories/index.js b/cypress/e2e/context-selection/categories/index.js index 08dec3121c..a0ea10b7fe 100644 --- a/cypress/e2e/context-selection/categories/index.js +++ b/cypress/e2e/context-selection/categories/index.js @@ -6,6 +6,11 @@ Given('no data set has been selected yet', () => { }) Given('a data set and period but no org unit have been selected yet', () => { + this.addAttributes([ + { key: 'key_1', value: 'value_1' }, + { value: 'value_2' }, + ]) + this.addDescription('This step contain **attributes**') cy.visit('/#/?dataSetId=V8MHeZHIrcP&periodId=2021') cy.get('[data-test="data-set-selector"]').should('exist') }) From a6a090404a5d2bec917781c8e63380e42d1fef37 Mon Sep 17 00:00:00 2001 From: Adel Bensaad Date: Thu, 17 Aug 2023 08:22:47 +0100 Subject: [PATCH 2/3] test: add agent-js-cucumber --- package.json | 1 + yarn.lock | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 630b582f3a..7b9425f12a 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "@dhis2/cli-style": "10.5.1", "@dhis2/cypress-commands": "^10.0.1", "@dhis2/cypress-plugins": "^10.0.1", + "@reportportal/agent-js-cucumber": "^5.2.2", "@reportportal/agent-js-cypress": "^5.1.3", "@reportportal/agent-js-jest": "^5.0.6", "@testing-library/jest-dom": "5.16.5", diff --git a/yarn.lock b/yarn.lock index 8515fd52a0..95ba1918da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3352,6 +3352,15 @@ "@react-hook/passive-layout-effect" "^1.2.0" "@react-hook/resize-observer" "^1.2.1" +"@reportportal/agent-js-cucumber@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@reportportal/agent-js-cucumber/-/agent-js-cucumber-5.2.2.tgz#6091e37da36a6dac457462df8d4896b4527b9363" + integrity sha512-ymQ4NOmeoX2ajlWAVb7IkZghdKZEb1lPb26C+0V378BixRPGFkaqHdSkg7F4I/xse4VAFMf0tYBNA11ImEVhfg== + dependencies: + "@reportportal/client-javascript" "^5.0.12" + cli-table3 "^0.6.3" + strip-ansi "^6.0.1" + "@reportportal/agent-js-cypress@^5.1.3": version "5.1.3" resolved "https://registry.yarnpkg.com/@reportportal/agent-js-cypress/-/agent-js-cypress-5.1.3.tgz#596aa9657ad0e8fd7dc57f08304b73decf375d44" @@ -5644,7 +5653,7 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-table3@0.6.3, cli-table3@~0.6.1: +cli-table3@0.6.3, cli-table3@^0.6.3, cli-table3@~0.6.1: version "0.6.3" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== From ed77df0ce2eca9b92bf318606e8828e5bb977dcf Mon Sep 17 00:00:00 2001 From: Adel Bensaad Date: Thu, 17 Aug 2023 09:54:42 +0100 Subject: [PATCH 3/3] test: debug - remove steps attributes --- cypress/e2e/context-selection/categories/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cypress/e2e/context-selection/categories/index.js b/cypress/e2e/context-selection/categories/index.js index a0ea10b7fe..08dec3121c 100644 --- a/cypress/e2e/context-selection/categories/index.js +++ b/cypress/e2e/context-selection/categories/index.js @@ -6,11 +6,6 @@ Given('no data set has been selected yet', () => { }) Given('a data set and period but no org unit have been selected yet', () => { - this.addAttributes([ - { key: 'key_1', value: 'value_1' }, - { value: 'value_2' }, - ]) - this.addDescription('This step contain **attributes**') cy.visit('/#/?dataSetId=V8MHeZHIrcP&periodId=2021') cy.get('[data-test="data-set-selector"]').should('exist') })