From 315d43f45d74f6032b7eb1104e4c2339c177de1f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:21:46 -0300 Subject: [PATCH] [Backport 4.4-2.3-wzd] fix for test suite execution from github actions (#4754) fix for test suite execution from github actions (#4750) (cherry picked from commit ce6552617e39495e9f4cdff93c704e197da11a97) Co-authored-by: mauceballos <76791841+mauceballos@users.noreply.github.com> --- .../add-agent-from-deploy-new-agent.feature | 2 +- .../filters/add-filter-from-agent-events.feature | 2 +- .../filters/add-filter-from-agent.feature | 2 +- .../filters/add-new-filter-from-events.feature | 3 ++- .../features/filters/add-new-filter.feature | 2 +- .../pin-filter-from-dashboard-to-events.feature | 2 +- .../pin-filter-from-events-to-events.feature | 2 +- .../decoders/create-new-decoder.feature | 2 +- ...hould-list-decoders-and-show-the-pager.feature | 6 +++--- .../groups/edit-groups-without-saving.feature | 2 +- .../management/rules/create-a-new-rule.feature | 2 +- .../rules/edit-rules-without-saving.feature | 2 +- .../management/rules/refresh-rules-page.feature | 2 +- .../management/rules/validate-paginator.feature | 15 ++++++++++----- .../features/management/settings/about.feature | 2 +- .../management/settings/miscellaneous.feature | 2 +- .../management/settings/sample-data.feature | 4 ++-- test/cypress/package.json | 8 ++++---- 18 files changed, 34 insertions(+), 28 deletions(-) diff --git a/test/cypress/cypress/integration/features/agents/add-agent-from-deploy-new-agent.feature b/test/cypress/cypress/integration/features/agents/add-agent-from-deploy-new-agent.feature index d5f478ae2c..5525a7be5c 100644 --- a/test/cypress/cypress/integration/features/agents/add-agent-from-deploy-new-agent.feature +++ b/test/cypress/cypress/integration/features/agents/add-agent-from-deploy-new-agent.feature @@ -4,7 +4,7 @@ Feature: Validate that the config to added new agent I want to add a new agent in order to manage them - @agent + @agent @actions Scenario Outline: Validate the information to add a new Agent Given The wazuh admin user is logged When The user navigates to the agent page diff --git a/test/cypress/cypress/integration/features/filters/add-filter-from-agent-events.feature b/test/cypress/cypress/integration/features/filters/add-filter-from-agent-events.feature index f10eadff14..abff130fe1 100644 --- a/test/cypress/cypress/integration/features/filters/add-filter-from-agent-events.feature +++ b/test/cypress/cypress/integration/features/filters/add-filter-from-agent-events.feature @@ -8,7 +8,7 @@ Feature: Validate that the pinned filter label is displayed - from event page And The user navigates to the agent page And The user navigates to the agent dashboard - @filter + @filter @actions Scenario Outline: The user add and pin filter - Check across the modules - from event page - When The user navigates to agentModule And The user moves to events page diff --git a/test/cypress/cypress/integration/features/filters/add-filter-from-agent.feature b/test/cypress/cypress/integration/features/filters/add-filter-from-agent.feature index f03d3b8ea8..9b6fe5db54 100644 --- a/test/cypress/cypress/integration/features/filters/add-filter-from-agent.feature +++ b/test/cypress/cypress/integration/features/filters/add-filter-from-agent.feature @@ -8,7 +8,7 @@ Feature: Validate that the pinned filter label is displayed And The user navigates to the agent page And The user navigates to the agent dashboard - @filter + @filter @actions Scenario Outline: The user add and pin filter - Check across the modules When The user navigates to agentModule And The user adds a new filter diff --git a/test/cypress/cypress/integration/features/filters/add-new-filter-from-events.feature b/test/cypress/cypress/integration/features/filters/add-new-filter-from-events.feature index c822ffd051..a60b83897f 100644 --- a/test/cypress/cypress/integration/features/filters/add-new-filter-from-events.feature +++ b/test/cypress/cypress/integration/features/filters/add-new-filter-from-events.feature @@ -5,7 +5,8 @@ Feature: Validate that the added filter label is displayed from the events page in order to manage them Background: Given The wazuh admin user is logged - @filter + + @filter @actions Scenario Outline: The user add a new filer from the events page When The user goes to And The user moves to events page diff --git a/test/cypress/cypress/integration/features/filters/add-new-filter.feature b/test/cypress/cypress/integration/features/filters/add-new-filter.feature index 4a8a2313e8..5c5ea6c364 100644 --- a/test/cypress/cypress/integration/features/filters/add-new-filter.feature +++ b/test/cypress/cypress/integration/features/filters/add-new-filter.feature @@ -6,7 +6,7 @@ Feature: Validate that the added filter label is displayed Background: Given The wazuh admin user is logged - @filter + @filter @actions Scenario Outline: The user add a new filer When The user goes to And The user adds a new filter diff --git a/test/cypress/cypress/integration/features/filters/pin-filter-from-dashboard-to-events.feature b/test/cypress/cypress/integration/features/filters/pin-filter-from-dashboard-to-events.feature index dc0f0cbcbc..43233d9670 100644 --- a/test/cypress/cypress/integration/features/filters/pin-filter-from-dashboard-to-events.feature +++ b/test/cypress/cypress/integration/features/filters/pin-filter-from-dashboard-to-events.feature @@ -6,7 +6,7 @@ Feature: Pin filter - from dashboard to event page Background: Given The wazuh admin user is logged - @filter + @filter @actions Scenario Outline: The user add and pin new filer - across the modules - from dashboard to event page When The user goes to And The user adds a new filter diff --git a/test/cypress/cypress/integration/features/filters/pin-filter-from-events-to-events.feature b/test/cypress/cypress/integration/features/filters/pin-filter-from-events-to-events.feature index 77e8b180a4..005886da27 100644 --- a/test/cypress/cypress/integration/features/filters/pin-filter-from-events-to-events.feature +++ b/test/cypress/cypress/integration/features/filters/pin-filter-from-events-to-events.feature @@ -6,7 +6,7 @@ Feature: Pin filter - from event page Background: Given The wazuh admin user is logged - @filter + @filter @actions Scenario Outline: The user add and pin new filer - across the modules - from event page When The user goes to And The user moves to events page diff --git a/test/cypress/cypress/integration/features/management/decoders/create-new-decoder.feature b/test/cypress/cypress/integration/features/management/decoders/create-new-decoder.feature index 1cac9c9c0e..f156afa70e 100644 --- a/test/cypress/cypress/integration/features/management/decoders/create-new-decoder.feature +++ b/test/cypress/cypress/integration/features/management/decoders/create-new-decoder.feature @@ -4,7 +4,7 @@ Feature: Should Displayes a message to restart the cluster after saves i want to edit a custom decoder in order to check if the save message it's displayed -@decoders +@decoders @actions Scenario: Validate creation message is displayed after creating a new decoder Given The wazuh admin user is logged When The user navigates to decoders diff --git a/test/cypress/cypress/integration/features/management/decoders/should-list-decoders-and-show-the-pager.feature b/test/cypress/cypress/integration/features/management/decoders/should-list-decoders-and-show-the-pager.feature index 130088fa1c..62a6f2d2ca 100644 --- a/test/cypress/cypress/integration/features/management/decoders/should-list-decoders-and-show-the-pager.feature +++ b/test/cypress/cypress/integration/features/management/decoders/should-list-decoders-and-show-the-pager.feature @@ -4,20 +4,20 @@ Feature: Should List Decoders And Show The Pager i want to see the Decoders pages in order to manage them - @decoder + @decoder @actions Scenario: Should List Decoders And Show The Pager Given The wazuh admin user is logged When The user navigates to decoders Then The user should see the decoders - @decoder + @decoder @actions Scenario: Should List Custom Decoders And Show The Pager Given The wazuh admin user is logged When The user navigates to decoders When The user clicks the custom decoders button Then The user should see the decoders - @decoder + @decoder @actions Scenario: Should can edit a decoder Given The wazuh admin user is logged When The user navigates to decoders diff --git a/test/cypress/cypress/integration/features/management/groups/edit-groups-without-saving.feature b/test/cypress/cypress/integration/features/management/groups/edit-groups-without-saving.feature index 0e6c4cb470..3eb0762735 100644 --- a/test/cypress/cypress/integration/features/management/groups/edit-groups-without-saving.feature +++ b/test/cypress/cypress/integration/features/management/groups/edit-groups-without-saving.feature @@ -4,7 +4,7 @@ Feature: Should Displayes a warning modal - Management - edit groups i want to edit a custom rule in order to check if the warning no saving toast is displayed. -@rules +@rules @actions Scenario: Validate confirmation when closing modal without saving - Management - edit groups Given The wazuh admin user is logged When The user navigates to groups page diff --git a/test/cypress/cypress/integration/features/management/rules/create-a-new-rule.feature b/test/cypress/cypress/integration/features/management/rules/create-a-new-rule.feature index 8c6d2360a3..9359da0aaa 100644 --- a/test/cypress/cypress/integration/features/management/rules/create-a-new-rule.feature +++ b/test/cypress/cypress/integration/features/management/rules/create-a-new-rule.feature @@ -4,7 +4,7 @@ Feature: Should Displayes a message to restart the cluster after saves i want to edit a custom rule in order to check if the saves message its displayed -@rules +@rules @actions Scenario: Validate creation message is displayed after creating a new rule Given The wazuh admin user is logged When The user navigates to rules diff --git a/test/cypress/cypress/integration/features/management/rules/edit-rules-without-saving.feature b/test/cypress/cypress/integration/features/management/rules/edit-rules-without-saving.feature index ae04333f62..a8eddc669c 100644 --- a/test/cypress/cypress/integration/features/management/rules/edit-rules-without-saving.feature +++ b/test/cypress/cypress/integration/features/management/rules/edit-rules-without-saving.feature @@ -4,7 +4,7 @@ Feature: Should Displayes a warning modal - Management - edit rules i want to edit a custom rule in order to check if the warning no saving toast is displayed. -@rules +@rules @actions Scenario: Validate confirmation when closing modal without saving - Management - edit rules Given The wazuh admin user is logged When The user navigates to rules diff --git a/test/cypress/cypress/integration/features/management/rules/refresh-rules-page.feature b/test/cypress/cypress/integration/features/management/rules/refresh-rules-page.feature index 7a61df5160..95278a8e3d 100644 --- a/test/cypress/cypress/integration/features/management/rules/refresh-rules-page.feature +++ b/test/cypress/cypress/integration/features/management/rules/refresh-rules-page.feature @@ -4,7 +4,7 @@ Feature: Validate refresh option is working fine i want to edit a custom rule in order to check if the warning no saving toast is displayed. -@rules +@rules @actions Scenario: Rules are displayed after refreshing the page Given The wazuh admin user is logged When The user navigates to rules diff --git a/test/cypress/cypress/integration/features/management/rules/validate-paginator.feature b/test/cypress/cypress/integration/features/management/rules/validate-paginator.feature index ef429564ae..0ba153eba3 100644 --- a/test/cypress/cypress/integration/features/management/rules/validate-paginator.feature +++ b/test/cypress/cypress/integration/features/management/rules/validate-paginator.feature @@ -8,29 +8,34 @@ Feature: Validate paginator on Rule page Given The wazuh admin user is logged When The user navigates to rules Then The user sees that the rule list is paginated - + + @actions Scenario: Rules are displayed when user clicks the first page When The user clicks on the second page button And A new set of rules is displayed And The user clicks on the first page button Then The first page of rules is displayed - + + @actions Scenario: Rules are displayed - Select a previous page When The user clicks on the second page button And The rule page is not the first available And The user clicks on the previous page button Then The user should be redirected to the next rule page available - + + @actions Scenario: Rules are displayed - Select a next page When The user clicks on the second page button And The rule page is not the last available And The user clicks on the next page button Then The user should be redirected to the next rule page available - + + @actions Scenario: Rules are displayed - Last Page When The rule page is the last available page Then The next page button should be disabled - + + @actions Scenario: Rules are displayed - First Page When The rule page is the first available page Then The previous page button should be disabled diff --git a/test/cypress/cypress/integration/features/management/settings/about.feature b/test/cypress/cypress/integration/features/management/settings/about.feature index 72ef33b271..271e5c7efb 100644 --- a/test/cypress/cypress/integration/features/management/settings/about.feature +++ b/test/cypress/cypress/integration/features/management/settings/about.feature @@ -4,7 +4,7 @@ Feature: Wazuh version information I want to check the about information in order to see information about the system - @about + @about @actions Scenario: Check Wazuh version information Given The wazuh admin user is logged When The user navigates to About settings diff --git a/test/cypress/cypress/integration/features/management/settings/miscellaneous.feature b/test/cypress/cypress/integration/features/management/settings/miscellaneous.feature index 09ba8cf48c..0d97eb90e4 100644 --- a/test/cypress/cypress/integration/features/management/settings/miscellaneous.feature +++ b/test/cypress/cypress/integration/features/management/settings/miscellaneous.feature @@ -4,7 +4,7 @@ Feature: Run health checks I want to run the health check in order to validate everything is connected - @miscellaneous + @miscellaneous @actions Scenario: Run health check Given The wazuh admin user is logged When The user navigates to Miscellaneous settings diff --git a/test/cypress/cypress/integration/features/management/settings/sample-data.feature b/test/cypress/cypress/integration/features/management/settings/sample-data.feature index eb39b9022e..fb5847fde9 100644 --- a/test/cypress/cypress/integration/features/management/settings/sample-data.feature +++ b/test/cypress/cypress/integration/features/management/settings/sample-data.feature @@ -4,7 +4,7 @@ Feature: Add/Delete Sample data to modules I want to add sample data indices in order to check modules - @sampleData + @sampleData @actions Scenario: Add all sample data Given The wazuh admin user is logged When The user navigates to Sample data settings @@ -15,7 +15,7 @@ Feature: Add/Delete Sample data to modules | threat detection and response | Then The add data success toasts are displayed - @sampleData + @sampleData @actions Scenario: Delete all sample data Given The wazuh admin user is logged When The user navigates to Sample data settings diff --git a/test/cypress/package.json b/test/cypress/package.json index 43fdbf2284..54647ed8cc 100644 --- a/test/cypress/package.json +++ b/test/cypress/package.json @@ -12,10 +12,10 @@ "cy:install": "npx cypress install --force", "test": "echo \"Error: no test specified\" && exit 1", "cypress:run-headless": "cypress run --headless --browser chrome", - "cypress:run-headless:github-actions:xpack": "cypress run --headless --browser chrome --config baseUrl=https://kibana:5601/ --env type=xpack", - "cypress:run-headless:github-actions:basic": "cypress run --headless --browser chrome --config baseUrl=http://kibana:5601/ --env type=basic", - "cypress:run-headless:github-actions:odfe": "cypress run --headless --browser chrome --config baseUrl=http://kibana:5601/ --env type=odfe", - "cypress:run-headless:github-actions:wzd": "cypress run --headless --browser chrome --config baseUrl=https://wazuh.dashboard:5601/ --env type=wzd", + "cypress:run-headless:github-actions:xpack": "cypress-tags run -e TAGS=\"@actions\" --headless --browser chrome --config baseUrl=https://kibana:5601/ --env type=xpack -e TAGS=\"@actions\"", + "cypress:run-headless:github-actions:basic": "cypress-tags run -e TAGS=\"@actions\" --headless --browser chrome --config baseUrl=http://kibana:5601/ --env type=basic -e TAGS=\"@actions\"", + "cypress:run-headless:github-actions:odfe": "cypress-tags run -e TAGS=\"@actions\" --headless --browser chrome --config baseUrl=http://kibana:5601/ --env type=odfe -e TAGS=\"@actions\"", + "cypress:run-headless:github-actions:wzd": "cypress-tags run -e TAGS=\"@actions\" --headless --browser chrome --config baseUrl=https://wazuh.dashboard:5601/ --env type=wzd -e TAGS=\"@actions\"", "cypress:run-headless:xpack": "cypress run --headless --browser chrome --config baseUrl=https://localhost:5601/ --env type=xpack", "cypress:run-headless:basic": "cypress run --headless --browser chrome --config baseUrl=http://localhost:5601/ --env type=basic", "cypress:run-headless:odfe": "cypress run --headless --browser chrome --config baseUrl=http://localhost:5601/ --env type=odfe",