Cypress: skip tests known to fail when using Rust crypto (#10873)
* Cypress: skip tests known to fail when using Rust crypto ... which means we can then run the cypress test suite against Element Web R to check we aren't introducing regressions. * Update cypress/e2e/register/register.spec.ts * Use env var to detect rust crypto * Hoist `skipIfRustCrypto` call earlier
This commit is contained in:
committed by
GitHub
parent
0c30f0c838
commit
2571f54e8b
@@ -56,5 +56,20 @@ cy.all = function all(commands): Cypress.Chainable {
|
||||
return cy.wrap(resultArray, { log: false });
|
||||
};
|
||||
|
||||
// Needed to make this file a module
|
||||
export {};
|
||||
/**
|
||||
* Check if Cypress has been configured to enable rust crypto, and bail out if so.
|
||||
*/
|
||||
export function skipIfRustCrypto() {
|
||||
if (isRustCryptoEnabled()) {
|
||||
cy.log("Skipping due to rust crypto");
|
||||
//@ts-ignore: 'state' is a secret internal command
|
||||
cy.state("runnable").skip();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if Cypress has been configured to enable rust crypto (by checking the environment variable)
|
||||
*/
|
||||
export function isRustCryptoEnabled(): boolean {
|
||||
return !!Cypress.env("RUST_CRYPTO");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user