Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 32 additions & 0 deletions .ibm/pipelines/value_files/values_showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,38 @@ upstream:
options:
token: test-token
subject: test-subject
# FIXME: https://issues.redhat.com/browse/RHDHBUGS-2530
# Workaround to force the deployment to use wrapper from container
initContainers:
- name: install-dynamic-plugins
# -- Image used by the initContainer to install dynamic plugins into the `dynamic-plugins-root` volume mount.
# It could be replaced by a custom image based on this one.
# @default -- `quay.io/rhdh-community/rhdh:latest`
image: '{{ include "backstage.image" . }}'
command:
- ./install-dynamic-plugins.sh
- /dynamic-plugins-root
env:
- name: NPM_CONFIG_USERCONFIG
value: /opt/app-root/src/.npmrc.dynamic-plugins
- name: MAX_ENTRY_SIZE
value: "30000000"
imagePullPolicy: Always
volumeMounts:
- mountPath: /dynamic-plugins-root
name: dynamic-plugins-root
- mountPath: /opt/app-root/src/dynamic-plugins.yaml
name: dynamic-plugins
readOnly: true
subPath: dynamic-plugins.yaml
- mountPath: /opt/app-root/src/.npmrc.dynamic-plugins
name: dynamic-plugins-npmrc
readOnly: true
subPath: .npmrc
- mountPath: /opt/app-root/src/.config/containers
name: dynamic-plugins-registry-auth
readOnly: true
workingDir: /opt/app-root/src
image:
pullPolicy: Always
registry: quay.io
Expand Down
4 changes: 1 addition & 3 deletions .rhdh/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ RUN tar xzf "$TARBALL_PATH"/skeleton.tar.gz; tar xzf "$TARBALL_PATH"/bundle.tar.

# Copy app-config files needed in runtime
COPY $EXTERNAL_SOURCE_NESTED/app-config*.yaml ./

# moved to plugin-catalog-index image
# COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins.default.yaml ./
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins.default.yaml ./

# Hackaround: create library symlinks to build: isolated-vm node-gyp better-sqlite cpu-features
# TODO is this still needed? maintaining it over time will be a chore if the .so files change
Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ RUN tar xzf "$TARBALL_PATH"/skeleton.tar.gz; tar xzf "$TARBALL_PATH"/bundle.tar.

# Copy app-config files needed in runtime
COPY $EXTERNAL_SOURCE_NESTED/app-config*.yaml ./

# moved to plugin-catalog-index image
# COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins.default.yaml ./
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins.default.yaml ./

# Hackaround: create library symlinks to build: isolated-vm node-gyp better-sqlite cpu-features
# TODO is this still needed? maintaining it over time will be a chore if the .so files change
Expand Down
9 changes: 4 additions & 5 deletions e2e-tests/playwright/e2e/custom-theme.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
getTranslations,
getCurrentLanguage,
} from "../e2e/localization/locale";
import { UIhelper } from "../utils/ui-helper";

const t = getTranslations();
const lang = getCurrentLanguage();
Expand All @@ -18,6 +19,7 @@
test.describe("CustomTheme should be applied", () => {
let common: Common;
let themeVerifier: ThemeVerifier;
let uiHelper: UIhelper;

test.beforeAll(async ({ browser }, testInfo) => {
test.info().annotations.push({
Expand All @@ -28,13 +30,10 @@
page = (await setupBrowser(browser, testInfo)).page;
common = new Common(page);
themeVerifier = new ThemeVerifier(page);
uiHelper = new UIhelper(page);

await common.loginAsGuest();
await page
.getByRole("button", {
name: t["plugin.quickstart"][lang]["footer.hide"],
})
.click();
await uiHelper.hideQuickstartIfVisible();
});

test("Verify theme colors are applied and make screenshots", async ({}, testInfo: TestInfo) => {
Expand All @@ -56,7 +55,7 @@
});

test("Verify that the RHDH favicon can be customized", async () => {
await expect(page.locator("#dynamic-favicon")).toHaveAttribute(

Check warning on line 58 in e2e-tests/playwright/e2e/custom-theme.spec.ts

View workflow job for this annotation

GitHub Actions / TSC, ESLint and Prettier

Usage of raw locator detected. Use methods like .getByRole() or .getByText() instead of raw locators
"href",
CUSTOM_FAVICON.LIGHT,
);
Expand All @@ -83,7 +82,7 @@

test("Verify logo link", async () => {
await expect(
page.getByTestId("global-header-company-logo").locator("a"),

Check warning on line 85 in e2e-tests/playwright/e2e/custom-theme.spec.ts

View workflow job for this annotation

GitHub Actions / TSC, ESLint and Prettier

Usage of raw locator detected. Use methods like .getByRole() or .getByText() instead of raw locators
).toHaveAttribute("href", "/");
await page.getByTestId("global-header-company-logo").click();
await expect(page).toHaveURL("/");
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/playwright/e2e/plugins/quick-start.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.describe("Test Quick Start plugin", () => {
uiHelper = new UIhelper(page);
});

test("Access Quick start from Global Header", async ({ page }) => {
test.fixme("Access Quick start from Global Header", async ({ page }) => {
await common.loginAsKeycloakUser();
await page.waitForTimeout(1000);
// eslint-disable-next-line playwright/no-conditional-in-test
Expand All @@ -30,7 +30,7 @@ test.describe("Test Quick Start plugin", () => {
});

// FIXME https://issues.redhat.com/browse/RHIDP-8971
test.skip("Access Quick start as Guest or Admin", async ({ page }) => {
test.fixme("Access Quick start as Guest or Admin", async ({ page }) => {
// eslint-disable-next-line playwright/no-conditional-in-test
if (test.info().project.name !== "showcase-rbac") {
await common.loginAsGuest();
Expand Down Expand Up @@ -65,7 +65,7 @@ test.describe("Test Quick Start plugin", () => {
await expect(page.getByRole("button", { name: "Hide" })).toBeHidden();
});

test("Access Quick start as User", async ({ page }) => {
test.fixme("Access Quick start as User", async ({ page }) => {
// eslint-disable-next-line playwright/no-conditional-in-test
if (test.info().project.name !== "showcase-rbac") {
test.skip();
Expand Down
13 changes: 13 additions & 0 deletions e2e-tests/playwright/utils/ui-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,4 +829,17 @@ export class UIhelper {
const tooltip = this.page.getByRole("tooltip").getByText(text);
await expect(tooltip).toBeVisible();
}

/**
* Hides the Quick Start panel if it is currently visible.
* This is useful in test setup to ensure a clean state without the Quick Start overlay.
*/
async hideQuickstartIfVisible(): Promise<void> {
const quickstartHideButton = this.page.getByRole("button", {
name: t["plugin.quickstart"][lang]["footer.hide"],
});
if (await quickstartHideButton.isVisible()) {
await quickstartHideButton.click();
}
}
}
Loading