Add support for redirecting to external pages after logout (#7905)

* Add support for redirecting to external pages after logout

This is primarily useful for deployments where the account is managed and needs to be logged out in other places too, like an SSO system.

See docs for more information.

* Add e2e test and fix Windows instructions

* Fix performance gathering stats

* use logger
This commit is contained in:
Travis Ralston
2022-03-01 11:06:17 -07:00
committed by GitHub
parent ac36234068
commit a5ce1c9dcb
9 changed files with 152 additions and 16 deletions
+5 -1
View File
@@ -90,6 +90,10 @@ async function runTests() {
// Collecting all performance monitoring data before closing the session
const measurements = await session.page.evaluate(() => {
let measurements;
// Some tests do redirects away from the app, so don't count those sessions.
if (!window.mxPerformanceMonitor) return JSON.stringify([]);
window.mxPerformanceMonitor.addPerformanceDataCallback({
entryNames: [
window.mxPerformanceEntryNames.REGISTER,
@@ -111,7 +115,7 @@ async function runTests() {
performanceEntries = JSON.parse(measurements);
return session.close();
}));
if (performanceEntries) {
if (performanceEntries?.length > 0) {
fs.writeFileSync(`performance-entries.json`, JSON.stringify(performanceEntries));
}
if (failure) {