diff --git a/cypress/e2e/helper_tests/deleteTestDataOnStaging.feature b/cypress/e2e/helper_tests/deleteTestDataOnStaging.feature new file mode 100644 index 00000000..d8e8927e --- /dev/null +++ b/cypress/e2e/helper_tests/deleteTestDataOnStaging.feature @@ -0,0 +1,32 @@ +@clean_up_test_data + +Feature: Deletion of test data that are left from previous failed test runs on staging + + Run this feature file before running cypress tests on staging + + Scenario: Delete courses + # pre-conditions: login as teacher + Given I am logged in as a '' at '' + + # Deleting test data courses + When I go to courses overview + When I go to course '' + When I open page Edit course + When I click on the button delete course + Then I see the modal to confirm the deletion + When I click on the button delete on the modal to confirm the course deletion + Then I do not see the course '' on the course overview page + + @staging_test + Examples: + | namespace | teacher | course_title | + | brb | teacher1_brb | CypressAut Test Creation and Deletion | + | brb | teacher1_brb | CypressAut Test Creation and Deletion | + | brb | teacher1_brb | CypressAut Testkurs Edit | + | brb | teacher1_brb | CypressAut Testkurs Edit | + + + + + + diff --git a/package.json b/package.json index e3fbd209..08f4f5d8 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "cy:headless:stable:groupA:school_api_test:ci": "xvfb-run cypress run --browser edge -e tags=\"@group-A and @stable_test and @school_api_test\",environmentName=ci,parallelGroup=group-A", "cy:headless:stable:groupB:school_api_test:ci": "xvfb-run cypress run --browser edge -e tags=\"@group-B and @stable_test and @school_api_test\",environmentName=ci,parallelGroup=group-B", "cy:headless:only:ci": "xvfb-run cypress run --browser edge -e tags=@only,environmentName=ci", - "cy:headless:unstable:ci": "xvfb-run cypress run --browser edge -e tags=@unstable_test,environmentName=ci" + "cy:headless:unstable:ci": "xvfb-run cypress run --browser edge -e tags=@unstable_test,environmentName=ci", + "cy:gui:stable:clean_up_staging:local": "cypress open --browser edge -e tags=\"@clean_up_test_data\",environmentName=staging" }, "repository": { "type": "git",