From 3d9be5e54796e6f7414b380cf33c5788a8b2f2e1 Mon Sep 17 00:00:00 2001 From: Mia Wong Date: Tue, 3 Sep 2024 14:30:39 -0400 Subject: [PATCH] update admin console version v1.115.1 (#1027) * updated adminconsole version * update tests for node join command UI (#1020) * Add playwright old app version test (#1026) * add test folder --------- Co-authored-by: sgalsaleh <39952863+sgalsaleh@users.noreply.github.com> Co-authored-by: Andrew Lavery --- e2e/install_test.go | 8 ++++---- .../tests/deploy-ec18-app-version/test.spec.ts | 8 ++++++++ .../get-join-controller-command/test.spec.ts | 3 ++- .../tests/get-join-worker-command/test.spec.ts | 7 ++++++- e2e/playwright/tests/shared/deploy-app.ts | 7 +++++-- .../tests/shared/deploy-ec18-app-version.ts | 18 ++++++++++++++++++ e2e/playwright/tests/shared/index.ts | 3 ++- pkg/addons/adminconsole/static/metadata.yaml | 10 +++++----- pkg/addons/adminconsole/static/values.yaml | 8 ++++---- 9 files changed, 54 insertions(+), 18 deletions(-) create mode 100644 e2e/playwright/tests/deploy-ec18-app-version/test.spec.ts create mode 100644 e2e/playwright/tests/shared/deploy-ec18-app-version.ts diff --git a/e2e/install_test.go b/e2e/install_test.go index f2329d9c7..5cbb0e182 100644 --- a/e2e/install_test.go +++ b/e2e/install_test.go @@ -555,8 +555,8 @@ func TestUpgradeEC18FromReplicatedApp(t *testing.T) { t.Fatalf("fail to install embedded-cluster on node %s: %v", tc.Nodes[0], err) } - if _, _, err := setupPlaywrightAndRunTest(t, tc, "deploy-app"); err != nil { - t.Fatalf("fail to run playwright test deploy-app: %v", err) + if _, _, err := setupPlaywrightAndRunTest(t, tc, "deploy-ec18-app-version"); err != nil { + t.Fatalf("fail to run playwright test deploy-ec18-app-version: %v", err) } t.Logf("%s: checking installation state", time.Now().Format(time.RFC3339)) @@ -1004,8 +1004,8 @@ func TestSingleNodeAirgapUpgradeFromEC18(t *testing.T) { t.Fatalf("fail to remove airgap bundle on node %s: %v", tc.Nodes[0], err) } - if _, _, err := setupPlaywrightAndRunTest(t, tc, "deploy-app"); err != nil { - t.Fatalf("fail to run playwright test deploy-app: %v", err) + if _, _, err := setupPlaywrightAndRunTest(t, tc, "deploy-ec18-app-version"); err != nil { + t.Fatalf("fail to run playwright test deploy-ec18-app-version: %v", err) } t.Logf("%s: checking installation state after app deployment", time.Now().Format(time.RFC3339)) diff --git a/e2e/playwright/tests/deploy-ec18-app-version/test.spec.ts b/e2e/playwright/tests/deploy-ec18-app-version/test.spec.ts new file mode 100644 index 000000000..db2e922f5 --- /dev/null +++ b/e2e/playwright/tests/deploy-ec18-app-version/test.spec.ts @@ -0,0 +1,8 @@ +import { test, expect } from '@playwright/test'; +import { login, deployEC18AppVersion } from '../shared'; + +test('deploy ec18 app version', async ({ page }) => { + test.setTimeout(2 * 60 * 1000); // 2 minutes + await login(page); + await deployEC18AppVersion(page, expect); +}); diff --git a/e2e/playwright/tests/get-join-controller-command/test.spec.ts b/e2e/playwright/tests/get-join-controller-command/test.spec.ts index 577057379..de012c66a 100644 --- a/e2e/playwright/tests/get-join-controller-command/test.spec.ts +++ b/e2e/playwright/tests/get-join-controller-command/test.spec.ts @@ -7,7 +7,8 @@ test('get join controller command', async ({ page }) => { await page.getByRole('button', { name: 'Add node', exact: true }).click(); await expect(page.locator('.Modal-body')).toBeVisible(); await expect(page.getByRole('heading')).toContainText('Add a Node'); - await page.locator('.BoxedCheckbox').getByText('controller-test', { exact: true }).click(); + await expect(page.getByText('Roles:')).toBeVisible(); + await expect(page.locator('#controller-testNodeType')).toBeChecked(); const joinCommand = await page.locator('.react-prism.language-bash').first().textContent(); console.log(`{"command":"${joinCommand}"}`); }); diff --git a/e2e/playwright/tests/get-join-worker-command/test.spec.ts b/e2e/playwright/tests/get-join-worker-command/test.spec.ts index 14a56caaa..95969cabd 100644 --- a/e2e/playwright/tests/get-join-worker-command/test.spec.ts +++ b/e2e/playwright/tests/get-join-worker-command/test.spec.ts @@ -7,7 +7,12 @@ test('get join worker command', async ({ page }) => { await page.getByRole('button', { name: 'Add node', exact: true }).click(); await expect(page.locator('.Modal-body')).toBeVisible(); await expect(page.getByRole('heading')).toContainText('Add a Node'); - await page.locator('.BoxedCheckbox').getByText('abc', { exact: true }).click(); + await expect(page.getByText('Roles:')).toBeVisible(); + await expect(page.locator('#controller-testNodeType')).toBeChecked(); + await page.locator('.nodeType-selector').getByText('controller-test').click() + await page.locator('.nodeType-selector').getByText('abc').click() + await expect(page.locator('#abcNodeType')).toBeChecked(); + await expect(page.locator('#controller-testNodeType')).not.toBeChecked(); const joinCommand = await page.locator('.react-prism.language-bash').first().textContent(); console.log(`{"command":"${joinCommand}"}`); }); diff --git a/e2e/playwright/tests/shared/deploy-app.ts b/e2e/playwright/tests/shared/deploy-app.ts index 80c2eed58..bcd97c908 100644 --- a/e2e/playwright/tests/shared/deploy-app.ts +++ b/e2e/playwright/tests/shared/deploy-app.ts @@ -1,5 +1,8 @@ export const deployApp = async (page, expect) => { - await expect(page.getByRole('button', { name: 'Add node', exact: true })).toBeVisible(); + await expect(page.getByText('Optionally add nodes to the cluster'),).toBeVisible(); + await expect(page.locator('.react-prism.language-bash')).toBeVisible(); + const joinCommand = await page.locator('.react-prism.language-bash').first().textContent(); + await expect(joinCommand).toContain('sudo'); await page.getByRole('button', { name: 'Continue' }).click(); await expect(page.locator('h3')).toContainText('The First Config Group'); await page.locator('input[type="text"]').click(); @@ -15,4 +18,4 @@ export const deployApp = async (page, expect) => { await expect(page.locator('#app')).toContainText('Currently deployed version', { timeout: 90000 }); await expect(page.locator('#app')).toContainText('Ready', { timeout: 30000 }); await expect(page.locator('#app')).toContainText('Up to date'); -}; +}; \ No newline at end of file diff --git a/e2e/playwright/tests/shared/deploy-ec18-app-version.ts b/e2e/playwright/tests/shared/deploy-ec18-app-version.ts new file mode 100644 index 000000000..78525f540 --- /dev/null +++ b/e2e/playwright/tests/shared/deploy-ec18-app-version.ts @@ -0,0 +1,18 @@ +export const deployEC18AppVersion = async (page, expect) => { + await expect(page.getByRole('button', { name: 'Add node', exact: true })).toBeVisible(); + await page.getByRole('button', { name: 'Continue' }).click(); + await expect(page.locator('h3')).toContainText('The First Config Group'); + await page.locator('input[type="text"]').click(); + await page.locator('input[type="text"]').fill('initial-hostname.com'); + await page.locator('input[type="password"]').click(); + await page.locator('input[type="password"]').fill('password'); + await page.getByRole('button', { name: 'Continue' }).click(); + await expect(page.getByText('Preflight checks', { exact: true })).toBeVisible({ timeout: 10 * 1000 }); + await expect(page.getByRole('button', { name: 'Re-run' })).toBeVisible({ timeout: 10 * 1000 }); + await expect(page.locator('#app')).toContainText('Embedded Cluster Installation CRD exists'); + await expect(page.locator('#app')).toContainText('Embedded Cluster Config CRD exists'); + await page.getByRole('button', { name: 'Deploy' }).click(); + await expect(page.locator('#app')).toContainText('Currently deployed version', { timeout: 90000 }); + await expect(page.locator('#app')).toContainText('Ready', { timeout: 30000 }); + await expect(page.locator('#app')).toContainText('Up to date'); + }; \ No newline at end of file diff --git a/e2e/playwright/tests/shared/index.ts b/e2e/playwright/tests/shared/index.ts index 6af3094d1..0a26d2a16 100644 --- a/e2e/playwright/tests/shared/index.ts +++ b/e2e/playwright/tests/shared/index.ts @@ -1,2 +1,3 @@ export * from './login'; -export * from './deploy-app'; \ No newline at end of file +export * from './deploy-app'; +export * from './deploy-ec18-app-version'; \ No newline at end of file diff --git a/pkg/addons/adminconsole/static/metadata.yaml b/pkg/addons/adminconsole/static/metadata.yaml index e0ae3392c..d5e25c975 100644 --- a/pkg/addons/adminconsole/static/metadata.yaml +++ b/pkg/addons/adminconsole/static/metadata.yaml @@ -5,18 +5,18 @@ # $ make buildtools # $ output/bin/buildtools update addon # -version: 1.114.0 +version: 1.115.1 location: oci://proxy.replicated.com/anonymous/registry.replicated.com/library/admin-console images: kotsadm: repo: proxy.replicated.com/anonymous/kotsadm/kotsadm - tag: v1.114.0@sha256:a6c9984a6a2c1837dc362cdba7f1e823b3a0612739861c2ead334f717a1a7c34 + tag: v1.115.1@sha256:9772a075a24586d2fd8550285f95a0bc466b280e960fd00ccb585ac9999592bb kotsadm-migrations: repo: proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations - tag: v1.114.0@sha256:0df43ff5a12631700ef1bcb43f225641ad1f80ce20855da4ab015e517494b65b + tag: v1.115.1@sha256:22673b6d3729fe48607516314f59095b6da8ded4b61aa381c6ada5583f130c5e kurl-proxy: repo: proxy.replicated.com/anonymous/kotsadm/kurl-proxy - tag: v1.114.0@sha256:8cd8e4a481ce4a8a71cadc911e080f8e64f8b96189b9b63a731f9265bc81ab44 + tag: v1.115.1@sha256:771901bff6459dde393d0df93c1a1ff50c4013dc8264903f89b71d3d10f0b459 rqlite: repo: proxy.replicated.com/anonymous/kotsadm/rqlite - tag: 8.28.0-r0@sha256:ccff59367feb0ea937d14a501316656595d2a48fd597d6975aefa47f1267a028 + tag: 8.28.1-r0@sha256:f7f9dd7d67999d95d90b8bf26f3508f4f3fcfb89783c7d5abcf94b5aed406ba0 diff --git a/pkg/addons/adminconsole/static/values.yaml b/pkg/addons/adminconsole/static/values.yaml index b7f6d5324..b94b0461a 100644 --- a/pkg/addons/adminconsole/static/values.yaml +++ b/pkg/addons/adminconsole/static/values.yaml @@ -13,10 +13,10 @@ # images: - kotsadm: 'proxy.replicated.com/anonymous/kotsadm/kotsadm:v1.114.0@sha256:a6c9984a6a2c1837dc362cdba7f1e823b3a0612739861c2ead334f717a1a7c34' - kurlProxy: 'proxy.replicated.com/anonymous/kotsadm/kurl-proxy:v1.114.0@sha256:8cd8e4a481ce4a8a71cadc911e080f8e64f8b96189b9b63a731f9265bc81ab44' - migrations: 'proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations:v1.114.0@sha256:0df43ff5a12631700ef1bcb43f225641ad1f80ce20855da4ab015e517494b65b' - rqlite: 'proxy.replicated.com/anonymous/kotsadm/rqlite:8.28.0-r0@sha256:ccff59367feb0ea937d14a501316656595d2a48fd597d6975aefa47f1267a028' + kotsadm: 'proxy.replicated.com/anonymous/kotsadm/kotsadm:v1.115.1@sha256:9772a075a24586d2fd8550285f95a0bc466b280e960fd00ccb585ac9999592bb' + kurlProxy: 'proxy.replicated.com/anonymous/kotsadm/kurl-proxy:v1.115.1@sha256:771901bff6459dde393d0df93c1a1ff50c4013dc8264903f89b71d3d10f0b459' + migrations: 'proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations:v1.115.1@sha256:22673b6d3729fe48607516314f59095b6da8ded4b61aa381c6ada5583f130c5e' + rqlite: 'proxy.replicated.com/anonymous/kotsadm/rqlite:8.28.1-r0@sha256:f7f9dd7d67999d95d90b8bf26f3508f4f3fcfb89783c7d5abcf94b5aed406ba0' isHA: false isHelmManaged: false kurlProxy: