Skip to content

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
turegjorup committed Oct 23, 2024
2 parents 0207326 + 50daf04 commit 8255ee4
Show file tree
Hide file tree
Showing 169 changed files with 7,337 additions and 22,398 deletions.
1 change: 1 addition & 0 deletions vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
7 changes: 7 additions & 0 deletions .docker/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ server {
proxy_set_header Host $http_host;
proxy_pass http://node:3000;
}

location /admin/ws {
proxy_pass http://node:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"airbnb",
"prettier",
"plugin:jsdoc/recommended",
"plugin:prettier/recommended",
"plugin:cypress/recommended"
"plugin:prettier/recommended"
],
"ignorePatterns": ["*.yml"],
"parser": "babel-eslint",
Expand All @@ -14,6 +13,7 @@
"allowImportExportEverywhere": true
},
"rules": {
"react/require-default-props": "off",
"react/jsx-filename-extension": [
"warn",
{
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ jobs:
docker compose run --rm node yarn install
docker compose run --rm node yarn check-coding-standards
cypress:
name: Cypress
playwright-tests:
name: Playwright
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: ["chrome"]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -48,16 +46,21 @@ jobs:
- name: Install client
run: docker compose run node yarn

- name: Cypress run
run: docker compose run cypress run --browser ${{ matrix.browser }}
- name: Run playwright
env:
CI: 'true'
run: |
docker compose run --rm node yarn install
docker compose run --rm playwright npx playwright install --with-deps
docker compose run --rm playwright npx playwright test --retries 3
- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-screenshots-${{ matrix.browser }}
path: cypress/screenshots
retention-days: 7
name: playwright-report
path: playwright-report/
retention-days: 30

changelog:
runs-on: ubuntu-latest
Expand Down
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ yarn-error.log*
# Ignore VS-code
.vscode

# Cypress
cypress/videos/*
cypress/screenshots/*

# Temp files
temp/

# API mock
json-server/
# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

# Json files in public folder
public/config.json
public/access-config.json
public/release.json
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@

# Changelog

All notable changes to this project will be documented in this file.

## [Unreleased]

## [2.1.0] - 2024-10-23

- [#258](https://github.com/os2display/display-admin-client/pull/258)
- Fixed screen is vertical check.
- [#257](https://github.com/os2display/display-admin-client/pull/257)
- Update multiselect component
- Change key in function from `id` to `@id`
- [#256](https://github.com/os2display/display-admin-client/pull/256)
- Fixed published from/to texts.
- [#255](https://github.com/os2display/display-admin-client/pull/255)
- Fixed rejseplanen component so it does not throw errors when searching for stops.
- [#254](https://github.com/os2display/display-admin-client/pull/254)
- Changed playlist.slides list columns.
- Set published.to to now when creating new slides.
- Added option to sort slides in playlist by published.to and status.
- [#253](https://github.com/os2display/display-admin-client/pull/253)
- Refactored scheduling to increase user experience.
- Added interval and count to rrule inputs.
- [#249](https://github.com/os2display/display-admin-client/pull/249)
- Set infrastructure node version to 20.
- Fixed base path to /admin in vite setup.
- Changed from vite CJS to ESM.
- Removed array spread.
- Fixed HMR setup.
- Upgraded @fortawesome/react-fontawesome, react-quill, react-toastify.
- Removed unused react-dayjs.
- Remove default props from the project.
- Migrate from Cypress to playwright
- Migrate from CRA to Vite
- Upgrade node from 14 -> 20

## [2.0.3] - 2024-08-14

- [#252](https://github.com/os2display/display-admin-client/pull/252)
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description of the admin.

### Create public/config file

By default the api that is requested is located at `/api/`.
By default, the api that is requested is located at `/api/`.
This can be configured by:

```shell
Expand Down Expand Up @@ -62,14 +62,20 @@ docker compose exec node npm --prefix src/redux/api install
docker compose exec node npm --prefix src/redux/api start
```

## Testing with cypress
## Testing with playwright

We use [cypress](https://www.cypress.io/) for testing.
We use [playwright](https://playwright.dev/) for testing.

To run cypress tests in the cypress container:
To run playwright tests with docker:

```shell
docker compose run --rm cypress run
docker compose run --rm playwright npx playwright test
```

To test with user interface, up the containers and change the baseUrl in playwright.config.ts, then:

```shell
yarn playwright test --ui
```

### Linting
Expand Down
9 changes: 0 additions & 9 deletions config-overrides.js

This file was deleted.

6 changes: 0 additions & 6 deletions cypress/fixtures/error.json

This file was deleted.

20 changes: 0 additions & 20 deletions cypress/fixtures/groups/group-successful.json

This file was deleted.

146 changes: 0 additions & 146 deletions cypress/fixtures/groups/groups.json

This file was deleted.

Loading

0 comments on commit 8255ee4

Please sign in to comment.