-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1130 from Aam-Digital/master
Release 3.1.0
- Loading branch information
Showing
45 changed files
with
2,770 additions
and
1,795 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
describe("Scenario: Linking a child to a school - E2E test", () => { | ||
before(() => { | ||
// GIVEN I am on the details page of a child | ||
cy.visit(""); | ||
cy.create("Children", "E2E Child"); | ||
cy.create("Schools", "E2E School"); | ||
cy.get("[ng-reflect-angulartics-label=Children]").click(); | ||
}); | ||
|
||
// WHEN I add an entry in the 'Previous Schools' section with a specific school | ||
it("Add an entry in the Previous School section", function () { | ||
// type to the input "Filter" the name of child | ||
cy.get('[data-placeholder="e.g. name, age"]').type("E2E Child"); | ||
|
||
// Click on the Child in Table list | ||
cy.get("tbody > :nth-child(1)").click(); | ||
|
||
// get the Education button and click on it | ||
cy.contains("div", "Education").should("be.visible").click(); | ||
|
||
// get the Add School button and click on it | ||
cy.get( | ||
"app-previous-schools.ng-star-inserted > app-entity-subrecord > .mat-elevation-z1 > .mat-table > thead > .mat-header-row > .cdk-column-actions > .mat-focus-indicator" | ||
) | ||
.should("be.visible") | ||
.click(); | ||
|
||
// choose the school to add | ||
cy.get('[ng-reflect-placeholder="Select School"]') | ||
.type("E2E School") | ||
.click(); | ||
|
||
// save school in child profile | ||
cy.contains("button", "Save").click(); | ||
// wait for the popup-close animation | ||
cy.wait(100); | ||
}); | ||
|
||
// THEN I can see that child in the 'Children Overview' of the details page of this school | ||
it("Check for child in Children Overview of specific school", function () { | ||
// Click on the school that was added to the child profile | ||
cy.contains("span", "E2E School").click(); | ||
// Open the students overview | ||
cy.contains("div", "Students").should("be.visible").click(); | ||
|
||
// Check if student is in the school students list | ||
cy.contains("app-children-overview > app-entity-subrecord", "E2E Child"); | ||
}); | ||
}); |
61 changes: 0 additions & 61 deletions
61
e2e/integration/LinkingChildToSchool/LinkingChildToSchool.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
describe("Scenario: Marking a child as dropout - E2E test", () => { | ||
before(() => { | ||
// GIVEN I am on the details page of a specific child | ||
// go to the url with the Child | ||
cy.visit("child/1"); | ||
// save the name of this Child to the variable | ||
cy.get(".header-row > .header-title").invoke("text").as("childName"); | ||
}); | ||
|
||
// WHEN I select a dropout date for this child | ||
it("Select a dropout date for the child", function () { | ||
// click on "Dropout" menu | ||
cy.contains("Dropout").click(); | ||
cy.get("#mat-tab-label-0-7").click(); | ||
// click on button with the content "Edit" in Dropout menu. | ||
cy.contains("span", "Edit").should("be.visible").click(); | ||
// select today as the dropout date (which is initially marked as active) | ||
cy.get(".mat-datepicker-toggle-default-icon").click(); | ||
cy.get(".mat-calendar-body-active").click(); | ||
// click on button with the content "Save" | ||
cy.contains("span", "Save").should("be.visible").click(); | ||
}); | ||
|
||
// THEN I should not see this child in the list of all children at first | ||
it("This child is not in the list of all children at first", function () { | ||
// click on "Children" menu in navigation | ||
cy.get('[ng-reflect-angulartics-label="Children"]').click(); | ||
// type to the input "Filter" the name of child | ||
cy.get('[data-placeholder="e.g. name, age"]').type(this.childName); | ||
// find at this table the name of child and it should not exist | ||
cy.get("table").contains(this.childName.trim()).should("not.exist"); | ||
}); | ||
|
||
// AND I should see the child when I activate the 'inactive' filter | ||
it("The child is seen when the 'inactive' filter activated", function () { | ||
// click on the button with the content "Inactive" | ||
cy.get('[ng-reflect-placeholder="isActive"]').click(); | ||
cy.contains("span", "Inactive").should("be.visible").click(); | ||
// find at this table the name of child and it should exist | ||
cy.get("table").contains(this.childName.trim()).should("exist"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
describe("Scenario: Recording attendance of a child - E2E test", () => { | ||
before(() => { | ||
// GIVEN A specific child is attending a specific class | ||
cy.visit("attendance"); | ||
}); | ||
|
||
// WHEN I record attendance for this class | ||
it("Record attendance for the class", function () { | ||
cy.get(".mat-card", { timeout: 10000 }).should("be.visible").eq(0).click(); | ||
cy.contains("button", "Record").click(); | ||
}); | ||
|
||
// AND I set the attendance of the specific child to 'present' | ||
it("set the attendance of the specific child to 'present'", function () { | ||
cy.contains("button", "Show more").click({ scrollBehavior: "center" }); | ||
cy.contains("mat-card", "School Class") | ||
.eq(0) | ||
.click({ scrollBehavior: "center" }); | ||
cy.get(".options-wrapper > :nth-child(1)").click(); | ||
cy.get('[fxflex=""] > .ng-star-inserted > .mat-focus-indicator').click(); | ||
cy.contains("button", "Save").click(); | ||
}); | ||
|
||
// THEN in the details page of this child under 'attendance' for the specific class I should see a green background for the current day | ||
it("In the details page of this child under 'attendance' for the specific class should be a green background for the current day", function () { | ||
cy.get(".mat-card", { timeout: 10000 }) | ||
.should("be.visible") | ||
.eq(0) | ||
.click({ force: true }); | ||
// Click on ChildBlock inside roll-call to navigate to child | ||
cy.get(".navigation-bar > :nth-child(1)").click(); | ||
cy.get(".child-block").click(); | ||
cy.get("#mat-tab-label-0-2").click(); | ||
cy.get(".attendance-P").should( | ||
"have.css", | ||
"background-color", | ||
"rgb(200, 230, 201)" | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.