-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
121 changed files
with
49,097 additions
and
48,220 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
# Apexo Dental Clinic Manager | ||
|
||
### Building from source & Deployment | ||
|
||
After cloning the repository, run `yarn install`, this will install the required dependencies. then run `yarn run prod` to build for production, or `yarn run dev` to build for development. | ||
|
||
### Scripts | ||
|
||
- `yarn run prod`: build for production. | ||
- `yarn run dev`: build for development. | ||
- `yarn run lint`: run ts-lint on the project. | ||
- `yarn run serve`: run a localhost server that serves the files in `dist/application/`. | ||
- `yarn run build-desktop`: will create a desktop electron application that loads the URL: `web.apexo.app`. | ||
- `yarn run upload`: will upload the files in `dist/application/` to `web.apexo.app` and `demo.apexo.app`. | ||
- `yarn run deploy`: will build the application in production mode and then upload it just like the aforementioned script. | ||
- `yarn run jest`: will run unit tests. | ||
- `yarn run cypress`: will run e2e tests. | ||
|
||
### Documentation | ||
|
||
- [Documentation](https://docs.apexo.app/) | ||
|
||
|
||
--- | ||
|
||
License: The MIT License (MIT) - Copyright (c) Alex Corvi | ||
# Apexo Dental Clinic Manager | ||
|
||
### Building from source & Deployment | ||
|
||
After cloning the repository, run `yarn install`, this will install the required dependencies. then run `yarn run prod` to build for production, or `yarn run dev` to build for development. | ||
|
||
### Scripts | ||
|
||
- `yarn run prod`: build for production. | ||
- `yarn run dev`: build for development. | ||
- `yarn run lint`: run ts-lint on the project. | ||
- `yarn run serve`: run a localhost server that serves the files in `dist/application/`. | ||
- `yarn run build-desktop`: will create a desktop electron application that loads the URL: `web.apexo.app`. | ||
- `yarn run upload`: will upload the files in `dist/application/` to `web.apexo.app` and `demo.apexo.app`. | ||
- `yarn run deploy`: will build the application in production mode and then upload it just like the aforementioned script. | ||
- `yarn run jest`: will run unit tests. | ||
- `yarn run cypress`: will run e2e tests. | ||
|
||
### Documentation | ||
|
||
- [Documentation](https://docs.apexo.app/) | ||
|
||
|
||
--- | ||
|
||
License: The MIT License (MIT) - Copyright (c) Alex Corvi |
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 |
---|---|---|
@@ -1,34 +1,34 @@ | ||
declare namespace Cypress { | ||
interface Chainable { | ||
offline(): void; | ||
online(): void; | ||
resetEverything(): void; | ||
solveMath(): void; | ||
getByTestId( | ||
testid: string, | ||
timeout?: number | ||
): Chainable<JQuery<HTMLElement>>; | ||
getInputByLabel( | ||
label: string, | ||
type?: string | ||
): Chainable<JQuery<HTMLElement>>; | ||
ensureLoginType(type: string): void; | ||
ensurePage(namespace: string): void; | ||
goToPage(namespace: string): void; | ||
slowType(input: string): void; | ||
closePanel(): void; | ||
clickItem(contains: string): void; | ||
clickBtn(contains: string): void; | ||
clickTabByIcon(icon: string): void; | ||
chooseFromDropdown(className: string, choice: string | number): void; | ||
pickDate( | ||
className: string, | ||
pick: | ||
| "today" | ||
| "tomorrow" | ||
| "yesterday" | ||
| "past-month" | ||
| "next-month" | ||
): void; | ||
} | ||
} | ||
declare namespace Cypress { | ||
interface Chainable { | ||
offline(): void; | ||
online(): void; | ||
resetEverything(): void; | ||
solveMath(): void; | ||
getByTestId( | ||
testid: string, | ||
timeout?: number | ||
): Chainable<JQuery<HTMLElement>>; | ||
getInputByLabel( | ||
label: string, | ||
type?: string | ||
): Chainable<JQuery<HTMLElement>>; | ||
ensureLoginType(type: string): void; | ||
ensurePage(namespace: string): void; | ||
goToPage(namespace: string): void; | ||
slowType(input: string): void; | ||
closePanel(): void; | ||
clickItem(contains: string): void; | ||
clickBtn(contains: string): void; | ||
clickTabByIcon(icon: string): void; | ||
chooseFromDropdown(className: string, choice: string | number): void; | ||
pickDate( | ||
className: string, | ||
pick: | ||
| "today" | ||
| "tomorrow" | ||
| "yesterday" | ||
| "past-month" | ||
| "next-month" | ||
): void; | ||
} | ||
} |
202 changes: 101 additions & 101 deletions
202
cypress/integration/common-components/appointments-lnd.spec.ts
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 |
---|---|---|
@@ -1,101 +1,101 @@ | ||
/// <reference types="cypress" /> | ||
/// <reference types="../../cypress" /> | ||
|
||
describe("appointments-lnd", () => { | ||
beforeEach(() => { | ||
cy.visit("http://localhost:8000"); | ||
cy.clearCookies(); | ||
cy.resetEverything(); | ||
cy.reload(); | ||
cy.wait(1000); | ||
cy.get(".no-server-mode").click(); | ||
cy.getByTestId("new-user-name") | ||
.type("Alex") | ||
.type("{enter}"); | ||
cy.ensureLoginType("no-server"); | ||
}); | ||
|
||
it("Appointments Listing", () => { | ||
const patients = ["Dina", "Bill", "William"]; | ||
const treatments = ["Filling", "Crowning", "RCT"]; | ||
const dates: Array<"yesterday" | "today" | "tomorrow"> = [ | ||
"yesterday", | ||
"today", | ||
"tomorrow" | ||
]; | ||
|
||
cy.goToPage("treatments"); | ||
treatments.forEach(treatmentName => { | ||
cy.get(`[title="Add new"]`).click(); | ||
cy.getByTestId("treatment-title").type(treatmentName); | ||
cy.closePanel(); | ||
}); | ||
|
||
cy.goToPage("patients"); | ||
patients.forEach(patientName => { | ||
cy.get(`[title="Add new"]`).click(); | ||
cy.getByTestId("patient-name").type(patientName); | ||
cy.clickTabByIcon("Calendar"); | ||
|
||
treatments.forEach((treatmentName, i) => { | ||
cy.chooseFromDropdown("new-appointment", treatmentName); | ||
cy.pickDate("appointment-date", dates[i]); | ||
cy.get(".operating-staff input").type("Al"); | ||
cy.get(".ms-Suggestions-item") | ||
.first() | ||
.click(); | ||
cy.closePanel(); | ||
}); | ||
|
||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", "Yesterday"); | ||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", "Missed"); | ||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", treatments[0]); | ||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", "Alex"); | ||
cy.get(".appointment-body") | ||
.eq(1) | ||
.should("contain.text", "Today"); | ||
cy.get(".appointment-body") | ||
.eq(1) | ||
.should("contain.text", treatments[1]); | ||
cy.get(".appointment-body") | ||
.eq(1) | ||
.should("contain.text", "Alex"); | ||
cy.get(".appointment-body") | ||
.eq(2) | ||
.should("contain.text", "Tomorrow"); | ||
cy.get(".appointment-body") | ||
.eq(2) | ||
.should("contain.text", treatments[2]); | ||
cy.get(".appointment-body") | ||
.eq(2) | ||
.should("contain.text", "Alex"); | ||
|
||
cy.get(".appointment-body") | ||
.eq(0) | ||
.click(); | ||
|
||
cy.get(".ms-Toggle") | ||
.contains("done") | ||
.click(); | ||
cy.closePanel(); | ||
|
||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", "Done"); | ||
|
||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("not.contain.text", "Missed"); | ||
|
||
cy.closePanel(); | ||
}); | ||
}); | ||
}); | ||
/// <reference types="cypress" /> | ||
/// <reference types="../../cypress" /> | ||
|
||
describe("appointments-lnd", () => { | ||
beforeEach(() => { | ||
cy.visit("http://localhost:8000"); | ||
cy.clearCookies(); | ||
cy.resetEverything(); | ||
cy.reload(); | ||
cy.wait(1000); | ||
cy.get(".no-server-mode").click(); | ||
cy.getByTestId("new-user-name") | ||
.type("Alex") | ||
.type("{enter}"); | ||
cy.ensureLoginType("no-server"); | ||
}); | ||
|
||
it("Appointments Listing", () => { | ||
const patients = ["Dina", "Bill", "William"]; | ||
const treatments = ["Filling", "Crowning", "RCT"]; | ||
const dates: Array<"yesterday" | "today" | "tomorrow"> = [ | ||
"yesterday", | ||
"today", | ||
"tomorrow" | ||
]; | ||
|
||
cy.goToPage("treatments"); | ||
treatments.forEach(treatmentName => { | ||
cy.get(`[title="Add new"]`).click(); | ||
cy.getByTestId("treatment-title").type(treatmentName); | ||
cy.closePanel(); | ||
}); | ||
|
||
cy.goToPage("patients"); | ||
patients.forEach(patientName => { | ||
cy.get(`[title="Add new"]`).click(); | ||
cy.getByTestId("patient-name").type(patientName); | ||
cy.clickTabByIcon("Calendar"); | ||
|
||
treatments.forEach((treatmentName, i) => { | ||
cy.chooseFromDropdown("new-appointment", treatmentName); | ||
cy.pickDate("appointment-date", dates[i]); | ||
cy.get(".operating-staff input").type("Al"); | ||
cy.get(".ms-Suggestions-item") | ||
.first() | ||
.click(); | ||
cy.closePanel(); | ||
}); | ||
|
||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", "Yesterday"); | ||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", "Missed"); | ||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", treatments[0]); | ||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", "Alex"); | ||
cy.get(".appointment-body") | ||
.eq(1) | ||
.should("contain.text", "Today"); | ||
cy.get(".appointment-body") | ||
.eq(1) | ||
.should("contain.text", treatments[1]); | ||
cy.get(".appointment-body") | ||
.eq(1) | ||
.should("contain.text", "Alex"); | ||
cy.get(".appointment-body") | ||
.eq(2) | ||
.should("contain.text", "Tomorrow"); | ||
cy.get(".appointment-body") | ||
.eq(2) | ||
.should("contain.text", treatments[2]); | ||
cy.get(".appointment-body") | ||
.eq(2) | ||
.should("contain.text", "Alex"); | ||
|
||
cy.get(".appointment-body") | ||
.eq(0) | ||
.click(); | ||
|
||
cy.get(".ms-Toggle") | ||
.contains("done") | ||
.click(); | ||
cy.closePanel(); | ||
|
||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("contain.text", "Done"); | ||
|
||
cy.get(".appointment-body") | ||
.eq(0) | ||
.should("not.contain.text", "Missed"); | ||
|
||
cy.closePanel(); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.