Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandrpravosudko-okta committed Sep 6, 2022
1 parent 53fc7de commit 15f7676
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 5 additions & 1 deletion test/e2e/specs/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Basic login redirect', () => {

// wait for protected page to appear with contents
await privatePage.waitUntilVisible();

expect(await privatePage.getBodyText()).toContain('sub');

// Default response_type of library should contain an accessToken and idToken
Expand Down Expand Up @@ -91,18 +91,22 @@ describe('Basic login redirect', () => {
// wait for protected page to appear with contents
// NOTE: may see failure here if open redirect occurs (see OKTA-499372)
await privatePage.waitUntilVisible(constants.BASE_URI + path.slice(1)); // leading ‘/’ will be stripped off

expect(await privatePage.getBodyText()).toContain('sub');

// Default response_type of library should contain an accessToken and idToken
expect(await privatePage.getBodyText()).toContain('access_token');
expect(await privatePage.getBodyText()).toContain('id_token');
// navigate to home page
const homePage = new HomePage();
await homePage.load();
await homePage.waitUntilVisible();

expect(await homePage.getBodyText()).toContain('Welcome home');
// navigate to Okta logout and follow redirects
await homePage.performLogout();
await homePage.waitUntilVisible(); // after all redirects

expect(await browser.getPageSource()).not.toContain('Welcome home');
});
});
6 changes: 2 additions & 4 deletions test/unit/callback.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,11 @@ describe('callback', () => {
.expect(401)
.end(function(err, res){
if (err) return reject(err);
expect(res.text).toContain('Unauthorized');
expect(res.text).toContain('Unauthorized'); // original RPError is not propagated by passport-strategy
nock.cleanAll();
nock.abortPendingRequests();
resolve()
});
});
})


});
});

0 comments on commit 15f7676

Please sign in to comment.