Skip to content

Commit

Permalink
updated to include test for internal use form and renamed file
Browse files Browse the repository at this point in the history
  • Loading branch information
crystalkirscht committed Dec 18, 2024
1 parent edb90e1 commit 0153eef
Showing 1 changed file with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,29 @@ test('Create Pre-Filled If/Then Question', async ({ page }) => {
await page.getByText('Close').click();
})

test('Add Internal Use Form', async ({ page }) => {
await page.goto('https://host.docker.internal/Test_Request_Portal/admin/?a=form_vue#/');
await page.getByRole('link', { name: uniqueText }).click();
await page.getByLabel('Workflow: No Workflow. Users').selectOption('1');
await page.getByRole('button', { name: 'Add Internal-Use' }).click();
await page.getByLabel('Form Name (up to 50').fill('My Internal Form');
await page.getByLabel('Form Description (up to 255').click();
await page.getByLabel('Form Description (up to 255').fill('My Internal Form Description');
await page.getByRole('button', { name: 'Save' }).click();
await expect(page.locator(".internal_forms")).toContainText('My Internal Form');

// Check form is available to the workflow (should this be a separate test?)
await page.getByLabel(uniqueText + ', main form').click();
const page1Promise = page.waitForEvent('popup');
await page.getByRole('link', { name: 'View Workflow' }).click();
const page1 = await page1Promise;
await page1.getByLabel('workflow step: Step 2').click();

// Confirm Form Field drop down contains the new Internal Form
let optionArray = page1.getByLabel('Form Field:');
await expect(page1.getByLabel('Form Field:')).toContainText(uniqueText + ': ' + uniqueText + ' Section');
});

test('Delete Form', async ({ page }) => {
await page.goto('https://host.docker.internal/Test_Request_Portal/admin/?a=form_vue#/');
await page.getByRole('link', { name: uniqueText }).click();
Expand All @@ -88,9 +111,4 @@ test('Delete Form', async ({ page }) => {
await page.getByRole('button', { name: 'Yes' }).click();
await expect(page.locator('#createFormButton')).toContainText('Create Form');
await expect(page.getByRole('link', { name: uniqueText })).not.toBeVisible();
});





});

0 comments on commit 0153eef

Please sign in to comment.