Skip to content

Commit

Permalink
update admin console version v1.115.1 (#1027)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Andrew Lavery <[email protected]>
  • Loading branch information
3 people authored Sep 3, 2024
1 parent 843444f commit 3d9be5e
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 18 deletions.
8 changes: 4 additions & 4 deletions e2e/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
8 changes: 8 additions & 0 deletions e2e/playwright/tests/deploy-ec18-app-version/test.spec.ts
Original file line number Diff line number Diff line change
@@ -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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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}"}`);
});
7 changes: 6 additions & 1 deletion e2e/playwright/tests/get-join-worker-command/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}"}`);
});
7 changes: 5 additions & 2 deletions e2e/playwright/tests/shared/deploy-app.ts
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -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');
};
};
18 changes: 18 additions & 0 deletions e2e/playwright/tests/shared/deploy-ec18-app-version.ts
Original file line number Diff line number Diff line change
@@ -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');
};
3 changes: 2 additions & 1 deletion e2e/playwright/tests/shared/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './login';
export * from './deploy-app';
export * from './deploy-app';
export * from './deploy-ec18-app-version';
10 changes: 5 additions & 5 deletions pkg/addons/adminconsole/static/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
# $ make buildtools
# $ output/bin/buildtools update addon <addon name>
#
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
8 changes: 4 additions & 4 deletions pkg/addons/adminconsole/static/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3d9be5e

Please sign in to comment.