Skip to content

Commit

Permalink
request changes and adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorCapCoder committed Nov 2, 2023
1 parent 7a9280a commit 8b34756
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 24 deletions.
21 changes: 11 additions & 10 deletions cypress/e2e/class_management/groupMembers.feature
Original file line number Diff line number Diff line change
@@ -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
20 changes: 12 additions & 8 deletions cypress/e2e/class_management/showGroupsAndClassesInTable.feature
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
31 changes: 25 additions & 6 deletions cypress/support/pages/class_management/pageClasses.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]';
Expand Down Expand Up @@ -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');
}
Expand Down Expand Up @@ -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/');
}
Expand Down Expand Up @@ -190,12 +215,6 @@ class Classes {
seeClassMemberInfoBoxText() {
cy.get(Classes.#classMemberInfoBoxText).should('be.visible')
}

clickManageGroupButton(){
cy.get(Classes.#manageGroupButton)
.first().click();
}

}

export default Classes
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})

0 comments on commit 8b34756

Please sign in to comment.