Skip to content

Commit

Permalink
Wait for preflights maybe
Browse files Browse the repository at this point in the history
Alternate select

fix dupes
  • Loading branch information
pandemicsyn committed Aug 5, 2024
1 parent d265375 commit 8690993
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions e2e/playwright/tests/change-channel/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,26 @@ test('change channel', async ({ page }) => {
await page.getByRole('button', { name: 'Deploy' }).click();
await expect(page.locator('#app')).toContainText('Automated');
await changeChannel(ALTERNATE_CHANNEL_ID);

await page.getByText('Sync license').click();

await expect(page.getByLabel('Next step')).toContainText('License synced', { timeout: 10000 });
await page.getByRole('button', { name: 'Ok, got it!' }).click();

await expect(page.locator('#app')).toContainText('Alternate');
await expect(page.locator('#app')).toContainText('v1.0.1', { timeout: 10000 });
await page.getByRole('button', { name: 'Deploy', exact: true }).click();
await page.getByRole('button', { name: 'Yes, Deploy' }).click();
await expect(page.locator('#app')).toContainText('Upstream Update', { timeout: 10000 });

await page.locator('.u-marginTop--20 > .VersionCard-content--wrapper').locator('div').filter({ hasText: /^View preflight checksView preflight checksDeploy$/ }).getByRole('link').click();
await expect(page.getByText('Your cluster meets the recommended and required versions of Kubernetes.')).toBeVisible();
await page.getByRole('button', { name: 'Deploy' }).click();

await expect(page.locator('#app')).toContainText('Currently deployed version', { timeout: 15000 });
await expect(page.getByText('v1.0.0')).not.toBeVisible();
await expect(page.getByText('v1.0.1')).toBeVisible();
await expect(page.locator('#app')).toContainText('Currently deployed version', { timeout: 15000 });
});

async function changeChannel(channelId) {
async function changeChannel(channelId: string) {
await fetch(`https://api.replicated.com/vendor/v3/customer/${CUSTOMER_ID}`, {
method: 'PUT',
headers: {
Expand Down

0 comments on commit 8690993

Please sign in to comment.