Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move multi-app-backup-and-restore test to Playwright #4923

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2857,12 +2857,10 @@ jobs:
- run: chmod +x bin/*
- uses: ./.github/actions/kots-e2e
with:
test-focus: 'multi-app-backup-and-restore'
test-focus: 'Multi App Backup and Restore'
kots-namespace: 'multi-app-backup-and-restore'
k8s-distribution: ${{ matrix.cluster.distribution }}
k8s-version: ${{ matrix.cluster.version }}
testim-access-token: '${{ secrets.TESTIM_ACCESS_TOKEN }}'
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'
Expand Down Expand Up @@ -4337,7 +4335,6 @@ jobs:
- validate-min-kots-version
- validate-target-kots-version
- validate-range-kots-version
- validate-multi-app-backup-and-restore
- validate-airgap-smoke-test
- validate-support-bundle
- validate-gitops
Expand All @@ -4347,6 +4344,7 @@ jobs:
- validate-no-required-config
- validate-config
- validate-change-channel
- validate-multi-app-backup-and-restore
- validate-multi-app-install
# non-testim tests
- validate-minimal-rbac
Expand Down
5 changes: 3 additions & 2 deletions e2e/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ func NewChangeLicense() Test {

func NewMultiAppBackupAndRestoreTest() Test {
return Test{
Name: "multi-app-backup-and-restore",
TestimSuite: "multi-app-backup-and-restore",
ID: "multi-app-backup-and-restore",
Name: "Multi App Backup and Restore",
Namespace: "multi-app-backup-and-restore",
AppSlug: "multi-app-backup-and-restore",
UpstreamURI: "multi-app-backup-and-restore/automated",
NeedsSnapshots: true,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: kots.io/v1beta1
kind: License
metadata:
name: multi-app-backup-and-restore-1
spec:
appSlug: multi-app-backup-and-restore-1
channelID: 2P3qPsmKpdq9P9a5Nze5EPttBXa
channelName: Automated
customerName: multi-app-backup-and-restore-1
endpoint: https://replicated.app
entitlements:
expires_at:
description: License Expiration
signature: {}
title: Expiration
value: ""
valueType: String
isGitOpsSupported: true
isNewKotsUiEnabled: true
isSnapshotSupported: true
licenseID: 2P3rVESF5woQVawjvHWaPSpfU4t
licenseSequence: 1
licenseType: dev
signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pYlhWc2RHa3RZWEJ3TFdKaFkydDFjQzFoYm1RdGNtVnpkRzl5WlMweEluMHNJbk53WldNaU9uc2liR2xqWlc1elpVbEVJam9pTWxBemNsWkZVMFkxZDI5UlZtRjNhblpJVjJGUVUzQm1WVFIwSWl3aWJHbGpaVzV6WlZSNWNHVWlPaUprWlhZaUxDSmpkWE4wYjIxbGNrNWhiV1VpT2lKdGRXeDBhUzFoY0hBdFltRmphM1Z3TFdGdVpDMXlaWE4wYjNKbExURWlMQ0poY0hCVGJIVm5Jam9pYlhWc2RHa3RZWEJ3TFdKaFkydDFjQzFoYm1RdGNtVnpkRzl5WlMweElpd2lZMmhoYm01bGJFbEVJam9pTWxBemNWQnpiVXR3WkhFNVVEbGhOVTU2WlRWRlVIUjBRbGhoSWl3aVkyaGhibTVsYkU1aGJXVWlPaUpCZFhSdmJXRjBaV1FpTENKc2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pFaHJlbFJwT0RWUFJGSTBaVVprVmt3eVRrSmtSWGhWWTJ0b1dHTkliM2xsUjBaUldraFZkMXA2UW05YVIwWTFXVE5qZVU1cVZUVk9SRUpTV21wU2FFMUZVblpPYTFvell6QlZOVTFGVGxaWk1XUnFWMnRKZG1OcVFYWlNNMUkxVTBWV1FtRldaM2RaYTBZMlRESjROVlZYVVROV01WWmhWVlpKTW1OWE1WbE9iWFJHV1d0Wk5HTkVXblpUTVVaRVQwYzFTRkZzUVRSVFdGcG9UVVZTVFZOck9XMWlXRVpFVmpOR1JGZEVXalZoYmxaSVRWUnNhVlpxUmpKT1NFNVNZVE5HV21SV2NFeFVWbU16VFRGU2JWZHRhM3BYUlRGMVZHczFXV1F3VWsxVGFsWlRWbTVLVUUxVk9WcFphMnQ1WWxaQk1VMUdRbGxUUldoRlVXNWFUbVJ0T1dsa1NHeERUbGh3VVZKclpFUk9NV2N4VDFoT1VHTlhjRWxWVjBaR1dXNVNXbHBxYkVkVmJVWlpWMFJWZDAxdFJraFhhbWN4VGxaUmQwOUhiRFJrVkdSMVpFaHdVRTFzYkdGVFIzUkVVVzVvTkdOdVVsTlRNRnBUVkZWT01GTldWbmROUlhodllqSkdjVmR1Vm1wYVJGbDZXbFZKTlV3eGIzZGlSMDVNWXpOTk1sWnRPWFZYUlZvd1ZFWm9NRmRZVW5wWFZGcDRaRlJXUzFvemNIaGhSa3BTVFdwb1JGcHRkM0psVlU1UFlrWkdRMVZZWXpsUVUwbHpTVzFrYzJJeVNtaGlSWFJzWlZWc2EwbHFiMmxaYlZKc1dsUlZNazVVV1hkWk1scHBUa1JPYWs5WFNYbFBSMHB0VDFSb2JGbFhUbWhhYlVVeVRrUlphV1pSUFQwaWZRPT0ifQ==
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: kots.io/v1beta1
kind: License
metadata:
name: multi-app-backup-and-restore-2
spec:
appSlug: multi-app-backup-and-restore-2
channelID: 2P3rblvZxINhbckyp67PHj3MlbP
channelName: Automated
customerName: multi-app-backup-and-restore-2
endpoint: https://replicated.app
entitlements:
expires_at:
description: License Expiration
signature: {}
title: Expiration
value: ""
valueType: String
isGitOpsSupported: true
isNewKotsUiEnabled: true
isSnapshotSupported: true
licenseID: 2P3ru6kPlP6fcWbajAe9RVlvhHL
licenseSequence: 1
licenseType: dev
signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pYlhWc2RHa3RZWEJ3TFdKaFkydDFjQzFoYm1RdGNtVnpkRzl5WlMweUluMHNJbk53WldNaU9uc2liR2xqWlc1elpVbEVJam9pTWxBemNuVTJhMUJzVURabVkxZGlZV3BCWlRsU1ZteDJhRWhNSWl3aWJHbGpaVzV6WlZSNWNHVWlPaUprWlhZaUxDSmpkWE4wYjIxbGNrNWhiV1VpT2lKdGRXeDBhUzFoY0hBdFltRmphM1Z3TFdGdVpDMXlaWE4wYjNKbExUSWlMQ0poY0hCVGJIVm5Jam9pYlhWc2RHa3RZWEJ3TFdKaFkydDFjQzFoYm1RdGNtVnpkRzl5WlMweUlpd2lZMmhoYm01bGJFbEVJam9pTWxBemNtSnNkbHA0U1U1b1ltTnJlWEEyTjFCSWFqTk5iR0pRSWl3aVkyaGhibTVsYkU1aGJXVWlPaUpCZFhSdmJXRjBaV1FpTENKc2FXTmxibk5sVTJWeGRXVnVZMlVpT2pFc0ltVnVaSEJ2YVc1MElqb2lhSFIwY0hNNkx5OXlaWEJzYVdOaGRHVmtMbUZ3Y0NJc0ltVnVkR2wwYkdWdFpXNTBjeUk2ZXlKbGVIQnBjbVZ6WDJGMElqcDdJblJwZEd4bElqb2lSWGh3YVhKaGRHbHZiaUlzSW1SbGMyTnlhWEIwYVc5dUlqb2lUR2xqWlc1elpTQkZlSEJwY21GMGFXOXVJaXdpZG1Gc2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ZWZEdURnBzWXpKbFNHUldZVWRyTWxaRVZqRldNblJSVmpCMFZGVkVUbGhXVlZVMFYycGFOVkZxVFhkYVJsWlhWRWhPU1dJd2J6VmxSa1Y1Wlc1VmNsZHRkR2hrUlVac1VXMU5OV0ZGWTNkbFZHd3dWMWN3ZGxkdGFETlVSa0Y1VkhsemRrc3hUa0pYUkVwNVlURndjR0ZyWkhkYWJWSmFUVWhPVmxOVVNreE5Sa0pzVld4T1VWVXlVbXhPVlRrMlRWVmtNbFpIVG5Sa2JIQkRVVlZ3TlZsclZqSlRSVnA0VTFob01GWjZXbGxrYWtKcVdXMVdZVk5yYUVoTU1rcHNaVmhDVDA1dGNEUmlWVlp0VDFSWmVrNXNUbWxrZW1SUlkyMW5NMUpFYUZKa1JFNUxXa1ZhTUZKWFJsWldWbU55VkdzeE1rd3lOVVZsUkU1TFRETk9UbUpyVmpGaGVrMHdaVlJLYzBzd2EzbGFWMmN6VG1wQ1ExUnNUbGhXUlZsNVZtbDBhbFpYWXpsUVUwbHpTVzFrYzJJeVNtaGlSWFJzWlZWc2EwbHFiMmxaYlZKc1dsUlZNazVVV1hkWk1scHBUa1JPYWs5WFNYbFBSMHB0VDFSb2JGbFhUbWhhYlVVeVRrUlphV1pSUFQwaWZRPT0ifQ==
40 changes: 40 additions & 0 deletions e2e/playwright/tests/multi-app-backup-and-restore/test.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { test, expect } from '@playwright/test';
import { login, uploadLicense } from '../shared';

test('multi app backup and restore', async ({ page }) => {
test.slow();
await login(page);
await uploadLicense(page, expect, "app1-license.yaml");
await expect(page.locator('#app')).toContainText('Multi App Backup and Restore 1', { timeout: 10000 });
await expect(page.locator('#app')).toContainText('Ready', { timeout: 30000 });
await expect(page.locator('#app')).toContainText('Currently deployed version');
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('Multi App Backup and Restore 2', { timeout: 10000 });
await expect(page.locator('#app')).toContainText('Ready', { timeout: 30000 });
await expect(page.locator('#app')).toContainText('Currently deployed version');
await page.locator('.NavItem').getByText('Snapshots', { exact: true }).click();
await page.getByRole('link', { name: 'Partial Snapshots' }).click({ timeout: 10000 });
await page.getByRole('button', { name: 'Start a snapshot' }).click({ timeout: 15000 });
await expect(page.locator('#app')).toContainText('Completed', { timeout: 30000 });
await page.locator('.replicated-select__control').click();
await page.waitForTimeout(1000);
await page.locator('.replicated-select__option').getByText('Multi App Backup and Restore 2', { exact: true }).click();
await page.waitForTimeout(1000);
await expect(page.locator('#app')).toContainText('No snapshots yet', { timeout: 15000 });
await page.getByRole('button', { name: 'Start a snapshot' }).click();
await expect(page.locator('#app')).toContainText('Completed', { timeout: 30000 });
await page.locator('svg.icons.clickable[data-tip="Restore from this backup"]').click();
await page.getByPlaceholder('type your slug').fill('multi-app-backup-and-restore-2');
await page.getByRole('button', { name: 'Confirm and restore' }).click();
await page.getByRole('button', { name: 'Cancel snapshot restore' }).click();
await page.locator('.replicated-select__control').click({ timeout: 15000 });
await page.waitForTimeout(1000);
await page.locator('.replicated-select__option').getByText('Multi App Backup and Restore 1', { exact: true }).click();
await page.waitForTimeout(1000);
await page.locator('svg.icons.clickable[data-tip="Restore from this backup"]').click({ timeout: 15000 });
await page.getByPlaceholder('type your slug').fill('multi-app-backup-and-restore-1');
await page.getByRole('button', { name: 'Confirm and restore' }).click();
await page.getByRole('button', { name: 'Cancel snapshot restore' }).click();
});
Loading