This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 822
Move Enterprise Erin tests from Puppeteer to Cypress #8569
Merged
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7682816
Move Enterprise Erin tests from Puppeteer to Cypress
t3chguy 371f7c6
delint
t3chguy c953b5d
types
t3chguy 769c483
Fix double space
t3chguy 9d191b2
Better handle logout in Lifecycle
t3chguy 67ea605
Merge branch 'develop' into t3chguy/cypress-sso
t3chguy acf1fba
Merge branch 'develop' into t3chguy/cypress-sso
t3chguy 11b3d25
Fix test by awaiting the network request
t3chguy 92163a7
Improve some logout handlings
t3chguy a349976
Try try try again
t3chguy e4b909b
Delint
t3chguy 01750e7
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into…
t3chguy a511afe
Fix tests
t3chguy 1220a0e
Delint
t3chguy b7f50cf
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into…
t3chguy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
Copyright 2022 The Matrix.org Foundation C.I.C. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
import "./client"; // XXX: without an (any) import here, types break down | ||
import Chainable = Cypress.Chainable; | ||
import AUTWindow = Cypress.AUTWindow; | ||
|
||
declare global { | ||
// eslint-disable-next-line @typescript-eslint/no-namespace | ||
namespace Cypress { | ||
interface Chainable { | ||
/** | ||
* Applies tweaks to the config read from config.json | ||
*/ | ||
tweakConfig(tweaks: Record<string, any>): Chainable<AUTWindow>; | ||
} | ||
} | ||
} | ||
|
||
Cypress.Commands.add("tweakConfig", (tweaks: Record<string, any>): Chainable<AUTWindow> => { | ||
return cy.window().then(win => { | ||
// note: we can't *set* the object because the window version is effectively a pointer. | ||
for (const [k, v] of Object.entries(tweaks)) { | ||
// @ts-ignore - for some reason it's not picking up on global.d.ts types. | ||
win.mxReactSdkConfig[k] = v; | ||
} | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ import "./login"; | |
import "./client"; | ||
import "./settings"; | ||
import "./bot"; | ||
import "./app"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.