Skip to content

Commit

Permalink
chore(tests): cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bukowa committed Jul 2, 2024
1 parent 186cd91 commit 0f68b62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
8 changes: 4 additions & 4 deletions tests-e2e-js/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {Builder, Capabilities, until, WebDriver} from "selenium-webdriver";
import {afterEach, beforeEach, describe, it, test} from "node:test";
import {ChildProcess} from "node:child_process";
import assert from "node:assert";
import {ChildProcess} from "node:child_process";
import {afterEach, beforeEach, describe, test} from "node:test";
import {Builder, Capabilities, until, WebDriver} from "selenium-webdriver";

import {logger} from "./logger"
import * as setup from "./setup"
import * as webdriver from "./webdriver"
import {E2E_LOG_LEVEL} from "./setup";

logger.debug(setup)

Expand Down
18 changes: 3 additions & 15 deletions tests-e2e-js/src/setup.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
const E2E_LOG_LEVEL = process.env.E2E_LOG_LEVEL?.toLowerCase() || "info"

const E2E_TAURI_BINARY = process.env.E2E_TAURI_BINARY as string

const E2E_WEBDRIVER_BINARY = process.env.E2E_WEBDRIVER_BINARY as string
const E2E_WEBDRIVER_HOST = process.env.SELENIUM_WEBDRIVER_HOST?.toUpperCase() || "127.0.0.1"
const E2E_WEBDRIVER_PORT = process.env.SELENIUM_WEBDRIVER_PORT?.toUpperCase() || "5699"
const E2E_WEBDRIVER_URL = `http://${E2E_WEBDRIVER_HOST}:${E2E_WEBDRIVER_PORT}`


const E2E_WEBDRIVER_BINARY = process.env.E2E_WEBDRIVER_BINARY as string
const E2E_TAURI_BINARY = process.env.E2E_TAURI_BINARY as string

if (!E2E_TAURI_BINARY) {
throw new Error("PATH_RELEASE_BINARY is not set")
}

if (!E2E_WEBDRIVER_BINARY) {
throw new Error("E2E_WEBDRIVER_BINARY is not set")
}

if (E2E_LOG_LEVEL === 'debug') {
process.env.WEBKIT_DEBUG = "all";
}
export {
E2E_TAURI_BINARY,
E2E_WEBDRIVER_BINARY,
Expand Down

0 comments on commit 0f68b62

Please sign in to comment.