Skip to content

Commit

Permalink
BC-8605 in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
csp175 committed Feb 17, 2025
1 parent 0215390 commit b53c7b3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions cypress/e2e/helper_tests/deleteTestDataOnStaging.feature
Original file line number Diff line number Diff line change
@@ -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 '<teacher>' at '<namespace>'

# Deleting test data courses
When I go to courses overview
When I go to course '<course_title>'
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 '<course_title>' 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 |






3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b53c7b3

Please sign in to comment.