replayio / playwright-tests

Playwright harness and tests used by replay CI
BSD 3-Clause "New" or "Revised" License
14 stars 7 forks source link

Import initial qawolf tests #91

Closed jperl closed 3 years ago

jasonLaster commented 3 years ago

This mostly works after adding


diff --git a/qawolf/helpers.js b/qawolf/helpers.js
index 4968e27..cb205e6 100644
--- a/qawolf/helpers.js
+++ b/qawolf/helpers.js
@@ -1,11 +1,12 @@
 const { assertElement, assertText } = require("qawolf");
 const faker = require("faker");
+require("dotenv").config();

-async function launch(
-  { browser: browserName, headless } = { headless: false }
-) {
+async function launch({ headless } = { headless: false }) {
   const playwright = require("@recordreplay/playwright");
-  const browser = await playwright[browserName || "chromium"].launch({
+  let browserName = process.env.PLAYWRIGHT_CHROMIUM ? "chromium" : "firefox";
+
+  const browser = await playwright[browserName].launch({
     headless,
   });
   const context = await browser.newContext();
(END)```
jperl commented 3 years ago

Closing since merged