Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6ec4e58
feat(e2e): introduce e2e tests for bulk-import plugin
AndrienkoAleksandr Feb 25, 2026
fcc4b66
feat(e2e): fix code format
AndrienkoAleksandr Feb 26, 2026
7d8780c
feat(e2e): fix tsc check
AndrienkoAleksandr Feb 26, 2026
d08bb82
feat(e2e): fix up
AndrienkoAleksandr Feb 26, 2026
941e476
feat(e2e): use newer e2e library
AndrienkoAleksandr Mar 3, 2026
178d6f3
feat(e2e): skip custom fixture
AndrienkoAleksandr Mar 3, 2026
cacda26
feat(e2e): format code
AndrienkoAleksandr Mar 5, 2026
b93a3c9
feat(e2e): fix eslint
AndrienkoAleksandr Mar 5, 2026
1dc8c67
feat(e2e): use newer e2e lib with improved timeout
AndrienkoAleksandr Mar 5, 2026
fc13f18
feat(e2e): use test github credentials
AndrienkoAleksandr Mar 5, 2026
78ed445
feat(e2e): use another github org to fit with credentials
AndrienkoAleksandr Mar 10, 2026
1fec661
feat(e2e): use custom github helper with token
04kash Mar 10, 2026
4aae874
feat(e2e): use token for integrations
AndrienkoAleksandr Mar 10, 2026
a3ba882
feat(e2e): keep just needed secret values
AndrienkoAleksandr Mar 10, 2026
6875a6e
feat(e2e): fix some sonar cloud issues, typos
AndrienkoAleksandr Mar 10, 2026
cd004f3
feat(e2e): use origin APIHelper
AndrienkoAleksandr Mar 10, 2026
9e1e0cd
feat(e2e): use e2e-test-utils for orchestrator
AndrienkoAleksandr Mar 25, 2026
148d4ba
feat(e2e): fix github token env var name
AndrienkoAleksandr Mar 25, 2026
af4544f
feat(e2e): don't patch env variable
AndrienkoAleksandr Mar 25, 2026
f3f811a
feat(e2e): handle code review feedback
AndrienkoAleksandr Mar 26, 2026
9487bbd
feat(e2e): migrate bulk-import tests from rhdh repo
AndrienkoAleksandr Apr 19, 2026
3ab157f
feat(e2e): fix org links
AndrienkoAleksandr Apr 19, 2026
4cfe167
feat(e2e): fix lint
AndrienkoAleksandr Apr 19, 2026
71e6553
feat(e2e): fix failing e2e test
AndrienkoAleksandr Apr 19, 2026
093b3ae
feat(e2e): fix failing test
AndrienkoAleksandr Apr 19, 2026
fbef1ee
feat(e2e): remove hard coded image
AndrienkoAleksandr Apr 19, 2026
0ef3306
feat(e2e): handle code review feedback
AndrienkoAleksandr Apr 21, 2026
ba168cc
feat(e2e): split bulk-import test into two files
AndrienkoAleksandr Apr 22, 2026
4ab915c
feat(bulk-import): attempt to make everything working after update
AndrienkoAleksandr May 10, 2026
ed01f0e
feat(e2e): fix repository links
AndrienkoAleksandr May 14, 2026
c6a1c20
feat(e2e): try to use newer image
AndrienkoAleksandr May 16, 2026
a1c5e03
feat(e2e): work on e2e tests
AndrienkoAleksandr May 19, 2026
fd69065
feat(e2e): swap to github auth for login
PatAKnight May 19, 2026
77141de
feat(e2e): update yarn lock
PatAKnight May 19, 2026
f3a94be
feat(e2e): remove OAuth app creation
PatAKnight May 19, 2026
0676b45
feat(e2e): add auth providers to app-config
PatAKnight May 19, 2026
88241ea
feat(e2e): swap verify with checkAndClick
PatAKnight May 19, 2026
c8ac580
feat(e2e): attempt to wait of initial github popup
PatAKnight May 19, 2026
f8daf10
feat(e2e): swap isVisible with toBeVisible
PatAKnight May 19, 2026
af9aa91
feat(e2e): remove or for toBeVisible
PatAKnight May 19, 2026
77ad2b6
feat(e2e): attempt to wait for the popup
PatAKnight May 19, 2026
b2f7173
feat(e2e): handle gitlab auth popup as well
PatAKnight May 19, 2026
4c0c9c8
feat(e2e): handle auth across tests
PatAKnight May 20, 2026
d8affcb
feat(e2e): bump test utils and simplify beforeEach
PatAKnight May 20, 2026
4beabac
feat(e2e): reject gitlab login for orchestrator tests
PatAKnight May 20, 2026
43b7fc9
feat(e2e): simplify the auth utils
PatAKnight May 20, 2026
c35684b
feat(e2e): some more simplifying
PatAKnight May 20, 2026
fedea15
feat(e2e): handle github pop up again
PatAKnight May 20, 2026
ece1409
feat(e2e): better handle the popups
PatAKnight May 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions workspaces/bulk-import/e2e-tests/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
3 changes: 3 additions & 0 deletions workspaces/bulk-import/e2e-tests/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createEslintConfig } from "@red-hat-developer-hub/e2e-test-utils/eslint";

export default createEslintConfig(import.meta.dirname);
38 changes: 38 additions & 0 deletions workspaces/bulk-import/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "bulk-imprort-e2e-tests",
"version": "1.0.0",
"private": true,
"type": "module",
"engines": {
"node": ">=22",
"yarn": ">=3"
},
"packageManager": "yarn@3.8.7",
"description": "E2E tests for Bulk import plugin",
"scripts": {
"test": "CI=true playwright test",
"report": "playwright show-report",
"test:ui": "playwright test --ui",
"test:headed": "playwright test --headed",
"lint:check": "eslint .",
"lint:fix": "eslint . --fix",
"prettier:check": "prettier --check .",
"prettier:fix": "prettier --write .",
"check": "tsc --noEmit && yarn lint:check && yarn prettier:check",
"tsc:check": "tsc --noEmit"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@playwright/test": "^1.56.1",
"@red-hat-developer-hub/e2e-test-utils": "1.1.43",
"@types/node": "^24.10.1",
"dotenv": "^16.4.7",
"eslint": "^9.39.2",
"eslint-plugin-check-file": "^3.3.1",
"eslint-plugin-playwright": "^2.4.0",
"otplib": "^12.0.1",
"prettier": "^3.7.4",
"typescript": "^5.9.3",
"typescript-eslint": "^8.50.0"
}
}
20 changes: 20 additions & 0 deletions workspaces/bulk-import/e2e-tests/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from "@red-hat-developer-hub/e2e-test-utils/playwright-config";

/**
* Bulk import plugin e2e test configuration.
* Extends the base config from rhdh-e2e-test-utils.
*/
export default defineConfig({
projects: [
{
name: "bulk-import",
testMatch: "bulk-import.spec.ts",
timeout: 30 * 60 * 1000,
},
{
name: "bulk-import-orchestrator",
testMatch: "bulk-import-orchestrator.spec.ts",
timeout: 30 * 60 * 1000,
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# rhdh app config file
# this file is used to merge with the default values of the rhdh app config

auth:
environment: development
providers:
guest:
dangerouslyAllowOutsideDevelopment: true
github:
development:
clientSecret: ${GITHUB_OAUTH_APP_SECRET}
clientId: ${GITHUB_OAUTH_APP_ID}
callbackUrl: ${RHDH_BASE_URL}/api/auth/github/handler/frame

integrations:
github:
- host: github.com
token: ${VAULT_GITHUB_USER_TOKEN}
gitlab:
- host: gitlab.com
token: temp

bulkImport:
importAPI: orchestrator
orchestratorWorkflow: universal-pr
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# rhdh app config file
# this file is used to merge with the default values of the rhdh app config

auth:
environment: development
providers:
guest:
dangerouslyAllowOutsideDevelopment: true
github:
development:
clientSecret: ${GITHUB_OAUTH_APP_SECRET}
clientId: ${GITHUB_OAUTH_APP_ID}
callbackUrl: ${RHDH_BASE_URL}/api/auth/github/handler/frame

catalog:
import:
entityFilename: catalog-info.yaml
pullRequestBranchName: backstage-integration
rules:
- allow: [Component, System, Group, User, Resource, Location, Template, API]
locations:
- type: url
target: https://github.com/janus-test/janus-test-3-bulk-import/blob/main/catalog-info.yaml

# todo remove it
- type: url
target: https://github.com/AndrienkoAleksandr/catalog-model/blob/rbac/examples/acme-corp.yaml
rules:
- allow: [User, Group]

integrations:
github:
- host: github.com
token: ${VAULT_GITHUB_USER_TOKEN}
gitlab:
- host: gitlab.com
token: temp

permission:
enabled: true
rbac:
maxDepth: 1
policyFileReload: true
policies-csv-file: "./rbac/rbac-policy.csv"
pluginsWithPermission:
- catalog
- permission
- scaffolder
- bulk-import
# admin:
# users:
# todo remove it.
# - name: user:default/test1
policyDecisionPrecedence: conditional # default behavior
includeTransitiveGroupOwnership: true

bulkImport:
instructionsEnabled: true
instructionsDefaultExpanded: true
instructionsSteps:
- id: "step1"
text: "Choose a source control tool for pull request creation"
icon: "approval-tool"
- id: "step2"
text: "Choose which items you want to import"
icon: "search"
- id: "step3"
text: "Generate a catalog-info.yaml file for each selected item"
icon: "build"
- id: "step4"
text: "View the pull/merge request details"
icon: "kind:api"
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
plugins:
# bulk-import plugins
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import-backend-dynamic
disabled: false
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import
disabled: false
pluginConfig:
dynamicPlugins:
frontend:
red-hat-developer-hub.backstage-plugin-bulk-import:
appIcons:
- name: bulkImportIcon
importName: BulkImportIcon
dynamicRoutes:
- path: /bulk-import
importName: BulkImportPage
menuItem:
icon: bulkImportIcon
text: Bulk import

- package: ./dynamic-plugins/dist/backstage-plugin-scaffolder-backend-module-github-dynamic
disabled: true

# Group: Orchestrator
- package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator:bs_1.45.3__5.3.1"
disabled: false
pluginConfig:
dynamicPlugins:
frontend:
red-hat-developer-hub.backstage-plugin-orchestrator:
appIcons:
- importName: OrchestratorIcon
name: orchestratorIcon
dynamicRoutes:
- importName: OrchestratorPage
menuItem:
icon: orchestratorIcon
text: Orchestrator
textKey: menuItem.orchestrator
path: /orchestrator
entityTabs:
- path: /workflows
title: Workflows
titleKey: catalog.entityPage.workflows.title
mountPoint: entity.page.workflows
mountPoints:
- mountPoint: entity.page.workflows/cards
importName: OrchestratorCatalogTab
config:
layout:
gridColumn: 1 / -1
if:
anyOf:
- IsOrchestratorCatalogTabAvailable

- package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-backend:bs_1.45.3__8.5.1"
disabled: false
pluginConfig:
orchestrator:
dataIndexService:
url: http://sonataflow-platform-data-index-service.orchestrator.svc.cluster.local:80

- package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-scaffolder-backend-module-orchestrator:bs_1.45.3__1.3.1"
disabled: false
pluginConfig:
orchestrator:
dataIndexService:
url: http://sonataflow-platform-data-index-service.orchestrator.svc.cluster.local:80

- package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets:bs_1.45.3__1.6.0"
disabled: false
pluginConfig:
dynamicPlugins:
frontend:
red-hat-developer-hub.backstage-plugin-orchestrator-form-widgets: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
plugins:
# bulk-import plugins
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import-backend-dynamic
disabled: false
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import
disabled: false
pluginConfig:
dynamicPlugins:
frontend:
red-hat-developer-hub.backstage-plugin-bulk-import:
appIcons:
- name: bulkImportIcon
importName: BulkImportIcon
dynamicRoutes:
- path: /bulk-import
importName: BulkImportPage
menuItem:
icon: bulkImportIcon
text: Bulk import

- package: ./dynamic-plugins/dist/backstage-plugin-scaffolder-backend-module-github-dynamic
disabled: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: rbac-policy
labels:
backstage.io/kubernetes-id: developer-hub
data:
rbac-policy.csv: |
g, user:default/rhdh-qe-2, role:default/bulk-importer
p, role:default/bulk-importer, bulk-import, use, allow
p, role:default/bulk-importer, catalog-entity, read, allow
p, role:default/bulk-importer, catalog.entity.create, create, allow
p, role:default/bulk-importer, catalog.location.create, create, allow
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: rhdh-secrets
type: Opaque
stringData:
VAULT_GITHUB_USER_TOKEN: $VAULT_GH_RHDH_QE_USER_TOKEN
VAULT_GH_USER_ID: $VAULT_GH_USER_ID
VAULT_GH_USER_PASS: $VAULT_GH_USER_PASS
58 changes: 58 additions & 0 deletions workspaces/bulk-import/e2e-tests/tests/config/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Chart quay.io/rhdh/chart — lightspeed lives under global, not upstream.backstage (schema rejects the latter).
global:
lightspeed:
enabled: false

upstream:
backstage:
extraVolumeMounts:
# NOTE: Lists will not be merged with the default values file. So need to append all the defaults if you want to add a new item here
# See https://issues.redhat.com/browse/RHDHPLAN-869
# The initContainer below will install dynamic plugins in this volume mount.
- name: dynamic-plugins-root
mountPath: /opt/app-root/src/dynamic-plugins-root
- name: extensions-catalog
mountPath: /extensions
- name: temp
mountPath: /tmp
- name: rbac-policy
mountPath: /opt/app-root/src/rbac
extraVolumes:
# NOTE: Lists will not be merged with the default values file. So need to append all the defaults if you want to add a new item here
# See https://issues.redhat.com/browse/RHDHPLAN-869
# -- Ephemeral volume that will contain the dynamic plugins installed by the initContainer below at start.
# To have more control on underlying storage, the [emptyDir](https://docs.openshift.com/container-platform/4.13/storage/understanding-ephemeral-storage.html)
# could be changed to a [generic ephemeral volume](https://docs.openshift.com/container-platform/4.13/storage/generic-ephemeral-vols.html#generic-ephemeral-vols-procedure_generic-ephemeral-volumes).
- name: dynamic-plugins-root
emptyDir: {}
# Volume that will expose the `dynamic-plugins.yaml` file from the `dynamic-plugins` config map.
# The `dynamic-plugins` config map is created by the helm chart from the content of the `global.dynamic` field.
- name: dynamic-plugins
configMap:
defaultMode: 420
name: '{{ printf "%s-dynamic-plugins" .Release.Name }}'
optional: true
# Optional volume that allows exposing the `.npmrc` file (through a `dynamic-plugins-npmrc` secret)
# to be used when running `npm pack` during the dynamic plugins installation by the initContainer.
- name: dynamic-plugins-npmrc
secret:
defaultMode: 420
optional: true
secretName: '{{ printf "%s-dynamic-plugins-npmrc" .Release.Name }}'
- name: dynamic-plugins-registry-auth
secret:
defaultMode: 416
optional: true
secretName: '{{ printf "%s-dynamic-plugins-registry-auth" .Release.Name }}'
- name: npmcacache
emptyDir: {}
# -- Ephemeral volume used by the install-dynamic-plugins init container to extract catalog entities from the catalog index image.
# Mounted at the /extensions path in the backstage-backend main container for automatic discovery by the extension catalog backend providers.
- name: extensions-catalog
emptyDir: {}
- name: temp
emptyDir: {}
- name: rbac-policy
configMap:
defaultMode: 420
name: rbac-policy
Loading
Loading