Skip to content

Commit 9345d13

Browse files
committed
All e2e tests passing
1 parent 0649e19 commit 9345d13

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

samples/msal-browser-samples/VanillaJSTestApp2.0/app/multipleResources/auth.js

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function handleResponse(resp) {
2525
if (resp !== null) {
2626
username = resp.account.username;
2727
showWelcomeMessage(resp.account);
28-
getTokenRedirect(tokenRequest, resp.account);
2928
} else {
3029
// need to call getAccount here?
3130
const currentAccounts = myMSALObj.getAllAccounts();
@@ -36,7 +35,6 @@ function handleResponse(resp) {
3635
} else if (currentAccounts.length === 1) {
3736
username = currentAccounts[0].username;
3837
showWelcomeMessage(currentAccounts[0]);
39-
getTokenRedirect(tokenRequest, currentAccounts[0]);
4038
}
4139
}
4240
}

samples/msal-browser-samples/VanillaJSTestApp2.0/app/multipleResources/authConfig.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const msalConfig = {
1212

1313
// Add here scopes for id token to be used at MS Identity Platform endpoints.
1414
const loginRequest = {
15-
scopes: ["User.Read", "https://msidlab0.spoppe.com/user.read"],
15+
scopes: ["User.Read"],
1616
redirectUri: "http://localhost:30662/"
1717
};
1818

samples/msal-browser-samples/VanillaJSTestApp2.0/app/multipleResources/test/multiple_resources.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function enterCredentials(page: puppeteer.Page, testName: string): Promise
4949
await page.click("#idSIButton9");
5050
}
5151

52-
describe.skip("Browser tests", function () {
52+
describe("Browser tests", function () {
5353
this.timeout(0);
5454
this.retries(1);
5555

@@ -81,7 +81,7 @@ describe.skip("Browser tests", function () {
8181
await browser.close();
8282
});
8383

84-
it.skip("Performs loginRedirect and acquires 2 tokens", async () => {
84+
it("Performs loginRedirect and acquires 2 tokens", async () => {
8585
const testName = "multipleResources";
8686
// Home Page
8787
await takeScreenshot(page, testName, `samplePageInit`);
@@ -110,6 +110,6 @@ describe.skip("Browser tests", function () {
110110
await page.waitForSelector("#second-resource-div");
111111
await takeScreenshot(page, testName, `secondToken`);
112112
sessionStorage = await page.evaluate(() => Object.assign({}, window.sessionStorage));
113-
expect(Object.keys(sessionStorage).length).to.be.eq(4);
113+
expect(Object.keys(sessionStorage).length).to.be.eq(5);
114114
});
115115
});

samples/msal-browser-samples/VanillaJSTestApp2.0/e2eTests/testRunner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function runMochaTests(sampleIndex: number) {
5353
app.use(morgan('dev'));
5454

5555
// Set the front-end folder to serve public assets.
56-
app.use("/lib", express.static(path.join(PARENT_DIR, "../../lib/msal-browser/lib")));
56+
app.use("/lib", express.static(path.join(PARENT_DIR, "../../../lib/msal-browser/lib")));
5757

5858
let sampleName = sampleFolders[sampleIndex];
5959
const mocha = createMochaObject(sampleName);

samples/msal-core-samples/VanillaJSTestApp/e2eTests/testRunner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function runMochaTests(sampleIndex: number) {
5353
app.use(morgan('dev'));
5454

5555
// Set the front-end folder to serve public assets.
56-
app.use("/dist", express.static(path.join(PARENT_DIR, "../../lib/msal-core/dist")));
56+
app.use("/dist", express.static(path.join(PARENT_DIR, "../../../lib/msal-core/dist")));
5757

5858
let sampleName = sampleFolders[sampleIndex];
5959
const mocha = createMochaObject(sampleName);

0 commit comments

Comments
 (0)