Cypress: allow enabling Rust Crypto via env var (#10951)

* Cypress: allow enabling Rust Crypto via env var

* prettify
This commit is contained in:
Richard van der Hoff 2023-05-19 14:55:13 +01:00 committed by GitHub
parent c6f44d3053
commit 3623643248
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View file

@ -37,5 +37,13 @@ const CONFIG_JSON = {
};
beforeEach(() => {
cy.intercept({ method: "GET", pathname: "/config.json" }, { body: CONFIG_JSON });
const configJson = CONFIG_JSON;
// configure element to use rust crypto if the env var tells us so
if (Cypress.env("RUST_CRYPTO")) {
configJson["features"] = {
feature_rust_crypto: true,
};
}
cy.intercept({ method: "GET", pathname: "/config.json" }, { body: configJson });
});