-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move multi app install test to Playwright (#4920)
* Move multi app install test to Playwright
- Loading branch information
Showing
8 changed files
with
109 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: kots.io/v1beta1 | ||
kind: License | ||
metadata: | ||
name: github-action | ||
spec: | ||
appSlug: mutli-app-install | ||
channelID: 2GdNmeofxTIcwIhXo1bIyS3Pvu3 | ||
channelName: Automated | ||
customerName: github-action | ||
endpoint: https://replicated.app | ||
entitlements: | ||
expires_at: | ||
description: License Expiration | ||
title: Expiration | ||
value: "" | ||
valueType: String | ||
isGitOpsSupported: true | ||
isNewKotsUiEnabled: true | ||
isSnapshotSupported: true | ||
licenseID: 2GdOGMwrfz2KpRi2fzaIKPDHHbj | ||
licenseSequence: 3 | ||
licenseType: dev | ||
signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pWjJsMGFIV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0pZUWxWU2JUVnlaRmRGTW1RelFsaGFWRkkyWWpCMFZXSldXbGhqYlRGelYwUkdlbEpYWXpsUVUwbHpTVzFrYzJJeVNtaGlSWFJzWlZWc2EwbHFiMmxaYlZKc1dsUlZNazVVV1hkWk1scHBUa1JPYWs5WFNYbFBSMHB0VDFSb2JGbFhUbWhhYlVVeVRrUlphV1pSUFQwaWZRPT0ifQ== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: kots.io/v1beta1 | ||
kind: License | ||
metadata: | ||
name: github-action | ||
spec: | ||
appSlug: multi-app-install-2 | ||
channelID: 2GdO8R0L2IMuFHquevTI1c3Q9td | ||
channelName: Automated | ||
customerName: github-action | ||
endpoint: https://replicated.app | ||
entitlements: | ||
expires_at: | ||
description: License Expiration | ||
title: Expiration | ||
value: "" | ||
valueType: String | ||
isGitOpsSupported: true | ||
isNewKotsUiEnabled: true | ||
isSnapshotSupported: true | ||
licenseID: 2GdODKSmUfw3FhCV4S3zRj6gCiY | ||
licenseSequence: 2 | ||
licenseType: dev | ||
signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pWjJsMGFIVmlMV0ZqZEdsdmJpSjlMQ0p6Y0dWaklqcDdJbXhwWTJWdWMyVkpSQ0k2SWpKSFpFOUVTMU50VldaM00wWm9RMVkwVXpONlVtbzJaME5wV1NJc0lteHBZMlZ1YzJWVWVYQmxJam9pWkdWMklpd2lZM1Z6ZEc5dFpYSk9ZVzFsSWpvaVoybDBhSFZpTFdGamRHbHZiaUlzSW1Gd2NGTnNkV2NpT2lKdGRXeDBhUzFoY0hBd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reted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { login, uploadLicense } from '../shared'; | ||
|
||
const { execSync } = require("child_process"); | ||
|
||
test('multi app install', async ({ page }) => { | ||
test.slow(); | ||
await login(page); | ||
await uploadLicense(page, expect, "app1-license.yaml"); | ||
await expect(page.locator('#app')).toContainText('Configure Multi App Install 1', { timeout: 15000 }); | ||
await page.getByRole('button', { name: 'Continue' }).click(); | ||
await expect(page.locator('#app')).toContainText('Required Kubernetes Version', { timeout: 15000 }); | ||
await expect(page.locator('#app')).toContainText('Your cluster meets the recommended and required versions of Kubernetes'); | ||
await page.getByRole('button', { name: 'Deploy' }).click(); | ||
await expect(page.locator('#app')).toContainText('Multi App Install 1'); | ||
await expect(page.locator('#app')).toContainText('Ready', { timeout: 30000 }); | ||
await expect(page.locator('#app')).toContainText('Currently deployed version'); | ||
await expect(page.locator('#app')).toContainText('0.1.3'); | ||
const app1Status = execSync(`kubectl kots get apps -n ${process.env.NAMESPACE} | grep mutli-app-install | awk '{print $2}'`).toString().trim(); | ||
expect(app1Status).toBe('ready'); | ||
await page.locator('div').filter({ hasText: /^Change passwordAdd new applicationLog out$/ }).getByRole('img').click(); | ||
await page.getByText('Add new application').click(); | ||
await uploadLicense(page, expect, "app2-license.yaml"); | ||
await expect(page.locator('#app')).toContainText('Configure Multi App Install 2', { timeout: 15000 }); | ||
await page.getByRole('button', { name: 'Continue' }).click(); | ||
await expect(page.locator('#app')).toContainText('Required Kubernetes Version', { timeout: 15000 }); | ||
await expect(page.locator('#app')).toContainText('Your cluster meets the recommended and required versions of Kubernetes'); | ||
await page.getByRole('button', { name: 'Deploy' }).click(); | ||
await expect(page.locator('#app')).toContainText('Multi App Install 2'); | ||
await expect(page.locator('#app')).toContainText('Ready', { timeout: 30000 }); | ||
await expect(page.locator('#app')).toContainText('Currently deployed version'); | ||
await expect(page.locator('#app')).toContainText('2.1.2'); | ||
const app2Status = execSync(`kubectl kots get apps -n ${process.env.NAMESPACE} | grep multi-app-install-2 | awk '{print $2}'`).toString().trim(); | ||
expect(app2Status).toBe('ready'); | ||
await page.getByRole('link', { name: 'Version history' }).click(); | ||
await expect(page.locator('#app')).toContainText('2.1.2', { timeout: 10000 }); | ||
await page.getByRole('link', { name: 'Multi App Install 1' }).click(); | ||
await expect(page.locator('#app')).toContainText('0.1.3', { timeout: 10000 }); | ||
await page.getByRole('link', { name: 'Version history' }).click(); | ||
await expect(page.locator('#app')).toContainText('0.1.3', { timeout: 10000 }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const uploadLicense = async (page, expect) => { | ||
await page.setInputFiles('input[type="file"][accept="application/x-yaml,.yaml,.yml,.rli"]', `${process.env.TEST_PATH}/license.yaml`) | ||
export const uploadLicense = async (page, expect, licenseFile = "license.yaml") => { | ||
await page.setInputFiles('input[type="file"][accept="application/x-yaml,.yaml,.yml,.rli"]', `${process.env.TEST_PATH}/${licenseFile}`); | ||
await page.getByRole('button', { name: 'Upload license' }).click(); | ||
await expect(page.locator('#app')).toContainText('Installing your license'); | ||
}; |