Skip to content

Commit

Permalink
add test for incomplete tools
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorCapCoder committed Jan 12, 2024
1 parent d2c9eb7 commit 4423b5e
Show file tree
Hide file tree
Showing 7 changed files with 394 additions and 203 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/class_management/groupMembers.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#@release
@unstable_test
@stable_test
Feature: Group - To show members in a group

As a teacher I want to see the members in a group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#@release
@unstable_test
@stable_test
Feature: Group - To show groups and classes in one table with respective functionality

As a teacher I want to see all groups and classes belonging to my school.
Expand Down
62 changes: 62 additions & 0 deletions cypress/e2e/course/copyCtlTools.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Feature: Course - Copy CTL tools

As a Teacher i want to be able to copy ctl tools, when i copy a course

@stable_test
Scenario: Teacher can copy course
Given I am logged in as a 'teacher1_nbc' at 'nbc'
When I go to rooms overview
When I go to room 'Mathe'
When I click on copy course button
Then I see the copy result notification
When I close the dialog
Then I can see room page 'Mathe (1)'

@stable_test
Scenario: Teacher can see copied ctl tools and incomplete tools cannot be launched
Given I see room page 'Mathe (1)'
When I click on the tools tab
Then I can see 2 tools
Then I can see the tool 'CY Test Tool Context Scope' in the tool overview
Then I can see the tool 'CY Test Tool Protected Parameter' in the tool overview
Then I see the tool 'CY Test Tool Context Scope' is not marked as incomplete
Then I see the tool 'CY Test Tool Protected Parameter' is marked as incomplete
When I click on the tool 'CY Test Tool Protected Parameter'
Then I can see an error dialog

#@stable_test
Scenario: student can see copied ctl tools and incomplete tools cannot be launched
Given I am logged in as a 'student2_nbc' at 'nbc'
When I go to rooms overview
When I go to room 'Mathe (1)'
When I click on the tools tab
Then I can see '2' tools
Then I can see the tool 'CY Test Tool Context Scope' in the tool overview
Then I can see the tool 'CY Test Tool Protected Parameter' in the tool overview
When I click on the tool 'CY Test Tool Context Scope'
Then The tool launches without error
When I click on the tool 'CY Test Tool Protected Parameter'
Then I can see an error dialog

@stable_test
Scenario: Teacher fixes the incomplete tool so it is launchable
Given I am logged in as a 'teacher1_nbc' at 'nbc'
When I go to rooms overview
When I go to room 'Mathe (1)'
When I click on the tools tab
When I click on three dot menu of the tool 'CY Test Tool Protected Parameter'
When I click on the tool edit button of 'CY Test Tool Protected Parameter'
Then I can see the tool configuration page title
When I fill out the required value
When I confirm the update
Then I can see room page 'Mathe (1)'
Then I see the tool 'CY Test Tool Context Scope' is not marked as incomplete

@stable_test
Scenario: As a post-condition Teacher deletes the copied course
Given I see room page 'Mathe (1)'
When I click on edit course
When I click on the button delete course
When I click on the button delete on the modal to confirm the course deletion
Then I do not see the course 'Mathe (1)' on the room overview page

8 changes: 4 additions & 4 deletions cypress/e2e/course/showToolOutdated.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Feature: Course - Show outdated tool
When I go to rooms overview
When I go to room 'German'
When I click on the tools tab
Then I can see the outdated tool 'Cypress Test Tool School Scope' in the tool overview
When I click on the outdated tool 'Cypress Test Tool School Scope'
Then I can see the tool 'Cypress Test Tool School Scope' in the tool overview
When I click on the tool 'Cypress Test Tool School Scope'
Then I can see the outdated dialog of 'Cypress Test Tool School Scope'

@unstable_test
Expand All @@ -18,6 +18,6 @@ Feature: Course - Show outdated tool
When I go to rooms overview
When I go to room 'German'
When I click on the tools tab
Then I can see the outdated tool 'Cypress Test Tool School Scope' in the tool overview
When I click on the outdated tool 'Cypress Test Tool School Scope'
Then I can see the tool 'Cypress Test Tool School Scope' in the tool overview
When I click on the tool 'Cypress Test Tool School Scope'
Then I can see the outdated dialog of 'Cypress Test Tool School Scope'
Loading

0 comments on commit 4423b5e

Please sign in to comment.