Skip to content

Commit

Permalink
Upgraded to Backstage core 1.22.1, support for React v18... (#204)
Browse files Browse the repository at this point in the history
Upgraded to Backstage core 1.22.1, support for React v18, Node 20, Cypress e2e test migrated to [Playwright](https://playwright.dev/) and more.

BREAKING CHANGES:

- `EntityScoreExtended` new required property `id:string` added to fullfill the Material UI Table row ID needs. Fix your clients by providing e.g. `stringifyEntityRef(score.entityRef)` as a value for the id.
  • Loading branch information
jvilimek committed Jan 21, 2024
1 parent d03c358 commit 32cc2fb
Show file tree
Hide file tree
Showing 28 changed files with 11,098 additions and 8,382 deletions.
9 changes: 9 additions & 0 deletions .changeset/hungry-trees-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@oriflame/backstage-plugin-score-card': minor
---

Upgraded to Backstage core 1.22.1, support for React v18, Node 20, Cypress e2e test migrated to [Playwright](https://playwright.dev/) and more.

BREAKING CHANGES:

- `EntityScoreExtended` new required property `id:string` added to fullfill the Material UI Table row ID needs. Fix your clients by providing e.g. `stringifyEntityRef(score.entityRef)` as a value for the id.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,5 @@ dist-workspace
coverage
*.lcov

# cypress screenshots and videos output

**/cypress-out/
# E2E test reports
e2e-test-report/
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ If you are proposing a feature:

As the number of plugins included in this repository increases, so does importance of good E2E tests which will make sure everything runs as it is expected. In order to contribute to this, very important aspect, of this repository, we urge you to follow guidelines below:

E2E tests are integrated under `/packages/app/cypress` folder where you will find specific E2E test for every plugin under `/packages/app/cypress/integrations`. This means you should follow that pattern and add tests in appropriate plugin test files. We would also encourage you to add more fixtures under `/packages/app/cypress/fixtures`. For testing purposes you can use `test-entity.yaml` file which can be found under `/packages/entities`, which we have created especially for this purpose.
E2E tests are integrated under `/packages/app/e2e-tests` folder where you will find specific E2E test for every plugin. This means you should follow that pattern and add tests in appropriate plugin test files. For testing purposes you can use `test-entity.yaml` file which can be found under `/packages/entities`, which we have created especially for this purpose.

As an engine for the testing we are using [Playwright](https://playwright.dev/).

To execute end to end test locally you would need to install [dependencies](https://playwright.dev/docs/browsers#install-system-dependencies). TL/DR: run `npx playwright install-deps`.

### Add your company to ADOPTERS

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Oriflame Backstage plugins.

You may find our plugins in the `./plugins` folder. You may start each plugin in isolated mode (navigate to the plugin folder and run `yarn dev` or `yarn start:dev`, see respective README). You may start also the simple backstage host with the plugins integrated via `yarn dev` (in root folder). You may run `yarn test` to run jest tests. For more information see [CONTRIBUTING.md](./CONTRIBUTING.md).

List of prerequisites are [same as for the backstage](https://backstage.io/docs/getting-started/#prerequisites). Please use Node.js version `20.x`.

## List of plugins

Name | Version | Description
Expand Down
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.10.1"
"version": "1.22.1"
}
6 changes: 0 additions & 6 deletions lerna.json

This file was deleted.

49 changes: 26 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
"OSWDVLPPlatform@oriflame.com",
"GlobalITCOEdevelopmentTooling@Oriflame.com"
],
"version": "0.1.19",
"version": "0.2.0",
"private": true,
"engines": {
"node": "14 || 16"
"node": "18 || 20"
},
"scripts": {
"dev": "concurrently \"yarn start\" \"yarn start-backend\" \"http-server -p 8090 --cors 2>&1\"",
"start": "yarn workspace app start",
"start-backend": "yarn workspace backend start",
"build": "backstage-cli repo build --all",
"tsc": "tsc",
"tsc:full": "backstage-cli clean && tsc --skipLibCheck true --incremental false",
"clean": "backstage-cli clean && lerna run clean",
"diff": "lerna run diff --",
"test": "backstage-cli test",
"test:all": "lerna run test -- --coverage",
"test:e2e": "yarn workspace app cypress run",
"tsc:full": "backstage-cli repo clean && tsc --skipLibCheck true --incremental false",
"clean": "backstage-cli repo clean",
"test": "backstage-cli repo test",
"test:all": "backstage-cli repo test --coverage",
"test:e2e": "tsc && playwright test",
"fix": "backstage-cli repo fix",
"lint": "backstage-cli repo lint --since origin/main",
"lint:all": "backstage-cli repo lint",
"lint:type-deps": "node scripts/check-type-dependencies.js",
"create-plugin": "backstage-cli create-plugin --scope ori --no-private",
"remove-plugin": "backstage-cli remove-plugin",
"release": "node scripts/prepare-release.js && changeset version && yarn diff --yes && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}' '.changeset/*.json' && yarn install",
"lint:type-deps": "backstage-repo-tools type-deps",
"new": "backstage-cli new --scope ori --baseVersion 0.0.0 --no-private",
"create-plugin": "echo \"use 'yarn new' instead\"",
"release": "node scripts/prepare-release.js && changeset version && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}' '.changeset/*.json' && yarn install --no-immutable",
"prettier:check": "prettier --check .",
"lerna": "lerna",
"prettier:fix": "prettier --write .",
"lock:check": "yarn-lock-check"
},
"workspaces": {
Expand All @@ -40,26 +40,29 @@
]
},
"resolutions": {
"@types/react": "^17",
"@types/react-dom": "^17",
"@types/react": "^18",
"@types/react-dom": "^18",
"dockerode": "3.3.4",
"@types/dockerode": "3.3.9"
"@types/dockerode": "3.3.9",
"jest-environment-jsdom": "30.0.0-alpha.2"
},
"dependencies": {
"@changesets/cli": "2.25.2"
"@changesets/cli": "2.25.2",
"jest-environment-jsdom": "30.0.0-alpha.2"
},
"devDependencies": {
"@backstage/cli": "^0.22.1",
"@backstage/cli": "^0.25.1",
"@backstage/e2e-test-utils": "^0.1.0",
"@backstage/repo-tools": "^0.5.2",
"@spotify/prettier-config": "14.1.4",
"@types/webpack": "5.28.0",
"concurrently": "7.5.0",
"eslint-plugin-notice": "0.9.10",
"lerna": "5.6.2",
"prettier": "2.7.1",
"typescript": "4.8.4",
"@types/react": "17.0.52",
"react": "17.0.2",
"react-dom": "17.0.2"
"typescript": "~5.2.0",
"@types/react": "^18",
"react": "^18.0.0",
"@types/react-dom": "^18"
},
"prettier": "@spotify/prettier-config",
"lint-staged": {
Expand Down
3 changes: 0 additions & 3 deletions packages/app/cypress.env.json

This file was deleted.

14 changes: 0 additions & 14 deletions packages/app/cypress.json

This file was deleted.

21 changes: 0 additions & 21 deletions packages/app/cypress/.eslintrc.json

This file was deleted.

81 changes: 0 additions & 81 deletions packages/app/cypress/integration/scoreboard.ts

This file was deleted.

37 changes: 0 additions & 37 deletions packages/app/cypress/plugins/index.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/app/cypress/settings.ts

This file was deleted.

42 changes: 0 additions & 42 deletions packages/app/cypress/support/index.ts

This file was deleted.

30 changes: 0 additions & 30 deletions packages/app/cypress/types.d.ts

This file was deleted.

Loading

0 comments on commit 32cc2fb

Please sign in to comment.