-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Create laboratory (#173) * feat: List laboratories (#177) * feat: Create and edit markdown blocks (#183) * feat: Sort enrolled students by full name (#201) * feat: Create test blocks (#203) * feat: Delete markdown block (#205) * chore(deps): Bump dependencies (#206) * feat: Download language template (#209) * build: Update nginx config (#210) * feat: Show laboratory content to students (#211) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d198c9c
commit 171cf91
Showing
110 changed files
with
5,875 additions
and
685 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,45 +1,45 @@ | ||
# [0.24.0](https://github.com/upb-code-labs/react-client/compare/v0.23.0...v0.24.0) (2023-11-19) | ||
# [0.33.0](https://github.com/upb-code-labs/react-client/compare/v0.32.0...v0.33.0) (2024-01-01) | ||
|
||
|
||
### Features | ||
|
||
* Delete rubric objective ([#143](https://github.com/upb-code-labs/react-client/issues/143)) ([f869366](https://github.com/upb-code-labs/react-client/commit/f869366463800ae0525a4faed4f0c71d97d3ec04)) | ||
* Show laboratory content to students ([#211](https://github.com/upb-code-labs/react-client/issues/211)) ([6d7c2e4](https://github.com/upb-code-labs/react-client/commit/6d7c2e45527ca3d0f3122d5a6ffbd3d43f4495af)) | ||
|
||
|
||
|
||
# [0.23.0](https://github.com/upb-code-labs/react-client/compare/v0.22.0...v0.23.0) (2023-11-19) | ||
# [0.32.0](https://github.com/upb-code-labs/react-client/compare/v0.31.0...v0.32.0) (2023-12-31) | ||
|
||
|
||
### Features | ||
|
||
* Delete criteria ([#142](https://github.com/upb-code-labs/react-client/issues/142)) ([e645ff6](https://github.com/upb-code-labs/react-client/commit/e645ff6a47b80df019a165c3434a077cbed07a13)) | ||
* Download language template ([#209](https://github.com/upb-code-labs/react-client/issues/209)) ([d2f1b9c](https://github.com/upb-code-labs/react-client/commit/d2f1b9cf758e2f3507b41c355304134dcc373740)) | ||
|
||
|
||
|
||
# [0.22.0](https://github.com/upb-code-labs/react-client/compare/v0.21.0...v0.22.0) (2023-11-18) | ||
# [0.31.0](https://github.com/upb-code-labs/react-client/compare/v0.30.0...v0.31.0) (2023-12-31) | ||
|
||
|
||
### Features | ||
|
||
* Update criteria ([#141](https://github.com/upb-code-labs/react-client/issues/141)) ([489403e](https://github.com/upb-code-labs/react-client/commit/489403e541a0158688bdb706c12561f847af7674)) | ||
* Delete tests block ([2c0e6d4](https://github.com/upb-code-labs/react-client/commit/2c0e6d4c6c21ff0f6e74e93ef5535d4f688a8ef0)) | ||
|
||
|
||
|
||
# [0.21.0](https://github.com/upb-code-labs/react-client/compare/v0.20.0...v0.21.0) (2023-11-18) | ||
# [0.30.0](https://github.com/upb-code-labs/react-client/compare/v0.29.0...v0.30.0) (2023-12-31) | ||
|
||
|
||
### Features | ||
|
||
* Update rubric objective ([#140](https://github.com/upb-code-labs/react-client/issues/140)) ([7dffd39](https://github.com/upb-code-labs/react-client/commit/7dffd3963c9567327f0ed6eb4838949cf4568853)) | ||
* Delete markdown block ([#205](https://github.com/upb-code-labs/react-client/issues/205)) ([e19079f](https://github.com/upb-code-labs/react-client/commit/e19079f1a137854c612b110a3bec13526746a426)) | ||
|
||
|
||
|
||
# [0.20.0](https://github.com/upb-code-labs/react-client/compare/v0.19.0...v0.20.0) (2023-11-17) | ||
# [0.29.0](https://github.com/upb-code-labs/react-client/compare/v0.28.0...v0.29.0) (2023-12-31) | ||
|
||
|
||
### Features | ||
|
||
* Update rubric name ([#139](https://github.com/upb-code-labs/react-client/issues/139)) ([8d46db1](https://github.com/upb-code-labs/react-client/commit/8d46db16ca01d1081e6664d86bcf2b0fac2e4751)) | ||
* Create test blocks ([#203](https://github.com/upb-code-labs/react-client/issues/203)) ([a1a975f](https://github.com/upb-code-labs/react-client/commit/a1a975f3b0eafa25dc6349be4511ee417845e20f)) | ||
|
||
|
||
|
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,88 @@ | ||
import { expect, test } from "@playwright/test"; | ||
import { | ||
getDefaultPassword, | ||
getDevelopmentAdminCredentials, | ||
getRandomEmail, | ||
getRandomName | ||
} from "e2e/Utils"; | ||
|
||
test.describe.serial("Teachers can create laboratories", () => { | ||
const teacherEmail = getRandomEmail(); | ||
const teacherPassword = getDefaultPassword(); | ||
const courseName = "Create laboratories - course"; | ||
|
||
test("Register test teacher", async ({ page }) => { | ||
// Login as an admin | ||
const adminCredentials = getDevelopmentAdminCredentials(); | ||
await page.goto("/login"); | ||
await page.getByLabel("Email").fill(adminCredentials.email); | ||
await page.getByLabel("Password").fill(adminCredentials.password); | ||
await page.getByRole("button", { name: "Submit" }).click(); | ||
|
||
// Register a teacher | ||
await page | ||
.getByRole("link", { name: "Register Teachers", exact: true }) | ||
.click(); | ||
await page.getByLabel("Full name").fill(getRandomName()); | ||
await page.getByLabel("Email").fill(teacherEmail); | ||
await page.getByLabel("Password").fill(teacherPassword); | ||
await page.getByRole("button", { name: "Submit" }).click(); | ||
}); | ||
|
||
test("Create test course", async ({ page }) => { | ||
// Login as a teacher | ||
await page.goto("/login"); | ||
await page.getByLabel("Email").fill(teacherEmail); | ||
await page.getByLabel("Password").fill(teacherPassword); | ||
await page.getByRole("button", { name: "Submit" }).click(); | ||
|
||
// Create a course | ||
const createCourseButton = page.getByRole("button", { | ||
name: "Create a new course" | ||
}); | ||
await createCourseButton.click(); | ||
await page.getByLabel("Name").fill(courseName); | ||
await page.getByRole("button", { name: "Create" }).click(); | ||
}); | ||
|
||
test("Create a laboratory", async ({ page }) => { | ||
// Login as a teacher | ||
await page.goto("/login"); | ||
await page.getByLabel("Email").fill(teacherEmail); | ||
await page.getByLabel("Password").fill(teacherPassword); | ||
await page.getByRole("button", { name: "Submit" }).click(); | ||
|
||
// Go to the course page | ||
await page.getByRole("link", { name: courseName }).click(); | ||
|
||
// Open the modal | ||
const createLaboratoryButton = page.getByRole("button", { | ||
name: "Create Laboratory" | ||
}); | ||
await createLaboratoryButton.click(); | ||
|
||
// Assert the modal is open | ||
await expect(page.getByRole("dialog")).toBeVisible(); | ||
|
||
// Fill the form | ||
const laboratoryName = "Laboratory 1"; | ||
await page.getByLabel("Name").fill(laboratoryName); | ||
await page.getByLabel("Opening date").fill("2023-12-01T00:00"); | ||
await page.getByLabel("Closing date").fill("2023-12-01T23:59"); | ||
await page.getByRole("button", { name: "Create" }).click(); | ||
|
||
// Assert the modal is close and an alert is shown | ||
await expect(page.getByRole("dialog")).not.toBeVisible(); | ||
await expect( | ||
page.getByText("The laboratory has been created successfully") | ||
).toBeVisible(); | ||
|
||
// Assert the laboratory is created | ||
await expect(page.getByText("Laboratory 1")).toBeVisible(); | ||
|
||
// Assert actions buttons are shown | ||
await expect( | ||
page.getByRole("link", { name: `Edit ${laboratoryName} laboratory` }) | ||
).toBeVisible(); | ||
}); | ||
}); |
Binary file not shown.
Oops, something went wrong.