Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
test: fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Jun 1, 2021
1 parent 3bcd2d4 commit b3e5128
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 13 additions & 1 deletion cypress/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@ import dotenvPlugin from "cypress-dotenv";
const pluginConfig: Cypress.PluginConfig = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
config = dotenvPlugin(config, {}, true);
config = dotenvPlugin(
config,
{
path: ".env.local",
},
true,
);
config.env = {
...config.env,
...Object.fromEntries(
Object.entries(process.env).filter(([k]) => k.startsWith("REEARTH_WEB_")),
),
};
config.ignoreTestFiles = ["**/examples/**/*", "types.ts"];

on("task", {
Expand Down
3 changes: 2 additions & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ Cypress.Commands.add("waitForGraphQL", () =>

Cypress.Commands.add("cesiumViewer", () => cy.window().then(w => w.REEARTH_E2E_CESIUM_VIEWER));

function oauthDomain(u: string): string {
function oauthDomain(u: string | undefined): string {
if (!u) return u;
if (!u.startsWith("https://") && !u.startsWith("http://")) {
u = "https://" + u;
}
Expand Down

0 comments on commit b3e5128

Please sign in to comment.