Skip to content

Commit

Permalink
Adding smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
ucswift committed Jan 2, 2025
1 parent 813a78f commit e237abb
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions tests/smoke.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { test, expect } from '@playwright/test';

test('test', async ({ page }) => {
await page.goto('https://qaweb.resgrid.dev/Account/LogOn');
await page.getByPlaceholder('Username').click();
await page.getByPlaceholder('Username').fill(process.env.PW_LOGIN_USERNAME);
await page.getByPlaceholder('Password').click();
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
await page.getByRole('button', { name: 'Log On' }).click();
await expect(page.getByRole('rowgroup')).toContainText('Shawn Jackson');
await page.getByRole('link', { name: 'Responding', exact: true }).click();
await page.locator('#UserStateEnum').selectOption('Unavailable');
await page.getByRole('button', { name: 'Set Staffing Level' }).click();
await page.getByRole('link', { name: '' }).click();
await page.getByRole('link', { name: ' View Your Message Inbox' }).click();
await page.getByRole('link', { name: 'Compose Message' }).click();
await page.getByRole('link', { name: ' Calls' }).click();
await expect(page.locator('#unitsStatusesList')).toContainText('Engine 1');
await page.getByRole('link', { name: '' }).click();
await page.getByRole('link', { name: ' View Your Message Inbox' }).click();
await expect(page.locator('#page-wrapper')).toContainText('Sent Messages');
await page.getByRole('link', { name: 'Compose Message' }).click();
await expect(page.locator('h2')).toContainText('Compose Message');
await page.getByRole('link', { name: ' Personnel' }).click();
await page.getByRole('treeitem', { name: ' Ungrouped Personnel' }).click();
await page.getByRole('treeitem', { name: ' All Personnel' }).click();
await page.getByRole('link', { name: ' Units' }).click();
await page.getByRole('link', { name: ' Personnel' }).click();
await expect(page.locator('#personnelGroups_-1')).toContainText('Bill Hayden');
await page.getByRole('link', { name: ' Units' }).click();
await expect(page.locator('#DataTables_Table_0')).toContainText('Engine 1');
await page.getByRole('link', { name: 'Unit Staffing' }).click();
await expect(page.getByRole('form')).toContainText('Engine 1');
await page.getByRole('link', { name: ' Mapping' }).click();
await page.locator('strong').filter({ hasText: 'Mapping' }).click();
await page.getByRole('link', { name: ' Shifts' }).click();
await expect(page.locator('tbody')).toContainText('S Shift');
await page.getByRole('link', { name: 'Shift Staffing' }).click();
await expect(page.locator('ol')).toContainText('Shift Staffing');
await page.getByRole('link', { name: ' Calendar' }).click();
await expect(page.locator('#page-wrapper')).toContainText('Upcoming');
await page.getByRole('link', { name: ' Trainings' }).click();
await expect(page.locator('tbody')).toContainText('Test Engineer Training');
});

0 comments on commit e237abb

Please sign in to comment.