Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Test: Links in user content #55

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions API-tests/database/portal_test_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ INSERT INTO `data` (`recordID`, `indicatorID`, `series`, `data`, `metadata`, `ti
(14, 8, 1, '86', '{\"email\": \"[email protected]\", \"lastName\": \"Cummings\", \"userName\": \"vtradqmyra\", \"firstName\": \"Cristopher\", \"middleName\": \"Frami\"}', 1695331172, 'tester'),
(14, 10, 1, '199', '{\"email\": \"[email protected]\", \"lastName\": \"Bins\", \"userName\": \"vtrsfyflossie\", \"firstName\": \"Carmine\", \"middleName\": \"Casper\"}', 1695339059, 'tester'),
(15, 3, 1, '36483', NULL, 1694021465, 'tester'),
(15, 4, 1, '89769', NULL, 1694021465, 'tester'),
(15, 4, 1, 'https://va.gov https://va.gov/about https://va.gov/?param=1234&test https://va.gov <a href="https://va.gov">va.gov</a>', NULL, 1694021465, 'tester'),
(15, 5, 1, '51717', NULL, 1694021465, 'tester'),
(15, 8, 1, '263', '{\"email\": \"[email protected]\", \"lastName\": \"Conn\", \"userName\": \"vtrhkwpenny\", \"firstName\": \"Jc\", \"middleName\": \"Schiller\"}', 1695331172, 'tester'),
(15, 10, 1, '221', '{\"email\": \"[email protected]\", \"lastName\": \"Davis\", \"userName\": \"vtratjalyson\", \"firstName\": \"Jacinta\", \"middleName\": \"Wilkinson\"}', 1695339059, 'tester'),
Expand Down Expand Up @@ -6229,7 +6229,7 @@ INSERT INTO `indicators` (`indicatorID`, `name`, `format`, `description`, `defau
(1, 'Test', 'text', '', '', NULL, 'form_548f8', NULL, NULL, NULL, NULL, 0, 0, '2023-08-17 15:48:04', 0, 1),
(2, 'Grid', 'grid\n[{\"name\":\"Col 1\",\"id\":\"col_7664\",\"type\":\"text\"},{\"name\":\"Col 2\",\"id\":\"col_15d5\",\"type\":\"text\"},{\"name\":\"Col 3\",\"id\":\"col_c80a\",\"type\":\"text\"}]', '', '', NULL, 'form_47236', NULL, NULL, NULL, NULL, 0, 0, '2023-08-28 21:32:52', 0, 0),
(3, 'Single line text', 'text', '', '', NULL, 'form_5ea07', NULL, NULL, NULL, NULL, 0, 0, '2023-09-06 17:30:22', 0, 0),
(4, 'Multi line text', 'textarea', '', '', 3, 'form_5ea07', NULL, NULL, '[{\"childIndID\":4,\"parentIndID\":7,\"selectedOp\":\"==\",\"selectedParentValue\":\"A\",\"selectedChildValue\":\"\",\"selectedOutcome\":\"show\",\"crosswalkFile\":\"\",\"crosswalkHasHeader\":false,\"level2IndID\":null,\"childFormat\":\"textarea\",\"parentFormat\":\"radio\"}]', NULL, 0, 0, '2023-09-06 17:30:30', 0, 0),
(4, 'Multi line text', 'textarea', '', '', 3, 'form_5ea07', NULL, NULL, NULL, NULL, 0, 0, '2023-09-06 17:30:30', 0, 0),
(5, 'Numeric', 'number', '', '', 3, 'form_5ea07', NULL, NULL, NULL, NULL, 0, 0, '2023-09-06 17:30:36', 0, 0),
(6, 'Single line text B', 'text', '', '', 3, 'form_5ea07', NULL, NULL, NULL, NULL, 0, 0, '2023-09-07 15:17:50', 0, 0),
(7, 'Radio', 'radio\nA\nB\nC', '', '', 3, 'form_5ea07', NULL, NULL, NULL, NULL, 0, 0, '2023-09-07 15:18:45', 0, 0),
Expand Down Expand Up @@ -6344,7 +6344,7 @@ INSERT INTO `records` (`recordID`, `date`, `serviceID`, `userID`, `title`, `prio
(12, 1694021465, 0, 'tester', 'TestFormQuery_InitiatorName', 0, 'Submitted', 1694021485, 0, 0, 1, '{\"email\": \"[email protected]\", \"lastName\": \"Tester\", \"userName\": \"tester\", \"firstName\": \"Tester\", \"middleName\": \"\"}'),
(13, 1694021465, 0, 'tester_disabled', 'TestFormQuery_Initiator_Disabled__Empty_Metadata', 0, 'Submitted', 1694021485, 0, 0, 1, '{\"email\": \"\", \"lastName\": \"\", \"userName\": \"\", \"firstName\": \"\", \"middleName\": \"\"}'),
(14, 1694021465, 0, 'tester', 'Workflow Form Fields', 0, 'Approved', 1694021485, 0, 0, 1, '{\"email\": \"[email protected]\", \"lastName\": \"Tester\", \"userName\": \"tester\", \"firstName\": \"Tester\", \"middleName\": \"\"}'),
(15, 1694021465, 0, 'tester', 'Available for test case', 0, 'Submitted', 1694021485, 0, 0, 1, '{\"email\": \"[email protected]\", \"lastName\": \"Tester\", \"userName\": \"tester\", \"firstName\": \"Tester\", \"middleName\": \"\"}'),
(15, 1694021465, 0, 'tester', 'Clickable User Content Links', 0, 'Submitted', 1694021485, 0, 0, 1, '{\"email\": \"[email protected]\", \"lastName\": \"Tester\", \"userName\": \"tester\", \"firstName\": \"Tester\", \"middleName\": \"\"}'),
(16, 1694021465, 0, 'tester', 'Available for test case', 0, 'Submitted', 1694021485, 0, 0, 1, '{\"email\": \"[email protected]\", \"lastName\": \"Tester\", \"userName\": \"tester\", \"firstName\": \"Tester\", \"middleName\": \"\"}'),
(17, 1694021465, 0, 'tester', 'Available for test case', 0, 'Submitted', 1694021485, 0, 0, 1, '{\"email\": \"[email protected]\", \"lastName\": \"Tester\", \"userName\": \"tester\", \"firstName\": \"Tester\", \"middleName\": \"\"}'),
(18, 1694021465, 0, 'tester', 'Available for test case', 0, 'Submitted', 1694021485, 0, 0, 1, '{\"email\": \"[email protected]\", \"lastName\": \"Tester\", \"userName\": \"tester\", \"firstName\": \"Tester\", \"middleName\": \"\"}'),
Expand Down
7 changes: 7 additions & 0 deletions end2end/tests/printview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ test('workflow form fields load after subsequent getWorkflow() executions', asyn
const screenshot = await page.screenshot();
await testInfo.attach('screenshot', { body: screenshot, contentType: 'image/png' });
});

test('links in user content are visible', async ({ page }) => {
await page.goto('https://host.docker.internal/Test_Request_Portal/index.php?a=printview&recordID=15');
await expect(page.getByRole('link', { name: 'https://va.gov' }).first()).toBeVisible();
await expect(page.getByRole('link', { name: 'https://va.gov' }).nth(3)).toBeVisible();
await expect(page.locator('#data_4_1')).toContainText('<a href="https://va.gov">va.gov</a>');
});