Skip to content

Commit

Permalink
release: v0.37.0 (#236)
Browse files Browse the repository at this point in the history
* feat: Update test blocks (#220)

* chore: Add new micro-services to docker-compose file

* feat: Update test block

* test: Add test to ensure teachers can update and delete tests blocks

* feat: Submit to test block (#221)

* chore(deps): Add `shadcn` tabs component

* fix: Add missing keys when rendering laboratory blocks

* feat: Submit to test blocks

* feat: Get submission status (#227)

* Add new font and load it from tailwind config

* feat: Get submission real time updates

* fix: Disable react strict mode

* fix: Remove unnecessary react-lazy usages

* perf: Remove barrel files and import some components lazily

* feat: Laboratory progress and statistics (#232)

* chore(deps): Add chart and `tanstak/query` dependencies

* refactor: Configure tanstack query provider

* feat: Add "view progress" button to laboratory table

* feat: Fetch students progress

* feat: Add horizontal bar chart to display students' progress

* feat: Create laboratory completion doughnut chart

* feat: Add average completed tests doughnut chart

* refactor: Update fetching and create mutations with `tanstack/query` (#233)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
PedroChaparro and dependabot[bot] authored Jan 13, 2024
1 parent 171cf91 commit eaf0d26
Show file tree
Hide file tree
Showing 128 changed files with 3,471 additions and 2,521 deletions.
20 changes: 10 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# [0.33.0](https://github.com/upb-code-labs/react-client/compare/v0.32.0...v0.33.0) (2024-01-01)
# [0.37.0](https://github.com/upb-code-labs/react-client/compare/v0.36.0...v0.37.0) (2024-01-12)


### Features

* 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))
* Laboratory progress and statistics ([#232](https://github.com/upb-code-labs/react-client/issues/232)) ([52406a5](https://github.com/upb-code-labs/react-client/commit/52406a57c8474e8d9d2f5de10bb46ed3048fe8ab))



# [0.32.0](https://github.com/upb-code-labs/react-client/compare/v0.31.0...v0.32.0) (2023-12-31)
# [0.36.0](https://github.com/upb-code-labs/react-client/compare/v0.35.0...v0.36.0) (2024-01-09)


### Features

* 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))
* Get submission status ([#227](https://github.com/upb-code-labs/react-client/issues/227)) ([feff79c](https://github.com/upb-code-labs/react-client/commit/feff79c31521fdeb2bb430fadc9671a10f048256))



# [0.31.0](https://github.com/upb-code-labs/react-client/compare/v0.30.0...v0.31.0) (2023-12-31)
# [0.35.0](https://github.com/upb-code-labs/react-client/compare/v0.34.0...v0.35.0) (2024-01-08)


### Features

* Delete tests block ([2c0e6d4](https://github.com/upb-code-labs/react-client/commit/2c0e6d4c6c21ff0f6e74e93ef5535d4f688a8ef0))
* Submit to test block ([#221](https://github.com/upb-code-labs/react-client/issues/221)) ([4ce7d19](https://github.com/upb-code-labs/react-client/commit/4ce7d196ae097374efe71c5b4751f1a8aac3543e))



# [0.30.0](https://github.com/upb-code-labs/react-client/compare/v0.29.0...v0.30.0) (2023-12-31)
# [0.34.0](https://github.com/upb-code-labs/react-client/compare/v0.33.0...v0.34.0) (2024-01-08)


### Features

* 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))
* Update test blocks ([#220](https://github.com/upb-code-labs/react-client/issues/220)) ([147f3db](https://github.com/upb-code-labs/react-client/commit/147f3db5efaa1ca325e8b9ac7dd8e66981c79ec8))



# [0.29.0](https://github.com/upb-code-labs/react-client/compare/v0.28.0...v0.29.0) (2023-12-31)
# [0.33.0](https://github.com/upb-code-labs/react-client/compare/v0.32.0...v0.33.0) (2024-01-01)


### Features

* 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))
* 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))



39 changes: 38 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,24 @@ services:
ports:
- "127.0.0.1:5432:5432"

codelabs_rabbitmq:
image: docker.io/library/rabbitmq:3.12.11-management-alpine
container_name: codelabs_rabbitmq
restart: on-failure
environment:
RABBITMQ_DEFAULT_USER: rabbitmq
RABBITMQ_DEFAULT_PASS: rabbitmq
ports:
- "127.0.0.1:5672:5672"
- "127.0.0.1:15672:15672"

# Microservices
codelabs_static_files:
image: ghcr.io/upb-code-labs/static-files-microservice:latest
container_name: codelabs_static_files
restart: on-failure
environment:
- GIN_MODE=release
ports:
- "127.0.0.1:8081:8080"
depends_on:
Expand All @@ -28,15 +41,39 @@ services:
container_name: codelabs_main_api
restart: on-failure
environment:
- ENVIRONMENT=production
- GIN_MODE=release
- DB_CONNECTION_STRING=postgres://postgres:postgres@codelabs_postgres_db:5432/codelabs?sslmode=disable
- RABBIT_MQ_CONNECTION_STRING=amqp://rabbitmq:rabbitmq@codelabs_rabbitmq:5672/
- STATIC_FILES_MICROSERVICE_ADDRESS=http://codelabs_static_files:8080
ports:
- "127.0.0.1:8080:8080"
depends_on:
- codelabs_postgres_db
- codelabs_rabbitmq
- codelabs_static_files

codelabs_tests_runner:
image: ghcr.io/upb-code-labs/tests-microservice:latest
container_name: codelabs_tests_runner
restart: on-failure
environment:
- STATIC_FILES_MICROSERVICE_ADDRESS=http://codelabs_static_files:8080
- RABBIT_MQ_CONNECTION_STRING=amqp://rabbitmq:rabbitmq@codelabs_rabbitmq:5672/
depends_on:
- codelabs_static_files
- codelabs_rabbitmq

codelabs_submissions_status_updater:
image: ghcr.io/upb-code-labs/submissions-status-updater-microservice:latest
container_name: codelabs_submissions_status_updater
restart: on-failure
environment:
- DB_CONNECTION_STRING=postgres://postgres:postgres@codelabs_postgres_db:5432/codelabs?sslmode=disable
- RABBIT_MQ_CONNECTION_STRING=amqp://rabbitmq:rabbitmq@codelabs_rabbitmq:5672/
depends_on:
- codelabs_rabbitmq
- codelabs_postgres_db

# Utils
postgres_db_admin:
image: docker.io/dpage/pgadmin4:7.6
Expand Down
4 changes: 1 addition & 3 deletions e2e/courses/EnrollStudent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ test.describe.serial("Enroll student workflow", () => {
await studentButton.click();

// Assert an alert is shown
await expect(
page.getByText("Student was enrolled successfully")
).toBeVisible();
await expect(page.getByText("Student enrolled successfully")).toBeVisible();

// Close the dialog
await page.keyboard.press("Escape");
Expand Down
2 changes: 1 addition & 1 deletion e2e/courses/JoinCourse.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test.describe.serial("Join courses workflow", () => {

// Assert an alert is shown
await expect(
page.getByText("Course was created successfully")
page.getByText("The course was created successfully")
).toBeVisible();

// Assert the modal is closed
Expand Down
8 changes: 2 additions & 6 deletions e2e/courses/ToggleCourseVisibility.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ test.describe.serial("User can toggle the course visibility", () => {
await expect(dropdownMenu).not.toBeVisible();

// Assert an alert is shown
await expect(
page.getByText("Course visibility was updated successfully")
).toBeVisible();
await expect(page.getByText("Course hidden successfully")).toBeVisible();

// Assert the course is not listed in the "Your courses" list
await expect(page.getByText(courseName)).not.toBeVisible();
Expand Down Expand Up @@ -117,9 +115,7 @@ test.describe.serial("User can toggle the course visibility", () => {
await expect(dropdownMenu).not.toBeVisible();

// Assert an alert is shown
await expect(
page.getByText("Course visibility was updated successfully")
).toBeVisible();
await expect(page.getByText("Course shown successfully")).toBeVisible();

// Close the "Hidden courses" list
await page.getByText("Hidden courses", { exact: true }).click();
Expand Down
40 changes: 38 additions & 2 deletions e2e/laboratories/edit-laboratory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,27 @@ test.describe.serial("Edit laboratory workflow", () => {
page.getByText("The new test block has been created successfully")
).toBeVisible();

// Assert teachers can download the language template from the test block
const blockLanguageDownloadButton = page.getByLabel(
"Download language template for block number 1"
);
await expect(blockLanguageDownloadButton).toBeVisible();

// Assert the template is downloaded
const blockLanguageDownloadPromise = page.waitForEvent("download");

await blockLanguageDownloadButton.click();
const blockLanguageDownloadEvent = await blockLanguageDownloadPromise;
await blockLanguageDownloadEvent.saveAs(
join(__dirname, "data", "java-downloaded.zip")
);

// ## Edit the test block
// Update the block name
const nameInput = page.getByLabel("Block name");
await expect(nameInput).toBeVisible();
await nameInput.fill("New test block name");

// Open block dropdown
const blockDropdownButton = page.getByRole("button", {
name: "Toggle options for block number 1"
Expand All @@ -242,7 +263,6 @@ test.describe.serial("Edit laboratory workflow", () => {
await blockDropdownButton.click();

// Click on the save option
/**
const saveBlockButton = page.getByRole("menuitem", {
name: "Save changes"
});
Expand All @@ -253,6 +273,22 @@ test.describe.serial("Edit laboratory workflow", () => {
await expect(
page.getByText("The test block has been updated successfully")
).toBeVisible();
*/

// ## Delete the test block
await blockDropdownButton.click();
const deleteBlockButton = page.getByRole("menuitem", {
name: "Delete block"
});

await expect(deleteBlockButton).toBeVisible();
await deleteBlockButton.click();

// Assert an alert is shown
await expect(
page.getByText("The test block has been deleted successfully")
).toBeVisible();

// Assert the block is not shown
await expect(page.getByLabel("Block name")).not.toBeVisible();
});
});
10 changes: 5 additions & 5 deletions e2e/rubrics/EditRubric.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ test.describe.serial("Rubrics edition workflow", () => {

// Assert an alert is shown
await expect(
page.getByText("Rubric name has been updated successfully")
page.getByText("Rubric renamed successfully")
).toBeVisible();

// Reload the page and assert the rubric name was updated
Expand Down Expand Up @@ -180,7 +180,7 @@ test.describe.serial("Rubrics edition workflow", () => {

// Assert the changes were saved
await expect(
page.getByText("The objective has been updated successfully")
page.getByText("Objective updated successfully")
).toBeVisible();

// Reload the page and assert the changes were saved
Expand Down Expand Up @@ -232,7 +232,7 @@ test.describe.serial("Rubrics edition workflow", () => {

// Assert the changes were saved
await expect(
page.getByText("The criteria has been updated successfully")
page.getByText("Criteria updated successfully")
).toBeVisible();

// Reload the page and assert the changes were saved
Expand Down Expand Up @@ -290,7 +290,7 @@ test.describe.serial("Rubrics edition workflow", () => {

// Assert an alert is shown
await expect(
page.getByText("The criteria has been deleted successfully")
page.getByText("Criteria deleted successfully")
).toBeVisible();
});

Expand Down Expand Up @@ -331,7 +331,7 @@ test.describe.serial("Rubrics edition workflow", () => {

// Assert an alert is shown
await expect(
page.getByText("The objective has been deleted successfully")
page.getByText("Objective deleted successfully")
).toBeVisible();

// Assert the objective was deleted
Expand Down
40 changes: 23 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-client",
"private": true,
"version": "0.33.0",
"version": "0.37.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -16,7 +16,8 @@
"format:fix": "prettier src/ --write"
},
"dependencies": {
"@hookform/resolvers": "3.3.3",
"@fontsource/ibm-plex-mono": "5.0.8",
"@hookform/resolvers": "3.3.4",
"@radix-ui/react-alert-dialog": "1.0.5",
"@radix-ui/react-dialog": "1.0.5",
"@radix-ui/react-dropdown-menu": "2.0.6",
Expand All @@ -25,19 +26,24 @@
"@radix-ui/react-select": "2.0.0",
"@radix-ui/react-separator": "1.0.3",
"@radix-ui/react-slot": "1.0.2",
"@tanstack/react-table": "8.11.2",
"@uiw/react-markdown-preview": "5.0.6",
"@uiw/react-md-editor": "4.0.2",
"axios": "1.6.3",
"@radix-ui/react-tabs": "^1.0.4",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query-devtools": "^5.17.9",
"@tanstack/react-table": "8.11.4",
"@uiw/react-markdown-preview": "5.0.7",
"@uiw/react-md-editor": "4.0.3",
"axios": "1.6.5",
"chart.js": "4.4.1",
"class-variance-authority": "0.7.0",
"clsx": "2.1.0",
"dayjs": "1.11.10",
"lucide-react": "0.303.0",
"lucide-react": "0.309.0",
"react": "18.2.0",
"react-chartjs-2": "5.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.49.2",
"react-hook-form": "7.49.3",
"react-lazily": "^0.9.2",
"react-router-dom": "6.21.1",
"react-router-dom": "6.21.2",
"rehype-external-links": "3.0.0",
"rehype-sanitize": "6.0.0",
"sonner": "1.3.1",
Expand All @@ -50,22 +56,22 @@
"@faker-js/faker": "8.3.1",
"@playwright/test": "1.40.1",
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/node": "20.10.6",
"@types/react": "18.2.46",
"@types/node": "20.11.0",
"@types/react": "18.2.47",
"@types/react-dom": "18.2.18",
"@typescript-eslint/eslint-plugin": "6.16.0",
"@typescript-eslint/parser": "6.16.0",
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"@vitejs/plugin-react-swc": "3.5.0",
"autoprefixer": "10.4.16",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.5",
"postcss": "8.4.32",
"postcss": "8.4.33",
"prettier": "3.1.1",
"prettier-plugin-tailwindcss": "0.5.10",
"tailwindcss": "3.3.5",
"prettier-plugin-tailwindcss": "0.5.11",
"tailwindcss": "3.4.1",
"typescript": "5.3.3",
"vite": "5.0.10"
"vite": "5.0.11"
}
}
Loading

0 comments on commit eaf0d26

Please sign in to comment.