-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added high level tests for each module
- Loading branch information
Showing
11 changed files
with
271 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('calendar view calendar and types', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: ' Calendar' }).click(); | ||
await expect(page.locator('#page-wrapper')).toContainText('Training'); | ||
await page.getByRole('link', { name: 'Manage Types' }).click(); | ||
await expect(page.locator('tbody')).toContainText('#bf4a4a'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('documents view docs list', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: ' Documents' }).click(); | ||
await expect(page.locator('#page-wrapper')).toContainText('test'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('inventory view inventory', 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 page.getByRole('link', { name: ' Inventory' }).click(); | ||
await expect(page.locator('tbody')).toContainText('Station 2'); | ||
await page.getByRole('link', { name: 'View History' }).click(); | ||
await expect(page.locator('tbody')).toContainText('523'); | ||
await page.getByRole('link', { name: 'Inventory', exact: true }).click(); | ||
await page.getByRole('link', { name: 'Adjust Inventory' }).click(); | ||
await expect(page.getByRole('form')).toContainText('Unit'); | ||
await page.getByRole('link', { name: 'Inventory', exact: true }).click(); | ||
await page.getByRole('link', { name: 'Manage Types' }).click(); | ||
await expect(page.locator('tbody')).toContainText('Packet'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('mapping view map', 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 page.getByRole('link', { name: ' Mapping' }).click(); | ||
await expect(page.getByTitle('Test Call')).toBeVisible(); | ||
await expect(page.locator('ol')).toContainText('Mapping'); | ||
}); | ||
|
||
test('mapping new layer', 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 page.getByRole('link', { name: ' Mapping' }).click(); | ||
await page.getByRole('link', { name: 'Manage Layers' }).click(); | ||
await expect(page.locator('ol')).toContainText('Layers'); | ||
await page.getByRole('link', { name: 'New Layer' }).click(); | ||
await expect(page.locator('#newLayerForm')).toContainText('Name'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('messages view inbox', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: '' }).click(); | ||
await page.getByRole('link', { name: ' View Your Message Inbox' }).click(); | ||
await expect(page.locator('tbody')).toContainText('Test for WebJob Worker'); | ||
await page.getByRole('row', { name: 'test Carl Barrett 01/31/2016' }).locator('#message').check(); | ||
await page.getByText('Mark Selected as Read').click(); | ||
await page.getByRole('button', { name: 'OK' }).click(); | ||
}); | ||
|
||
test('messages inbox view message', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.goto('https://qaweb.resgrid.dev/User/Messages/Inbox'); | ||
await page.getByRole('row', { name: 'test Carl Barrett 01/31/2016' }).getByRole('link').first().click(); | ||
await expect(page.locator('h3')).toContainText('Subject: test'); | ||
}); | ||
|
||
test('messages inbox view outbox', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: '' }).click(); | ||
await page.getByRole('link', { name: ' View Your Message Inbox' }).click(); | ||
await page.getByRole('link', { name: ' Sent Messages' }).click(); | ||
await expect(page.locator('tbody')).toContainText('Test Message'); | ||
}); | ||
|
||
test('messages send message', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
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.goto('https://qaweb.resgrid.dev/User/Messages/Compose'); | ||
await page.getByPlaceholder('The subject/title of the').click(); | ||
await page.getByPlaceholder('The subject/title of the').fill('test automation'); | ||
await page.locator('#editor-container div').first().click(); | ||
await page.locator('#editor-container div').first().fill('just a test!'); | ||
await page.locator('div:nth-child(3) > .k-widget > .k-multiselect-wrap > .k-input').click(); | ||
await page.getByRole('option', { name: 'Carl Barrett' }).click(); | ||
await page.getByRole('button', { name: ' Send' }).click(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('note view notes list', 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 page.getByRole('link', { name: ' Notes' }).click(); | ||
await expect(page.locator('#page-wrapper')).toContainText('Jj test'); | ||
await page.getByRole('link', { name: 'New Note' }).click(); | ||
await expect(page.locator('#newNoteForm')).toContainText('Category'); | ||
await page.getByText('Title Category None Body').click(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('personnel view users and set', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: ' Personnel' }).click(); | ||
await expect(page.locator('#personnelGroups_-1')).toContainText('Bill Hayden'); | ||
await page.getByRole('treeitem', { name: ' Ungrouped Personnel' }).click(); | ||
await expect(page.locator('#personnelGroups_0')).toContainText('Max Swift'); | ||
await page.getByRole('button', { name: 'Set Staffing' }).nth(1).click(); | ||
await page.locator('#PersonnelStaffingDropdown').selectOption('1'); | ||
await page.locator('#savingPersonnelStaffingButton').click(); | ||
await page.getByRole('treeitem', { name: ' Ungrouped Personnel' }).click(); | ||
await page.getByRole('button', { name: 'Set Status' }).nth(1).click(); | ||
await page.locator('#PersonnelStatusDropdown').selectOption('1'); | ||
await page.locator('#savingPersonnelStatusButton').click(); | ||
}); | ||
|
||
test('personnel view roles', 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 page.getByRole('link', { name: ' Personnel' }).click(); | ||
await page.getByRole('link', { name: 'Manage Roles' }).click(); | ||
await expect(page.locator('tbody')).toContainText('Engineer'); | ||
await page.getByRole('row', { name: 'Engineer Apparatuses Operator' }).getByRole('link').first().click(); | ||
await expect(page.getByRole('rowgroup')).toContainText('Andy Biasotti'); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('reports view personnel report', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: ' Reports' }).click(); | ||
await expect(page.locator('ol')).toContainText('Reporting'); | ||
await page.getByRole('row', { name: 'Personnel Report View all the' }).getByRole('link').nth(1).click(); | ||
await expect(page.getByRole('heading')).toContainText('Resgrid Personnel Report'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('shifts view shifts', 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 page.getByRole('link', { name: ' Shifts' }).click(); | ||
await expect(page.getByRole('cell', { name: 'S Shift' })).toBeVisible(); | ||
await expect(page.locator('tbody')).toContainText('S Shift'); | ||
await page.getByRole('link', { name: 'Your Shifts' }).click(); | ||
await expect(page.getByRole('cell', { name: 'S Shift' }).nth(1)).toBeVisible(); | ||
await expect(page.locator('#page-wrapper')).toContainText('S Shift'); | ||
await page.getByRole('link', { name: 'Shifts', exact: true }).click(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('trainings view trainings list', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: ' Trainings' }).click(); | ||
await expect(page.locator('tbody')).toContainText('Protocol training for ebola.'); | ||
await page.getByRole('link', { name: 'View Training' }).nth(1).click(); | ||
await expect(page.locator('#page-wrapper')).toContainText('11/10/2014'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('units view units list', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: ' Units' }).click(); | ||
await expect(page.locator('#DataTables_Table_0')).toContainText('Engine 1'); | ||
await page.getByRole('treeitem', { name: ' Ungrouped Units' }).click(); | ||
await expect(page.locator('#DataTables_Table_1')).toContainText('BC Buggy'); | ||
}); | ||
|
||
test('units set unit status', 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 page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard'); | ||
await page.getByRole('link', { name: ' Units' }).click(); | ||
await page.getByRole('treeitem', { name: ' Ungrouped Units' }).click(); | ||
await page.getByRole('button', { name: 'Set Status' }).click(); | ||
await page.locator('#UnitStatusDropdown').selectOption('3'); | ||
await page.locator('#savingUnitStatusButton').click(); | ||
await page.getByRole('treeitem', { name: ' Ungrouped Units' }).click(); | ||
await expect(page.locator('#DataTables_Table_1')).toContainText('Committed'); | ||
}); |