Skip to content

Commit

Permalink
Merge pull request #850 from portier/feat/e2e-deps
Browse files Browse the repository at this point in the history
Update E2E test lockfile
  • Loading branch information
stephank committed Apr 7, 2024
2 parents a60a686 + 732cdc1 commit 0799e25
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 316 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,27 +110,35 @@ jobs:

- name: E2E test deps
run: cd tests/e2e/ && yarn --frozen-lockfile
timeout-minutes: 10

- name: E2E test Firefox
run: cd tests/e2e/ && SELENIUM_BROWSER=firefox ./main.js
timeout-minutes: 10

- name: E2E test Chrome
run: cd tests/e2e/ && SELENIUM_BROWSER=chrome ./main.js
timeout-minutes: 10

- name: E2E test Redis
run: cd tests/e2e/ && TEST_STORE=redis TEST_KEY_MANAGER=rotating ./main.js
timeout-minutes: 10

- name: E2E test SQLite
run: cd tests/e2e/ && TEST_STORE=sqlite TEST_KEY_MANAGER=rotating ./main.js
timeout-minutes: 10

- name: E2E test sendmail
run: cd tests/e2e/ && TEST_MAILER=sendmail ./main.js
timeout-minutes: 10

- name: E2E test Postmark
run: cd tests/e2e/ && TEST_MAILER=postmark ./main.js
timeout-minutes: 10

- name: E2E test Mailgun
run: cd tests/e2e/ && TEST_MAILER=mailgun ./main.js
timeout-minutes: 10

macos-build:
runs-on: macos-latest
Expand Down Expand Up @@ -171,12 +179,13 @@ jobs:

- name: E2E test deps
run: cd tests/e2e/ && yarn --frozen-lockfile
timeout-minutes: 10

- name: E2E test Safari
run: cd tests/e2e/ && SELENIUM_BROWSER=safari ./main.js
timeout-minutes: 10
# TODO: fails sporadically
continue-on-error: true
timeout-minutes: 1

windows-build:
runs-on: windows-latest
Expand Down
5 changes: 3 additions & 2 deletions tests/e2e/src/mailbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { SMTPServer } from "smtp-server";
import { simpleParser } from "mailparser";
import { TEST_MAILER } from "./env";
import type { Stream } from "stream";

const parseOptions = {
skipHtmlToText: true,
Expand All @@ -10,7 +11,7 @@ const parseOptions = {

export interface Mailbox {
pushRawMail(
input: string | NodeJS.ReadableStream,
input: string | Stream,
callback?: (err?: Error | undefined) => void
): void;
pushMail(mail: string): void;
Expand All @@ -28,7 +29,7 @@ export default (): Mailbox => {
// Exported API.
const api: Mailbox = {
pushRawMail(
input: string | NodeJS.ReadableStream,
input: string | Stream,
callback?: (err?: Error) => void
): void {
simpleParser(input, parseOptions as any, (err, parsed) => {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const createDriver = async () => {
const firefoxOptions = new firefox.Options().windowSize(windowSize);
const chromeOptions = new chrome.Options().windowSize(windowSize);
if (HEADLESS === "1") {
firefoxOptions.headless();
chromeOptions.headless();
firefoxOptions.addArguments("-headless");
chromeOptions.addArguments("--headless=new");
}

const builder = new Builder();
Expand Down

0 comments on commit 0799e25

Please sign in to comment.