-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,399 @@ | ||
diff --git a/.eslintignore b/.eslintignore | ||
new file mode 100644 | ||
index 0000000..e5b1994 | ||
--- /dev/null | ||
+++ b/.eslintignore | ||
@@ -0,0 +1 @@ | ||
+playwright.config.ts | ||
diff --git a/.gitignore b/.gitignore | ||
index d452ac2..fbf8139 100644 | ||
--- a/.gitignore | ||
+++ b/.gitignore | ||
@@ -51 +51,4 @@ site | ||
*.session.sql | ||
+ | ||
+# E2E test reports | ||
+e2e-test-report/ | ||
diff --git a/backstage.json b/backstage.json | ||
index ec3742e..91037bd 100644 | ||
--- a/backstage.json | ||
+++ b/backstage.json | ||
@@ -1,3 +1,3 @@ | ||
{ | ||
- "version": "1.18.0-next.2" | ||
+ "version": "1.21.0" | ||
} | ||
diff --git a/lerna.json b/lerna.json | ||
index 322929d..529a62f 100644 | ||
--- a/lerna.json | ||
+++ b/lerna.json | ||
@@ -3,4 +3,4 @@ | ||
"npmClient": "yarn", | ||
- "useWorkspaces": true, | ||
- "version": "0.1.0" | ||
+ "version": "0.1.0", | ||
+ "$schema": "node_modules/lerna/schemas/lerna-schema.json" | ||
} | ||
diff --git a/package.json b/package.json | ||
index d76cc93..9300ca0 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -5,3 +5,3 @@ | ||
"engines": { | ||
- "node": "16 || 18" | ||
+ "node": "18 || 20" | ||
}, | ||
@@ -19,2 +19,4 @@ | ||
"test:all": "backstage-cli repo test --coverage", | ||
+ "test:e2e": "playwright test", | ||
+ "fix": "backstage-cli repo fix", | ||
"lint": "backstage-cli repo lint --since origin/master", | ||
@@ -31,9 +33,11 @@ | ||
"devDependencies": { | ||
- "@backstage/cli": "^0.22.13-next.2", | ||
+ "@backstage/cli": "^0.25.0", | ||
+ "@backstage/e2e-test-utils": "^0.1.0", | ||
+ "@playwright/test": "^1.32.3", | ||
"@spotify/prettier-config": "^12.0.0", | ||
"concurrently": "^8.0.0", | ||
- "lerna": "^4.0.0", | ||
+ "lerna": "^7.3.0", | ||
"node-gyp": "^9.0.0", | ||
"prettier": "^2.3.2", | ||
- "typescript": "~5.0.0" | ||
+ "typescript": "~5.2.0" | ||
}, | ||
diff --git a/packages/app/cypress.json b/packages/app/cypress.json | ||
deleted file mode 100644 | ||
index 0cb845a..0000000 | ||
--- a/packages/app/cypress.json | ||
+++ /dev/null | ||
@@ -1,6 +0,0 @@ | ||
-{ | ||
- "baseUrl": "http://localhost:3001", | ||
- "fixturesFolder": false, | ||
- "pluginsFile": false, | ||
- "retries": 3 | ||
-} | ||
diff --git a/packages/app/cypress/.eslintrc.json b/packages/app/cypress/.eslintrc.json | ||
deleted file mode 100644 | ||
index b903ff2..0000000 | ||
--- a/packages/app/cypress/.eslintrc.json | ||
+++ /dev/null | ||
@@ -1,12 +0,0 @@ | ||
-{ | ||
- "plugins": ["cypress"], | ||
- "extends": ["plugin:cypress/recommended"], | ||
- "rules": { | ||
- "jest/expect-expect": [ | ||
- "error", | ||
- { | ||
- "assertFunctionNames": ["expect", "cy.contains", "cy.**.should"] | ||
- } | ||
- ] | ||
- } | ||
-} | ||
diff --git a/packages/app/cypress/integration/app.js b/packages/app/cypress/integration/app.js | ||
deleted file mode 100644 | ||
index 43fb2e3..0000000 | ||
--- a/packages/app/cypress/integration/app.js | ||
+++ /dev/null | ||
@@ -1,6 +0,0 @@ | ||
-describe('App', () => { | ||
- it('should render the catalog', () => { | ||
- cy.visit('/'); | ||
- cy.contains('My Company Catalog'); | ||
- }); | ||
-}); | ||
diff --git a/packages/app/e2e-tests/app.test.ts b/packages/app/e2e-tests/app.test.ts | ||
new file mode 100644 | ||
index 0000000..d45bc0d | ||
--- /dev/null | ||
+++ b/packages/app/e2e-tests/app.test.ts | ||
@@ -0,0 +1,23 @@ | ||
+/* | ||
+ * Copyright 2020 The Backstage Authors | ||
+ * | ||
+ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
+ * you may not use this file except in compliance with the License. | ||
+ * You may obtain a copy of the License at | ||
+ * | ||
+ * http://www.apache.org/licenses/LICENSE-2.0 | ||
+ * | ||
+ * Unless required by applicable law or agreed to in writing, software | ||
+ * distributed under the License is distributed on an "AS IS" BASIS, | ||
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
+ * See the License for the specific language governing permissions and | ||
+ * limitations under the License. | ||
+ */ | ||
+ | ||
+import { test, expect } from '@playwright/test'; | ||
+ | ||
+test('App should render the welcome page', async ({ page }) => { | ||
+ await page.goto('/'); | ||
+ | ||
+ await expect(page.getByText('My Company Catalog')).toBeVisible(); | ||
+}); | ||
diff --git a/packages/app/package.json b/packages/app/package.json | ||
index a06e5c1..fa53fd0 100644 | ||
--- a/packages/app/package.json | ||
+++ b/packages/app/package.json | ||
@@ -13,34 +13,30 @@ | ||
"test": "backstage-cli package test", | ||
- "lint": "backstage-cli package lint", | ||
- "test:e2e": "cross-env PORT=3001 start-server-and-test start http://localhost:3001 cy:dev", | ||
- "test:e2e:ci": "cross-env PORT=3001 start-server-and-test start http://localhost:3001 cy:run", | ||
- "cy:dev": "cypress open", | ||
- "cy:run": "cypress run --browser chrome" | ||
+ "lint": "backstage-cli package lint" | ||
}, | ||
"dependencies": { | ||
- "@backstage/app-defaults": "^1.4.3-next.2", | ||
- "@backstage/catalog-model": "^1.4.2-next.1", | ||
- "@backstage/cli": "^0.22.13-next.2", | ||
- "@backstage/core-app-api": "^1.10.0-next.2", | ||
- "@backstage/core-components": "^0.13.5-next.2", | ||
- "@backstage/core-plugin-api": "^1.6.0-next.2", | ||
- "@backstage/integration-react": "^1.1.19-next.2", | ||
- "@backstage/plugin-api-docs": "^0.9.11-next.2", | ||
- "@backstage/plugin-catalog": "^1.13.0-next.2", | ||
- "@backstage/plugin-catalog-common": "^1.0.16-next.1", | ||
- "@backstage/plugin-catalog-graph": "^0.2.36-next.2", | ||
- "@backstage/plugin-catalog-import": "^0.9.14-next.2", | ||
- "@backstage/plugin-catalog-react": "^1.8.4-next.2", | ||
- "@backstage/plugin-github-actions": "^0.6.5-next.2", | ||
- "@backstage/plugin-org": "^0.6.14-next.2", | ||
- "@backstage/plugin-permission-react": "^0.4.15-next.2", | ||
- "@backstage/plugin-scaffolder": "^1.14.5-next.2", | ||
- "@backstage/plugin-search": "^1.4.0-next.2", | ||
- "@backstage/plugin-search-react": "^1.7.0-next.2", | ||
- "@backstage/plugin-tech-radar": "^0.6.8-next.2", | ||
- "@backstage/plugin-techdocs": "^1.7.0-next.2", | ||
- "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.0-next.2", | ||
- "@backstage/plugin-techdocs-react": "^1.1.10-next.2", | ||
- "@backstage/plugin-user-settings": "^0.7.9-next.2", | ||
- "@backstage/theme": "^0.4.1", | ||
+ "@backstage/app-defaults": "^1.4.6", | ||
+ "@backstage/catalog-model": "^1.4.3", | ||
+ "@backstage/cli": "^0.25.0", | ||
+ "@backstage/core-app-api": "^1.11.2", | ||
+ "@backstage/core-components": "^0.13.9", | ||
+ "@backstage/core-plugin-api": "^1.8.1", | ||
+ "@backstage/integration-react": "^1.1.22", | ||
+ "@backstage/plugin-api-docs": "^0.10.2", | ||
+ "@backstage/plugin-catalog": "^1.16.0", | ||
+ "@backstage/plugin-catalog-common": "^1.0.19", | ||
+ "@backstage/plugin-catalog-graph": "^0.3.2", | ||
+ "@backstage/plugin-catalog-import": "^0.10.4", | ||
+ "@backstage/plugin-catalog-react": "^1.9.2", | ||
+ "@backstage/plugin-github-actions": "^0.6.9", | ||
+ "@backstage/plugin-org": "^0.6.18", | ||
+ "@backstage/plugin-permission-react": "^0.4.18", | ||
+ "@backstage/plugin-scaffolder": "^1.17.0", | ||
+ "@backstage/plugin-search": "^1.4.4", | ||
+ "@backstage/plugin-search-react": "^1.7.4", | ||
+ "@backstage/plugin-tech-radar": "^0.6.11", | ||
+ "@backstage/plugin-techdocs": "^1.9.2", | ||
+ "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.3", | ||
+ "@backstage/plugin-techdocs-react": "^1.1.14", | ||
+ "@backstage/plugin-user-settings": "^0.7.14", | ||
+ "@backstage/theme": "^0.5.0", | ||
"@material-ui/core": "^4.12.2", | ||
@@ -55,3 +51,4 @@ | ||
"devDependencies": { | ||
- "@backstage/test-utils": "^1.4.3-next.2", | ||
+ "@backstage/test-utils": "^1.4.6", | ||
+ "@playwright/test": "^1.32.3", | ||
"@testing-library/jest-dom": "^5.10.1", | ||
@@ -61,6 +58,3 @@ | ||
"@types/react-dom": "*", | ||
- "cross-env": "^7.0.0", | ||
- "cypress": "^9.7.0", | ||
- "eslint-plugin-cypress": "^2.10.3", | ||
- "start-server-and-test": "^1.10.11" | ||
+ "cross-env": "^7.0.0" | ||
}, | ||
diff --git a/packages/app/public/index.html b/packages/app/public/index.html | ||
index c6083b3..fc758ee 100644 | ||
--- a/packages/app/public/index.html | ||
+++ b/packages/app/public/index.html | ||
@@ -10,3 +10,2 @@ | ||
/> | ||
- <link rel="apple-touch-icon" href="<%= publicPath %>/logo192.png" /> | ||
<!-- | ||
diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx | ||
index 6722ea2..7c6a71e 100644 | ||
--- a/packages/app/src/components/catalog/EntityPage.tsx | ||
+++ b/packages/app/src/components/catalog/EntityPage.tsx | ||
@@ -302,5 +302,8 @@ const groupPage = ( | ||
</Grid> | ||
- <Grid item xs={12}> | ||
+ <Grid item xs={12} md={6}> | ||
<EntityMembersListCard /> | ||
</Grid> | ||
+ <Grid item xs={12} md={6}> | ||
+ <EntityLinksCard /> | ||
+ </Grid> | ||
</Grid> | ||
diff --git a/packages/backend/Dockerfile b/packages/backend/Dockerfile | ||
index a60fee7..18548e9 100644 | ||
--- a/packages/backend/Dockerfile | ||
+++ b/packages/backend/Dockerfile | ||
@@ -11,3 +11,3 @@ | ||
|
||
-FROM node:16-bullseye-slim | ||
+FROM node:18-bookworm-slim | ||
|
||
diff --git a/packages/backend/package.json b/packages/backend/package.json | ||
index e200431..e2d21bf 100644 | ||
--- a/packages/backend/package.json | ||
+++ b/packages/backend/package.json | ||
@@ -18,21 +18,24 @@ | ||
"dependencies": { | ||
- "@backstage/backend-common": "^0.19.5-next.2", | ||
- "@backstage/backend-tasks": "^0.5.8-next.2", | ||
- "@backstage/catalog-client": "^1.4.4-next.1", | ||
- "@backstage/catalog-model": "^1.4.2-next.1", | ||
- "@backstage/config": "^1.1.0-next.1", | ||
- "@backstage/plugin-app-backend": "^0.3.51-next.2", | ||
- "@backstage/plugin-auth-backend": "^0.18.9-next.2", | ||
- "@backstage/plugin-auth-node": "^0.3.0-next.2", | ||
- "@backstage/plugin-catalog-backend": "^1.13.0-next.2", | ||
- "@backstage/plugin-permission-common": "^0.7.8-next.1", | ||
- "@backstage/plugin-permission-node": "^0.7.14-next.2", | ||
- "@backstage/plugin-proxy-backend": "^0.3.3-next.2", | ||
- "@backstage/plugin-scaffolder-backend": "^1.16.6-next.2", | ||
- "@backstage/plugin-search-backend": "^1.4.3-next.2", | ||
- "@backstage/plugin-search-backend-module-pg": "^0.5.12-next.2", | ||
- "@backstage/plugin-search-backend-node": "^1.2.7-next.2", | ||
- "@backstage/plugin-techdocs-backend": "^1.7.0-next.2", | ||
+ "@backstage/backend-common": "^0.20.0", | ||
+ "@backstage/backend-tasks": "^0.5.13", | ||
+ "@backstage/catalog-client": "^1.5.0", | ||
+ "@backstage/catalog-model": "^1.4.3", | ||
+ "@backstage/config": "^1.1.1", | ||
+ "@backstage/plugin-app-backend": "^0.3.56", | ||
+ "@backstage/plugin-auth-backend": "^0.20.1", | ||
+ "@backstage/plugin-auth-node": "^0.4.2", | ||
+ "@backstage/plugin-catalog-backend": "^1.16.0", | ||
+ "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.5", | ||
+ "@backstage/plugin-permission-common": "^0.7.11", | ||
+ "@backstage/plugin-permission-node": "^0.7.19", | ||
+ "@backstage/plugin-proxy-backend": "^0.4.6", | ||
+ "@backstage/plugin-scaffolder-backend": "^1.19.2", | ||
+ "@backstage/plugin-search-backend": "^1.4.8", | ||
+ "@backstage/plugin-search-backend-module-catalog": "^0.1.12", | ||
+ "@backstage/plugin-search-backend-module-pg": "^0.5.17", | ||
+ "@backstage/plugin-search-backend-module-techdocs": "^0.1.12", | ||
+ "@backstage/plugin-search-backend-node": "^1.2.12", | ||
+ "@backstage/plugin-techdocs-backend": "^1.9.1", | ||
"app": "link:../app", | ||
- "better-sqlite3": "^8.0.0", | ||
+ "better-sqlite3": "^9.0.0", | ||
"dockerode": "^3.3.1", | ||
@@ -40,3 +43,4 @@ | ||
"express-promise-router": "^4.1.0", | ||
- "pg": "^8.3.0", | ||
+ "node-gyp": "^9.0.0", | ||
+ "pg": "^8.11.3", | ||
"winston": "^3.2.1" | ||
@@ -44,3 +48,3 @@ | ||
"devDependencies": { | ||
- "@backstage/cli": "^0.22.13-next.2", | ||
+ "@backstage/cli": "^0.25.0", | ||
"@types/dockerode": "^3.3.0", | ||
diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts | ||
index 1c08288..04c4ff9 100644 | ||
--- a/packages/backend/src/index.ts | ||
+++ b/packages/backend/src/index.ts | ||
@@ -41,3 +41,3 @@ function makeCreateEnv(config: Config) { | ||
const tokenManager = ServerTokenManager.noop(); | ||
- const taskScheduler = TaskScheduler.fromConfig(config); | ||
+ const taskScheduler = TaskScheduler.fromConfig(config, { databaseManager }); | ||
|
||
diff --git a/packages/backend/src/plugins/catalog.ts b/packages/backend/src/plugins/catalog.ts | ||
index 876cb6b..4decdca 100644 | ||
--- a/packages/backend/src/plugins/catalog.ts | ||
+++ b/packages/backend/src/plugins/catalog.ts | ||
@@ -1,3 +1,3 @@ | ||
import { CatalogBuilder } from '@backstage/plugin-catalog-backend'; | ||
-import { ScaffolderEntitiesProcessor } from '@backstage/plugin-scaffolder-backend'; | ||
+import { ScaffolderEntitiesProcessor } from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model'; | ||
import { Router } from 'express'; | ||
diff --git a/packages/backend/src/plugins/search.ts b/packages/backend/src/plugins/search.ts | ||
index e9469dc..467ac60 100644 | ||
--- a/packages/backend/src/plugins/search.ts | ||
+++ b/packages/backend/src/plugins/search.ts | ||
@@ -7,4 +7,4 @@ import { | ||
import { PluginEnvironment } from '../types'; | ||
-import { DefaultCatalogCollatorFactory } from '@backstage/plugin-catalog-backend'; | ||
-import { DefaultTechDocsCollatorFactory } from '@backstage/plugin-techdocs-backend'; | ||
+import { DefaultCatalogCollatorFactory } from '@backstage/plugin-search-backend-module-catalog'; | ||
+import { DefaultTechDocsCollatorFactory } from '@backstage/plugin-search-backend-module-techdocs'; | ||
import { Router } from 'express'; | ||
diff --git a/playwright.config.ts b/playwright.config.ts | ||
new file mode 100644 | ||
index 0000000..37c7fb1 | ||
--- /dev/null | ||
+++ b/playwright.config.ts | ||
@@ -0,0 +1,60 @@ | ||
+/* | ||
+ * Copyright 2023 The Backstage Authors | ||
+ * | ||
+ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
+ * you may not use this file except in compliance with the License. | ||
+ * You may obtain a copy of the License at | ||
+ * | ||
+ * http://www.apache.org/licenses/LICENSE-2.0 | ||
+ * | ||
+ * Unless required by applicable law or agreed to in writing, software | ||
+ * distributed under the License is distributed on an "AS IS" BASIS, | ||
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
+ * See the License for the specific language governing permissions and | ||
+ * limitations under the License. | ||
+ */ | ||
+ | ||
+import { defineConfig } from '@playwright/test'; | ||
+import { generateProjects } from '@backstage/e2e-test-utils/playwright'; | ||
+ | ||
+/** | ||
+ * See https://playwright.dev/docs/test-configuration. | ||
+ */ | ||
+export default defineConfig({ | ||
+ timeout: 60_000, | ||
+ | ||
+ expect: { | ||
+ timeout: 5_000, | ||
+ }, | ||
+ | ||
+ // Run your local dev server before starting the tests | ||
+ webServer: process.env.CI | ||
+ ? [] | ||
+ : [ | ||
+ { | ||
+ command: 'yarn start', | ||
+ port: 3000, | ||
+ reuseExistingServer: true, | ||
+ timeout: 60_000, | ||
+ }, | ||
+ ], | ||
+ | ||
+ forbidOnly: !!process.env.CI, | ||
+ | ||
+ retries: process.env.CI ? 2 : 0, | ||
+ | ||
+ reporter: [['html', { open: 'never', outputFolder: 'e2e-test-report' }]], | ||
+ | ||
+ use: { | ||
+ actionTimeout: 0, | ||
+ baseURL: | ||
+ process.env.PLAYWRIGHT_URL ?? | ||
+ (process.env.CI ? 'http://localhost:7007' : 'http://localhost:3000'), | ||
+ screenshot: 'only-on-failure', | ||
+ trace: 'on-first-retry', | ||
+ }, | ||
+ | ||
+ outputDir: 'node_modules/.cache/e2e-test-results', | ||
+ | ||
+ projects: generateProjects(), // Find all packages with e2e-test folders | ||
+}); |