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

working tests. #46

Merged
merged 11 commits into from
Jun 5, 2024
Merged
Prev Previous commit
Next Next commit
working allscripts test.
  • Loading branch information
AnalogJ committed Jun 1, 2024
commit 8d6ee9d408df04fe1a68ff063e20d0995edbbbfb
2 changes: 1 addition & 1 deletion js/e2e/src/aetna_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {getEndpointDefinition} from '../utils';
import {generateSourceAuthorizeUrl} from '../../src/connect/authorization-url';

test("Aetna Login Flow", async ({page}) => {

test.skip()
//get the Cerner Sandbox endpoint definition
let endpointDefinition = await getEndpointDefinition('ac8308d1-90de-4994-bb3d-fe404832714c')
let authorizeData = await generateSourceAuthorizeUrl(endpointDefinition)
Expand Down
32 changes: 32 additions & 0 deletions js/e2e/src/allscripts_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { test, expect } from "@playwright/test";
import {getEndpointDefinition} from '../utils';
import {generateSourceAuthorizeUrl} from '../../src/connect/authorization-url';

test("Allscripts Login Flow", async ({page}) => {
test.skip()
//get the Allscripts - Veradigm Sandbox endpoint definition
let endpointDefinition = await getEndpointDefinition('7682675b-8247-4fda-b2cd-048bfeafc8af')
let authorizeData = await generateSourceAuthorizeUrl(endpointDefinition)

// authorizeData.sourceState
console.log(authorizeData.url.toString())

await page.goto(authorizeData.url.toString());

// We are on login page
await page.waitForSelector("text=Allscripts Health Connect Core");
await expect(page).toHaveTitle("Allscripts FHIR Authorization - ");
await page.focus("#username");
await page.keyboard.type("[email protected]");
await page.focus("#passwordEntered");
await page.keyboard.type("Allscripts#1");
await page.click("#local-login");

// We have logged in
await page.waitForSelector("text=Uncheck the permissions you do not wish to grant.");
await expect(page).toHaveTitle("Allscripts FHIR Authorization - ");
await page.click('button[value="yes"]');

// If successful, Fasten Lighthouse page should now be visible
await page.waitForSelector("text=Your account has been securely connected to FASTEN.");
});