Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Release #1306

Merged
merged 12 commits into from
Jun 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ RUN if [ "$SENTRY_AUTH_TOKEN" != "" ] ; then \

### PROD image

FROM nginx:1.21-alpine
FROM nginx:1.22.0-alpine
COPY ./build/default.conf /etc/nginx/templates/default.conf
COPY --from=builder /app/dist/ /usr/share/nginx/html
# The port on which the app will run in the Docker container
Expand Down
10 changes: 5 additions & 5 deletions doc/compodoc_sources/concepts/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ As permissions cannot directly be created and edited from within the app at the
Look for or create the document with `"_id": "Config:Permissions"` and define the permissions as described above.
2. After saving the new permissions document, update the replication backend about the updated permissions:
Visit `https://<your-system-domain>/db/api/` to use the OpenAPI interface for this.
3. There in `Servers` select `/db deployed`
4. Use your CouchDB admin credentials in the `POST /_session` endpoint to get a valid access token.
5. Make a request to the `POST /rules/reload` endpoint. If successful, the response will show the newly fetched rules.
3. There in `Servers` select `/db deployed`.
4. Click on `Authorize` enter valid user credentials and click `Login`.
5. Make a request to the `POST /rules/{db}/reload` endpoint, where `{db}` is the active database, e.g. `app`. If successful, the response will show the newly fetched rules.
6. In case some users might have **gained** access to documents to which they did not have access before,
also trigger the `POST /clear_local` endpoint.
The `/clear_local` endpoint will ensure that each client re-checks whether new objects are available for synchronization.
also trigger the `POST /{db}/clear_local` endpoint, where `{db}` again is the active database.
The `/{db}/clear_local` endpoint will ensure that each client re-checks whether new objects are available for synchronization.
This should also be used in case an existing user has gotten a new, more powerful role.
In case a user lost permissions for objects that were already synced, this users local DB will automatically be destroyed and the user has to synchronize all data again.

Expand Down
11 changes: 4 additions & 7 deletions e2e/integration/LinkingChildToSchool.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
describe("Scenario: Linking a child to a school - E2E test", () => {
before(() => {
// GIVEN I am on the details page of a child
describe("Scenario: Linking a child to a school - E2E test", function () {
before("GIVEN I am on the details page of a child", function () {
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 () {
it("WHEN I add an entry in the 'Previous Schools' section with a specific school", function () {
// type to the input "Filter" the name of child
cy.get('[data-placeholder="e.g. name, age"]').type("E2E Child");

Expand Down Expand Up @@ -36,8 +34,7 @@ describe("Scenario: Linking a child to a school - E2E test", () => {
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 () {
it("THEN I can see that child in the 'Children Overview' of the details page of this school", function () {
// Click on the school that was added to the child profile
cy.contains("span", "E2E School").click();
// Open the students overview
Expand Down
14 changes: 5 additions & 9 deletions e2e/integration/MarkingChildAsDropout.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
describe("Scenario: Marking a child as dropout - E2E test", () => {
before(() => {
// GIVEN I am on the details page of a specific child
describe("Scenario: Marking a child as dropout - E2E test", function () {
before("GIVEN I am on the details page of a specific child", function () {
// 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 () {
it("WHEN I select a dropout date for this child", () => {
// click on "Dropout" menu
cy.contains("Dropout").click();
cy.get("#mat-tab-label-0-7").click();
Expand All @@ -21,8 +19,7 @@ describe("Scenario: Marking a child as dropout - E2E test", () => {
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 () {
it("THEN I should not see this child 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
Expand All @@ -31,8 +28,7 @@ describe("Scenario: Marking a child as dropout - E2E test", () => {
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 () {
it("AND I should see the child when I activate the 'inactive' filter", function () {
// click on the button with the content "Inactive"
cy.get('[ng-reflect-placeholder="isActive"]').click();
cy.contains("span", "Inactive").should("be.visible").click();
Expand Down
32 changes: 14 additions & 18 deletions e2e/integration/RecordingAttendanceOfChild.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
describe("Scenario: Recording attendance of a child - E2E test", () => {
before(() => {
// GIVEN A specific child is attending a specific class
describe("Scenario: Recording attendance of a child - E2E test", function () {
before("GIVEN A specific child is attending a specific class", function () {
cy.visit("attendance");
});

// WHEN I record attendance for this class
it("Record attendance for the class", function () {
it("WHEN I record attendance for this class", () => {
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 () {
it("AND I 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(".mat-body-1").invoke("text").as("childName");
cy.get(".group-select-option").contains("Present").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();
it("THEN in the details page of this child under 'attendance' for the specific class I should see a green background for the current day", function () {
cy.get("#mat-input-2")
.focus()
.type(this.childName)
.wait(500)
.type("{downArrow}")
.type("{enter}");
cy.get("#mat-tab-label-0-2").click();
cy.get(".attendance-P").should(
cy.get(".mat-calendar-body-active").should(
"have.css",
"background-color",
"rgb(200, 230, 201)"
Expand Down
53 changes: 53 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"deep-object-diff": "^1.1.7",
"faker": "^5.5.3",
"flag-icon-css": "^3.5.0",
"hammerjs": "^2.0.8",
"json-query": "^2.2.2",
"lodash": "^4.17.21",
"md5": "^2.3.0",
Expand Down Expand Up @@ -80,8 +81,11 @@
"@types/crypto-js": "^4.0.2",
"@types/faker": "^5.5.7",
"@types/file-saver": "^2.0.3",
"@types/hammerjs": "^2.0.41",
"@types/jasmine": "~3.8.2",
"@types/json-query": "^2.2.3",
"@types/lodash": "^4.14.168",
"@types/md5": "^2.3.2",
"@types/node": "^14.14.31",
"@types/pouchdb": "^6.4.0",
"@types/uuid": "^8.3.4",
Expand Down
Loading