Skip to content

Commit e032f09

Browse files
committed
More test work
1 parent 53648e3 commit e032f09

12 files changed

+26
-121
lines changed

tests/calendar.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test.describe('calendar', () => {
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
1111
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
12-
await page.getByRole('link', { name: 'Calendar' }).click();
12+
await page.getByRole('link', { name: 'Calendar' }).click();
1313
await expect(page.locator('#page-wrapper')).toContainText('Training');
1414
await page.getByRole('link', { name: 'Manage Types' }).click();
1515
await expect(page.locator('tbody')).toContainText('#bf4a4a');

tests/calls.spec.ts

Lines changed: 1 addition & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test.describe('calls', () => {
88
await page.getByPlaceholder('Password').click();
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
11-
await page.getByRole('link', { name: 'Calls' }).click();
11+
await page.getByRole('link', { name: 'Calls' }).click();
1212
await expect(page.locator('#unitsStatusesList')).toContainText('Engine 1');
1313
await page.getByRole('link', { name: 'Archived Calls' }).click();
1414
await expect(page.locator('#addOldCall')).toContainText('Add Archived Call');
@@ -52,99 +52,4 @@ test.describe('calls', () => {
5252
await page.getByRole('button', { name: 'Add Archived Call' }).click();
5353
await expect(page.locator('tbody')).toContainText('Test Archive Call');
5454
});
55-
56-
test('add new call', async ({ page }) => {
57-
await page.goto('https://qaweb.resgrid.dev/Account/LogOn');
58-
await page.getByPlaceholder('Username').click();
59-
await page.getByPlaceholder('Username').fill(process.env.PW_LOGIN_USERNAME);
60-
await page.getByPlaceholder('Password').click();
61-
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
62-
await page.getByRole('button', { name: 'Log On' }).click();
63-
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
64-
await page.getByRole('link', { name: ' Calls' }).click();
65-
await expect(page.locator('#unitsStatusesList')).toContainText('Engine 1');
66-
await page.locator('#page-wrapper div').filter({ hasText: 'Calls Home Calls Archived' }).locator('#addPersonButton').click();
67-
await page.getByPlaceholder('Name of the Call').click();
68-
await page.getByPlaceholder('Name of the Call').fill('test new call');
69-
await page.locator('#CallPriority').selectOption('2');
70-
await page.locator('#newCallForm div').filter({ hasText: 'Type No Type MEDICAL' }).locator('div').click();
71-
await page.locator('#Call_Type').selectOption('STRUCTURE FIRE');
72-
await page.getByPlaceholder('Name of the Person Reporting').click();
73-
await page.getByPlaceholder('Name of the Person Reporting').fill('test1');
74-
await page.getByPlaceholder('Phone or Email address of the').click();
75-
await page.getByPlaceholder('Phone or Email address of the').fill('test2');
76-
await page.getByPlaceholder('CAD Id or Inbound Call System').click();
77-
await page.getByPlaceholder('CAD Id or Inbound Call System').fill('test3');
78-
await page.getByPlaceholder('Main or Parent External').click();
79-
await page.getByPlaceholder('Main or Parent External').fill('test4');
80-
await page.getByPlaceholder('Partner or Reference Number').click();
81-
await page.getByPlaceholder('Partner or Reference Number').fill('test5');
82-
await page.locator('#nature-container').getByRole('paragraph').click();
83-
await page.locator('#nature-container div').first().fill('test6');
84-
await page.locator('#note-container div').first().click();
85-
await page.locator('#note-container div').first().fill('test7');
86-
await page.getByPlaceholder('Map Book Page').click();
87-
await page.getByPlaceholder('Map Book Page').fill('test8');
88-
await page.getByPlaceholder('Full Address of the call (').click();
89-
await page.getByPlaceholder('Full Address of the call (').fill('123 main street reno nv');
90-
await page.getByRole('link', { name: 'Find Address' }).click();
91-
await expect(page.getByRole('button', { name: 'Marker' })).toBeVisible();
92-
await page.locator('input[name="dispatchUser_B5241B84-8BDC-4EA2-B35B-87E47138A950"]').check();
93-
await page.getByRole('button', { name: 'Create and Dispatch Call' }).click();
94-
await expect(page.locator('#activeCallsList')).toContainText('test new call');
95-
});
96-
97-
test('view call', async ({ page }) => {
98-
await page.goto('https://qaweb.resgrid.dev/Account/LogOn');
99-
await page.getByPlaceholder('Username').click();
100-
await page.getByPlaceholder('Username').fill(process.env.PW_LOGIN_USERNAME);
101-
await page.getByPlaceholder('Password').click();
102-
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
103-
await page.getByRole('button', { name: 'Log On' }).click();
104-
await page.getByRole('link', { name: ' Calls' }).click();
105-
await page.getByRole('row', { name: '24-24 test new call 12/31/' }).getByRole('link').first().click();
106-
await expect(page.locator('#page-wrapper')).toContainText('test new call');
107-
await page.getByPlaceholder('Enter note here...').click();
108-
await page.getByPlaceholder('Enter note here...').fill('test');
109-
await page.getByRole('button', { name: 'Add Note' }).click();
110-
await expect(page.locator('#note-messages-inner')).toContainText('test');
111-
await expect(page.locator('#cluster_info')).toContainText('test4');
112-
await expect(page.locator('#cluster_info')).toContainText('Shawn Jackson');
113-
await page.getByRole('link', { name: 'Dispatched' }).click();
114-
await expect(page.getByRole('table')).toContainText('Test User69');
115-
});
116-
117-
test('update call', async ({ page }) => {
118-
await page.goto('https://qaweb.resgrid.dev/Account/LogOn');
119-
await page.getByPlaceholder('Username').click();
120-
await page.getByPlaceholder('Username').fill(process.env.PW_LOGIN_USERNAME);
121-
await page.getByPlaceholder('Password').click();
122-
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
123-
await page.getByRole('button', { name: 'Log On' }).click();
124-
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
125-
await page.getByRole('link', { name: ' Calls' }).click();
126-
await page.getByRole('row', { name: '24-24 test new call 12/31/' }).getByRole('link').nth(1).click();
127-
await page.getByPlaceholder('Name of the Call').click();
128-
await page.getByPlaceholder('Name of the Call').fill('test new call updated');
129-
await page.locator('#CallPriority').selectOption('1');
130-
await page.locator('#Call_Type').selectOption('MEDICAL');
131-
await page.getByPlaceholder('Name of the Person Reporting').click();
132-
await page.getByPlaceholder('Name of the Person Reporting').fill('test1a');
133-
await page.getByPlaceholder('Phone or Email address of the').click();
134-
await page.getByPlaceholder('Phone or Email address of the').fill('test2a');
135-
await page.getByPlaceholder('CAD Id or Inbound Call System').click();
136-
await page.getByPlaceholder('CAD Id or Inbound Call System').fill('test3a');
137-
await page.getByPlaceholder('Main or Parent External').click();
138-
await page.getByPlaceholder('Main or Parent External').fill('test4a');
139-
await page.getByPlaceholder('Partner or Reference Number').click();
140-
await page.getByPlaceholder('Partner or Reference Number').fill('test5a');
141-
await page.getByText('test6').click();
142-
await page.locator('#nature-container div').filter({ hasText: 'test6' }).fill('test6a');
143-
await page.getByText('test7').click();
144-
await page.locator('#note-container div').filter({ hasText: 'test7' }).fill('test7a');
145-
await page.getByPlaceholder('Map Book Page').click();
146-
await page.getByPlaceholder('Map Book Page').fill('test8a');
147-
await page.getByRole('button', { name: 'Update' }).click();
148-
await expect(page.locator('#activeCallsList')).toContainText('test new call updated');
149-
});
15055
});

tests/documents.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test.describe('documents', () => {
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
1111
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
12-
await page.getByRole('link', { name: 'Documents' }).click();
12+
await page.getByRole('link', { name: 'Documents' }).click();
1313
await expect(page.locator('#page-wrapper')).toContainText('test');
1414
});
1515
});

tests/inventory.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test.describe('inventory', () => {
88
await page.getByPlaceholder('Password').click();
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
11-
await page.getByRole('link', { name: 'Inventory' }).click();
11+
await page.getByRole('link', { name: 'Inventory' }).click();
1212
await expect(page.locator('tbody')).toContainText('Station 2');
1313
await page.getByRole('link', { name: 'View History' }).click();
1414
await expect(page.locator('tbody')).toContainText('523');

tests/mapping.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ test.describe('mapping', () => {
88
await page.getByPlaceholder('Password').click();
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
11-
await page.getByRole('link', { name: 'Mapping' }).click();
12-
await expect(page.getByTitle('Test Call')).toBeVisible();
11+
await page.getByRole('link', { name: 'Mapping' }).click();
12+
await expect(page.getByTitle('Test Call')).toBeVisible({ timeout: 10_000 });
1313
await expect(page.locator('ol')).toContainText('Mapping');
1414
});
1515

@@ -20,7 +20,7 @@ test.describe('mapping', () => {
2020
await page.getByPlaceholder('Password').click();
2121
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
2222
await page.getByRole('button', { name: 'Log On' }).click();
23-
await page.getByRole('link', { name: 'Mapping' }).click();
23+
await page.getByRole('link', { name: 'Mapping' }).click();
2424
await page.getByRole('link', { name: 'Manage Layers' }).click();
2525
await expect(page.locator('ol')).toContainText('Layers');
2626
await page.getByRole('link', { name: 'New Layer' }).click();

tests/messages.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ test.describe('messages', () => {
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
1111
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
12-
await page.getByRole('link', { name: '' }).click();
13-
await page.getByRole('link', { name: ' View Your Message Inbox' }).click();
12+
await page.locator('#side-menu').getByRole('link', { name: 'Shawn Jackson' }).click();
13+
await page.getByRole('link', { name: 'Mailbox' }).click();
1414
await expect(page.locator('tbody')).toContainText('Test for WebJob Worker');
1515
await page.getByRole('row', { name: 'test Carl Barrett 01/31/2016' }).locator('#message').check();
1616
await page.getByText('Mark Selected as Read').click();
@@ -38,8 +38,8 @@ test.describe('messages', () => {
3838
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
3939
await page.getByRole('button', { name: 'Log On' }).click();
4040
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
41-
await page.getByRole('link', { name: '' }).click();
42-
await page.getByRole('link', { name: ' View Your Message Inbox' }).click();
41+
await page.locator('#side-menu').getByRole('link', { name: 'Shawn Jackson' }).click();
42+
await page.getByRole('link', { name: 'Mailbox' }).click();
4343
await page.getByRole('link', { name: ' Sent Messages' }).click();
4444
await expect(page.locator('tbody')).toContainText('Test Message');
4545
});
@@ -52,8 +52,8 @@ test.describe('messages', () => {
5252
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
5353
await page.getByRole('button', { name: 'Log On' }).click();
5454
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
55-
await page.getByRole('link', { name: '' }).click();
56-
await page.getByRole('link', { name: ' View Your Message Inbox' }).click();
55+
await page.locator('#side-menu').getByRole('link', { name: 'Shawn Jackson' }).click();
56+
await page.getByRole('link', { name: 'Mailbox' }).click();
5757
await page.getByRole('link', { name: 'Compose Message' }).click();
5858
await page.goto('https://qaweb.resgrid.dev/User/Messages/Compose');
5959
await page.getByPlaceholder('The subject/title of the').click();

tests/notes.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test.describe('notes', () => {
88
await page.getByPlaceholder('Password').click();
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
11-
await page.getByRole('link', { name: 'Notes' }).click();
11+
await page.getByRole('link', { name: 'Notes' }).click();
1212
await expect(page.locator('#page-wrapper')).toContainText('Jj test');
1313
await page.getByRole('link', { name: 'New Note' }).click();
1414
await expect(page.locator('#newNoteForm')).toContainText('Category');

tests/personnel.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ test.describe('personnel', () => {
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
1111
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
12-
await page.getByRole('link', { name: 'Personnel' }).click();
12+
await page.getByRole('link', { name: 'Personnel' }).click();
1313
await expect(page.locator('#personnelGroups_-1')).toContainText('Bill Hayden');
14-
await page.getByRole('treeitem', { name: 'Ungrouped Personnel' }).click();
14+
await page.getByRole('treeitem', { name: 'Ungrouped Personnel' }).click();
1515
await expect(page.locator('#personnelGroups_0')).toContainText('Max Swift');
1616
await page.getByRole('button', { name: 'Set Staffing' }).nth(1).click();
1717
await page.locator('#PersonnelStaffingDropdown').selectOption('1');
1818
await page.locator('#savingPersonnelStaffingButton').click();
19-
await page.getByRole('treeitem', { name: 'Ungrouped Personnel' }).click();
19+
await page.getByRole('treeitem', { name: 'Ungrouped Personnel' }).click();
2020
await page.getByRole('button', { name: 'Set Status' }).nth(1).click();
2121
await page.locator('#PersonnelStatusDropdown').selectOption('1');
2222
await page.locator('#savingPersonnelStatusButton').click();
@@ -29,7 +29,7 @@ test.describe('personnel', () => {
2929
await page.getByPlaceholder('Password').click();
3030
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
3131
await page.getByRole('button', { name: 'Log On' }).click();
32-
await page.getByRole('link', { name: 'Personnel' }).click();
32+
await page.getByRole('link', { name: 'Personnel' }).click();
3333
await page.getByRole('link', { name: 'Manage Roles' }).click();
3434
await expect(page.locator('tbody')).toContainText('Engineer');
3535
await page.getByRole('row', { name: 'Engineer Apparatuses Operator' }).getByRole('link').first().click();

tests/reports.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test.describe('reports', () => {
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
1111
await page.goto('https://qaweb.resgrid.dev/User/Home/Dashboard');
12-
await page.getByRole('link', { name: 'Reports' }).click();
12+
await page.getByRole('link', { name: 'Reports' }).click();
1313
await expect(page.locator('ol')).toContainText('Reporting');
1414
await page.getByRole('row', { name: 'Personnel Report View all the' }).getByRole('link').nth(1).click();
1515
await expect(page.getByRole('heading')).toContainText('Resgrid Personnel Report');

tests/shifts.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test.describe('shifts', () => {
88
await page.getByPlaceholder('Password').click();
99
await page.getByPlaceholder('Password').fill(process.env.PW_LOGIN_PASSWORD);
1010
await page.getByRole('button', { name: 'Log On' }).click();
11-
await page.getByRole('link', { name: 'Shifts' }).click();
11+
await page.getByRole('link', { name: 'Shifts' }).click();
1212
await expect(page.getByRole('cell', { name: 'S Shift' })).toBeVisible();
1313
await expect(page.locator('tbody')).toContainText('S Shift');
1414
await page.getByRole('link', { name: 'Your Shifts' }).click();

0 commit comments

Comments
 (0)