diff --git a/cypress/e2e/class_management/groupMembers.feature b/cypress/e2e/class_management/groupMembers.feature index 6f7a5ff8..8ecc7f69 100644 --- a/cypress/e2e/class_management/groupMembers.feature +++ b/cypress/e2e/class_management/groupMembers.feature @@ -1,20 +1,21 @@ -@release +#@release +@unstable_test Feature: Group - To show members in a group As a teacher I want to see the members in a group - @stable_test + #@stable_test Scenario: As a teacher I can manage a group of type class from external systems Given I am logged in as a 'teacher1_nbc' at 'nbc' When I go to administration page - And I go to new class administration page + When I go to new class administration page Then I see the new class administration page - And I can see the group 'Cypress-Test-Group' with source 'moin.schule' - And the group 'Cypress-Test-Group' has a manage button + Then I can see the group 'Cypress-Test-Group' with source 'moin.schule' + Then I can see the manage button for group 'Cypress-Test-Group' When I click the manage group button Then I can see the manage group page - And I can see the manage group page title - And I can see the group member table - And I can see the 'Lehrkraft' with name 'Herzog' - And I can see the infobox - And I can see the infotext + Then I can see the manage group page title + Then I can see the group member table + Then I can see the 'Lehrkraft' with name 'Herzog' + Then I can see the infobox + Then I can see the infotext diff --git a/cypress/e2e/class_management/showGroupsAndClassesInTable.feature b/cypress/e2e/class_management/showGroupsAndClassesInTable.feature index 5242ff90..748abb2f 100644 --- a/cypress/e2e/class_management/showGroupsAndClassesInTable.feature +++ b/cypress/e2e/class_management/showGroupsAndClassesInTable.feature @@ -1,9 +1,10 @@ -@release +#@release +@unstable_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. - @stable_test + #@stable_test Scenario: As a teacher i can add a class to school Given I am logged in as a 'teacher1_nbc' at 'nbc' When I go to administration page @@ -20,16 +21,18 @@ Feature: Group - To show groups and classes in one table with respective functio When I confirm managing the class Then I see the new class administration page - @stable_test + #@stable_test Scenario: As a teacher i can see all classes and groups of my school on the new class administration page. Given I see the new class administration page Then I can see the page title + Then I can see 3 tabs + Then I can see 5 columns in the table Then I can see the group 'Cypress-Test-Group' with source 'moin.schule' Then I can see the class '1' without source Then I can see the manage button for group 'Cypress-Test-Group' Then I can see 4 enabled action items for class '1' - @stable_test + #@stable_test Scenario: As a teacher i can manage my classes Given I see the new class administration page When I click the manage button @@ -42,7 +45,7 @@ Feature: Group - To show groups and classes in one table with respective functio When I confirm managing the class Then I see the new class administration page - @stable_test + #@stable_test Scenario: As a teacher i can edit my classes Given I see the new class administration page When I click the edit button @@ -56,7 +59,7 @@ Feature: Group - To show groups and classes in one table with respective functio Then I can click on the save changes button Then I see the new class administration page - @stable_test + #@stable_test Scenario: As a teacher i can upgrade my upgradable classes Given I see the new class administration page When I click the create successor button @@ -71,7 +74,7 @@ Feature: Group - To show groups and classes in one table with respective functio Then I see the new class administration page Then I can see the disabled create successor button of the original class - @stable_test + #@stable_test Scenario: As a teacher i can delete my classes Given I see the new class administration page When I click the delete button @@ -82,9 +85,10 @@ Feature: Group - To show groups and classes in one table with respective functio When I click the confirmation button on the delete modal Then I see the new class administration page - @stable_test + #@stable_test Scenario: As a post-condition teacher deletes the successor class and logs out Given I see the new class administration page + When I click on the next year tab When I click the delete button When I click the confirmation button on the delete modal Then I see the new class administration page diff --git a/cypress/support/pages/class_management/pageClasses.js b/cypress/support/pages/class_management/pageClasses.js index 85e60197..f4b20bac 100644 --- a/cypress/support/pages/class_management/pageClasses.js +++ b/cypress/support/pages/class_management/pageClasses.js @@ -6,6 +6,9 @@ class Classes { static #manageConfirm = '[data-testid="manage-confirm"]'; static #classTitleNew = '[data-testid="admin-class-title"]'; static #classTableNew = '[data-testid="admin-class-table"]'; + static #nextYearTab = '[data-testid="admin-class-next-year-tab"]' + static #currentYearTab = '[data-testid="admin-class-current-year-tab"]' + static #previousYearsTab = '[data-testid="admin-class-previous-years-tab"]' static #manageClassButton = '[data-testid="legacy-class-table-manage-btn"]'; static #cancelModal = '[data-testid="modal_content"]'; static #editClassButton = '[data-testid="class-table-edit-btn"]'; @@ -93,6 +96,16 @@ class Classes { .click(); } + clickManageGroupButton() { + cy.get(Classes.#manageGroupButton) + .first().click(); + } + + clickNextYearTab() { + cy.get(Classes.#nextYearTab) + .click(); + } + isNewClassAdministrationPage() { cy.url().should('include', '/administration/groups/classes'); } @@ -162,6 +175,18 @@ class Classes { }) } + seeTableHas5Columns() { + const tableHeader = cy.get(Classes.#classTableNew).find('th') + + tableHeader.should('have.length', 5); + } + + see3Tabs() { + cy.get(Classes.#nextYearTab).should('exist') + cy.get(Classes.#currentYearTab).should('exist').and('have.class', 'v-tab v-tab--active') + cy.get(Classes.#previousYearsTab).should('exist') + } + seeManageGroupPage(){ cy.url().should('include', '/administration/groups/classes/'); } @@ -190,12 +215,6 @@ class Classes { seeClassMemberInfoBoxText() { cy.get(Classes.#classMemberInfoBoxText).should('be.visible') } - - clickManageGroupButton(){ - cy.get(Classes.#manageGroupButton) - .first().click(); - } - } export default Classes diff --git a/cypress/support/step_definition/class_management/commonClassesSteps.spec.js b/cypress/support/step_definition/class_management/commonClassesSteps.spec.js index f7a17ba4..ca63153b 100644 --- a/cypress/support/step_definition/class_management/commonClassesSteps.spec.js +++ b/cypress/support/step_definition/class_management/commonClassesSteps.spec.js @@ -49,3 +49,11 @@ Then('I can see the manage button for group {string}', (groupName) => { Then('I can see 4 enabled action items for class {string}', (className) => { classes.seeClassesHave4ActiveActionItems(className); }) + +Then('I can see 5 columns in the table', () => { + classes.seeTableHas5Columns(); +}) + +Then('I can see 3 tabs', () => { + classes.see3Tabs(); +}) diff --git a/cypress/support/step_definition/class_management/showGroupsAndClassesInTableSteps.spec.js b/cypress/support/step_definition/class_management/showGroupsAndClassesInTableSteps.spec.js index af369e72..037a9851 100644 --- a/cypress/support/step_definition/class_management/showGroupsAndClassesInTableSteps.spec.js +++ b/cypress/support/step_definition/class_management/showGroupsAndClassesInTableSteps.spec.js @@ -85,3 +85,7 @@ Then('I can see the create class page', () => { When('I click the cancel create class button', () => { classes.clickCancelButton(); }) + +When('I click on the next year tab', () => { + classes.clickNextYearTab(); +})