From 23a152d50d857fe9e4f6878f6839254b591ce227 Mon Sep 17 00:00:00 2001 From: Mate Vago Date: Mon, 6 Jan 2025 12:43:06 +0100 Subject: [PATCH] fix: ws routes in e2e --- web/crux-ui/e2e/with-login/resource-copy.spec.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/web/crux-ui/e2e/with-login/resource-copy.spec.ts b/web/crux-ui/e2e/with-login/resource-copy.spec.ts index 01bfe6995..5ec2054b0 100644 --- a/web/crux-ui/e2e/with-login/resource-copy.spec.ts +++ b/web/crux-ui/e2e/with-login/resource-copy.spec.ts @@ -1,4 +1,4 @@ -import { WS_TYPE_PATCH_CONFIG, WS_TYPE_PATCH_INSTANCE } from '@app/models' +import { WS_TYPE_PATCH_CONFIG } from '@app/models' import { expect } from '@playwright/test' import { DAGENT_NODE, NGINX_TEST_IMAGE_WITH_TAG, TEAM_ROUTES, waitForURLExcept } from 'e2e/utils/common' import { addPortsToContainerConfig } from 'e2e/utils/container-config' @@ -189,11 +189,12 @@ test.describe('Deleting default version', () => { await settingsButton.click() await page.waitForSelector(`h2:has-text("Instance config")`) - const wsRoute = TEAM_ROUTES.deployment.detailsSocket(defaultDeploymentId) + const instanceConfigId = page.url().split('/').pop() + const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(instanceConfigId) const internal = '1000' const external = '2000' - await addPortsToContainerConfig(page, ws, wsRoute, WS_TYPE_PATCH_INSTANCE, internal, external) + await addPortsToContainerConfig(page, ws, wsRoute, WS_TYPE_PATCH_CONFIG, internal, external) const newVersionId = await createVersion(page, projectId, 'new-version', 'Rolling') @@ -289,11 +290,12 @@ test.describe("Deleting copied deployment's parent", () => { await page.waitForURL(`/**/container-configurations/**`) await page.waitForSelector('h2:text-is("Instance config")') - const wsRoute = TEAM_ROUTES.deployment.detailsSocket(parentDeploymentId) + const instanceConfigId = page.url().split('/').pop() + const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(instanceConfigId) const internal = '1000' const external = '2000' - await addPortsToContainerConfig(page, ws, wsRoute, WS_TYPE_PATCH_INSTANCE, internal, external) + await addPortsToContainerConfig(page, ws, wsRoute, WS_TYPE_PATCH_CONFIG, internal, external) await page.goto(TEAM_ROUTES.deployment.details(parentDeploymentId)) await page.waitForSelector('h2:text-is("Deployments")')