Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
osundwajeff committed Jan 26, 2024
1 parent f834f62 commit 84cfeab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions playwright/ci-test/tests/06-create-new-site.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ test('test', async ({ page }) => {
await page.locator('input[name="electricalconduOne"]').fill('3');
await page.getByRole('button', { name: 'next' }).click();
await page.waitForLoadState('domcontentloaded');
await page.locator('#checkbox-102').check();
await page.locator('#checkbox-2').check();
//await expect(page.getByText('17.00117.00')).toBeVisible();
await expect(page.getByRole('button', { name: 'Save' })).toBeEnabled();
await page.waitForLoadState('domcontentloaded');
await page.getByRole('button', { name: 'Save' }).click();
await expect(page.getByRole('heading', { name: 'Observation Saved.' })).toBeVisible({timeout: 300000});
//await expect(page.getByRole('dialog')).toContainText('The record was saved successfully.');
//await page.getByRole('button', { name: 'Ok' }).click();
//await page.getByRole('img', { name: 'close' }).click();
//await page.getByRole('button', { name: 'Home' }).click();
await expect(page.getByRole('dialog')).toContainText('The record was saved successfully.');
await page.getByRole('button', { name: 'Ok' }).click();
await page.getByRole('img', { name: 'close' }).click();
await page.getByRole('button', { name: 'Home' }).click();

//await expect(page.getByText('test')).toBeVisible();
//await expect(page.getByText('Username: kartoza_admin').first()).toBeVisible();
//await expect(page.getByText('Organisation:').first()).toBeVisible();
await expect(page.getByText('test')).toBeVisible();
await expect(page.getByText('Username: kartoza_admin').first()).toBeVisible();
await expect(page.getByText('Organisation:').first()).toBeVisible();
//await expect(page.getByText('Score:17.00')).toBeVisible();
});
12 changes: 6 additions & 6 deletions playwright/ci-test/tests/07-use-existing-site.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ test.describe('test - use existing site', () => {
await page.locator('#checkbox-2').check();
await page.getByRole('button', { name: 'Save' }).click();
await expect(page.getByRole('heading', { name: 'Observation Saved.' })).toBeVisible();
//await expect(page.getByRole('dialog')).toContainText('The record was saved successfully.');
//await page.getByRole('button', { name: 'Ok' }).click();
//await page.getByRole('img', { name: 'close' }).click();
await expect(page.getByRole('dialog')).toContainText('The record was saved successfully.');
await page.getByRole('button', { name: 'Ok' }).click();
await page.getByRole('img', { name: 'close' }).click();


});
Expand Down Expand Up @@ -84,9 +84,9 @@ test.describe('test - use existing site', () => {
await page.locator('#checkbox-5').check();
await page.getByRole('button', { name: 'Save' }).click();
await expect(page.getByRole('heading', { name: 'Observation Saved.' })).toBeVisible();
//await expect(page.getByRole('dialog')).toContainText('The record was saved successfully.');
//await page.getByRole('button', { name: 'Ok' }).click();
//await page.getByRole('img', { name: 'close' }).click();
await expect(page.getByRole('dialog')).toContainText('The record was saved successfully.');
await page.getByRole('button', { name: 'Ok' }).click();
await page.getByRole('img', { name: 'close' }).click();
});

});

0 comments on commit 84cfeab

Please sign in to comment.