Skip to content

Commit

Permalink
chore: finish rollout ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Jul 18, 2023
1 parent 07459a0 commit 9e58d2c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ui/tests/rollouts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ test.describe('Rollouts', () => {
await page.getByRole('textbox').fill('test'); // TODO: should get description by label
await page.getByRole('button', { name: 'Create' }).click();
await expect(page.getByText('Successfully created rollout')).toBeVisible();
await page.getByLabel('Percentage').fill('70');
await page.getByLabel('Percentage').click();
await expect(
page.getByRole('button', { name: 'Threshold Rollout' })
).toBeVisible();
await page.getByRole('list').getByLabel('Percentage').first().fill('70');
await page.getByRole('list').getByLabel('Percentage').click();
await page.getByRole('button', { name: 'Reset' }).first().click();
await expect(page.getByLabel('Percentage')).toHaveValue('100');
});
Expand Down Expand Up @@ -59,13 +62,18 @@ test.describe('Rollouts', () => {

test('can delete rollout', async ({ page }) => {
await page.getByRole('link', { name: 'test-boolean' }).click();
await expect(
page.getByRole('button', { name: 'Threshold Rollout' })
).toBeVisible();
await page
.getByRole('list')
.locator('[id="headlessui-menu-button-\\:r4\\:"]')
.first()
.click();
await page.getByRole('menuitem', { name: 'Delete' }).click();
await page.getByRole('button', { name: 'Delete' }).click();
await expect(page.getByText('Successfully deleted rollout')).toBeVisible();
await expect(
page.getByRole('button', { name: 'Threshold Rollout' })
).toBeHidden();
});
});

0 comments on commit 9e58d2c

Please sign in to comment.