Skip to content

Commit

Permalink
More test work
Browse files Browse the repository at this point in the history
  • Loading branch information
ucswift committed Jan 9, 2025
1 parent 53648e3 commit e032f09
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 121 deletions.
2 changes: 1 addition & 1 deletion tests/calendar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test.describe('calendar', () => {
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 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');
Expand Down
97 changes: 1 addition & 96 deletions tests/calls.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.describe('calls', () => {
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: 'Calls' }).click();
await page.getByRole('link', { name: 'Calls' }).click();
await expect(page.locator('#unitsStatusesList')).toContainText('Engine 1');
await page.getByRole('link', { name: 'Archived Calls' }).click();
await expect(page.locator('#addOldCall')).toContainText('Add Archived Call');
Expand Down Expand Up @@ -52,99 +52,4 @@ test.describe('calls', () => {
await page.getByRole('button', { name: 'Add Archived Call' }).click();
await expect(page.locator('tbody')).toContainText('Test Archive Call');
});

test('add new call', 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: ' Calls' }).click();
await expect(page.locator('#unitsStatusesList')).toContainText('Engine 1');
await page.locator('#page-wrapper div').filter({ hasText: 'Calls Home Calls Archived' }).locator('#addPersonButton').click();
await page.getByPlaceholder('Name of the Call').click();
await page.getByPlaceholder('Name of the Call').fill('test new call');
await page.locator('#CallPriority').selectOption('2');
await page.locator('#newCallForm div').filter({ hasText: 'Type No Type MEDICAL' }).locator('div').click();
await page.locator('#Call_Type').selectOption('STRUCTURE FIRE');
await page.getByPlaceholder('Name of the Person Reporting').click();
await page.getByPlaceholder('Name of the Person Reporting').fill('test1');
await page.getByPlaceholder('Phone or Email address of the').click();
await page.getByPlaceholder('Phone or Email address of the').fill('test2');
await page.getByPlaceholder('CAD Id or Inbound Call System').click();
await page.getByPlaceholder('CAD Id or Inbound Call System').fill('test3');
await page.getByPlaceholder('Main or Parent External').click();
await page.getByPlaceholder('Main or Parent External').fill('test4');
await page.getByPlaceholder('Partner or Reference Number').click();
await page.getByPlaceholder('Partner or Reference Number').fill('test5');
await page.locator('#nature-container').getByRole('paragraph').click();
await page.locator('#nature-container div').first().fill('test6');
await page.locator('#note-container div').first().click();
await page.locator('#note-container div').first().fill('test7');
await page.getByPlaceholder('Map Book Page').click();
await page.getByPlaceholder('Map Book Page').fill('test8');
await page.getByPlaceholder('Full Address of the call (').click();
await page.getByPlaceholder('Full Address of the call (').fill('123 main street reno nv');
await page.getByRole('link', { name: 'Find Address' }).click();
await expect(page.getByRole('button', { name: 'Marker' })).toBeVisible();
await page.locator('input[name="dispatchUser_B5241B84-8BDC-4EA2-B35B-87E47138A950"]').check();
await page.getByRole('button', { name: 'Create and Dispatch Call' }).click();
await expect(page.locator('#activeCallsList')).toContainText('test new call');
});

test('view call', 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: ' Calls' }).click();
await page.getByRole('row', { name: '24-24 test new call 12/31/' }).getByRole('link').first().click();
await expect(page.locator('#page-wrapper')).toContainText('test new call');
await page.getByPlaceholder('Enter note here...').click();
await page.getByPlaceholder('Enter note here...').fill('test');
await page.getByRole('button', { name: 'Add Note' }).click();
await expect(page.locator('#note-messages-inner')).toContainText('test');
await expect(page.locator('#cluster_info')).toContainText('test4');
await expect(page.locator('#cluster_info')).toContainText('Shawn Jackson');
await page.getByRole('link', { name: 'Dispatched' }).click();
await expect(page.getByRole('table')).toContainText('Test User69');
});

test('update call', 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: ' Calls' }).click();
await page.getByRole('row', { name: '24-24 test new call 12/31/' }).getByRole('link').nth(1).click();
await page.getByPlaceholder('Name of the Call').click();
await page.getByPlaceholder('Name of the Call').fill('test new call updated');
await page.locator('#CallPriority').selectOption('1');
await page.locator('#Call_Type').selectOption('MEDICAL');
await page.getByPlaceholder('Name of the Person Reporting').click();
await page.getByPlaceholder('Name of the Person Reporting').fill('test1a');
await page.getByPlaceholder('Phone or Email address of the').click();
await page.getByPlaceholder('Phone or Email address of the').fill('test2a');
await page.getByPlaceholder('CAD Id or Inbound Call System').click();
await page.getByPlaceholder('CAD Id or Inbound Call System').fill('test3a');
await page.getByPlaceholder('Main or Parent External').click();
await page.getByPlaceholder('Main or Parent External').fill('test4a');
await page.getByPlaceholder('Partner or Reference Number').click();
await page.getByPlaceholder('Partner or Reference Number').fill('test5a');
await page.getByText('test6').click();
await page.locator('#nature-container div').filter({ hasText: 'test6' }).fill('test6a');
await page.getByText('test7').click();
await page.locator('#note-container div').filter({ hasText: 'test7' }).fill('test7a');
await page.getByPlaceholder('Map Book Page').click();
await page.getByPlaceholder('Map Book Page').fill('test8a');
await page.getByRole('button', { name: 'Update' }).click();
await expect(page.locator('#activeCallsList')).toContainText('test new call updated');
});
});
2 changes: 1 addition & 1 deletion tests/documents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test.describe('documents', () => {
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 page.getByRole('link', { name: 'Documents' }).click();
await expect(page.locator('#page-wrapper')).toContainText('test');
});
});
2 changes: 1 addition & 1 deletion tests/inventory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.describe('inventory', () => {
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 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');
Expand Down
6 changes: 3 additions & 3 deletions tests/mapping.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ test.describe('mapping', () => {
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 page.getByRole('link', { name: 'Mapping' }).click();
await expect(page.getByTitle('Test Call')).toBeVisible({ timeout: 10_000 });
await expect(page.locator('ol')).toContainText('Mapping');
});

Expand All @@ -20,7 +20,7 @@ test.describe('mapping', () => {
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: '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();
Expand Down
12 changes: 6 additions & 6 deletions tests/messages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ test.describe('messages', () => {
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.locator('#side-menu').getByRole('link', { name: 'Shawn Jackson' }).click();
await page.getByRole('link', { name: 'Mailbox' }).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();
Expand Down Expand Up @@ -38,8 +38,8 @@ test.describe('messages', () => {
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.locator('#side-menu').getByRole('link', { name: 'Shawn Jackson' }).click();
await page.getByRole('link', { name: 'Mailbox' }).click();
await page.getByRole('link', { name: ' Sent Messages' }).click();
await expect(page.locator('tbody')).toContainText('Test Message');
});
Expand All @@ -52,8 +52,8 @@ test.describe('messages', () => {
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.locator('#side-menu').getByRole('link', { name: 'Shawn Jackson' }).click();
await page.getByRole('link', { name: 'Mailbox' }).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();
Expand Down
2 changes: 1 addition & 1 deletion tests/notes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.describe('notes', () => {
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 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');
Expand Down
8 changes: 4 additions & 4 deletions tests/personnel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ test.describe('personnel', () => {
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 page.getByRole('link', { name: 'Personnel' }).click();
await expect(page.locator('#personnelGroups_-1')).toContainText('Bill Hayden');
await page.getByRole('treeitem', { name: 'Ungrouped Personnel' }).click();
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('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();
Expand All @@ -29,7 +29,7 @@ test.describe('personnel', () => {
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: '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();
Expand Down
2 changes: 1 addition & 1 deletion tests/reports.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test.describe('reports', () => {
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 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');
Expand Down
2 changes: 1 addition & 1 deletion tests/shifts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.describe('shifts', () => {
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 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();
Expand Down
2 changes: 1 addition & 1 deletion tests/trainings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test.describe('trainings', () => {
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 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');
Expand Down
10 changes: 5 additions & 5 deletions tests/units.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ test.describe('units', () => {
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('link', { name: 'Units' }).click();
await expect(page.locator('#DataTables_Table_0')).toContainText('Engine 1');
await page.getByRole('treeitem', { name: 'Ungrouped Units' }).click();
await page.getByRole('treeitem', { name: 'Ungrouped Units' }).click();
await expect(page.locator('#DataTables_Table_1')).toContainText('BC Buggy');
});

Expand All @@ -23,12 +23,12 @@ test.describe('units', () => {
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('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 page.getByRole('treeitem', { name: 'Ungrouped Units' }).click();
await expect(page.locator('#DataTables_Table_1')).toContainText('Committed');
});
});

0 comments on commit e032f09

Please sign in to comment.