From 4d07fb44549be63b5ced3c2b54e538fd96b82a21 Mon Sep 17 00:00:00 2001 From: Dominika Zemanovicova Date: Wed, 8 Jan 2025 13:24:34 +0100 Subject: [PATCH] Test template exists Signed-off-by: Dominika Zemanovicova --- .../plugins/kubernetes-actions/kubernetes-actions.spec.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e2e-tests/playwright/e2e/plugins/kubernetes-actions/kubernetes-actions.spec.ts b/e2e-tests/playwright/e2e/plugins/kubernetes-actions/kubernetes-actions.spec.ts index e2686cdc2c..85d7b9e15f 100644 --- a/e2e-tests/playwright/e2e/plugins/kubernetes-actions/kubernetes-actions.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/kubernetes-actions/kubernetes-actions.spec.ts @@ -2,6 +2,7 @@ import { test } from "@playwright/test"; import { Common, setupBrowser } from "../../../utils/common"; import { UIhelper } from "../../../utils/ui-helper"; import { KubeClient } from "../../../utils/kube-client"; +import { CatalogImport } from "../../../support/pages/catalog-import"; test.describe("Test Kubernetes Actions plugin", () => { let common: Common; @@ -14,9 +15,16 @@ test.describe("Test Kubernetes Actions plugin", () => { common = new Common(page); uiHelper = new UIhelper(page); kubeClient = new KubeClient(); + const catalogImport = new CatalogImport(page); + const template = + "https://github.com/backstage/community-plugins/blob/main/workspaces/scaffolder-backend-module-kubernetes/plugins/kubernetes-actions/examples/templates/01-kubernetes-template.yaml"; await common.loginAsGuest(); await uiHelper.openSidebar("Create..."); + + await uiHelper.clickButton("Register Existing Component"); + await catalogImport.registerExistingComponent(template, false); + await uiHelper.openSidebar("Create..."); }); test("Creates kubernetes namespace", async () => {