From 284b082eb86602705519d6ca754c40f6d2f8fcc0 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Mon, 1 Apr 2024 10:23:36 -0400 Subject: Tests: share queue/browser handling for all worker types - one queue to rule them all: browserstack, selenium, and jsdom - retries and hard retries are now supported in selenium - selenium tests now re-use browsers in the same way as browserstack Close gh-5460 --- test/runner/flags/browsers.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/runner/flags/browsers.js (limited to 'test/runner/flags/browsers.js') diff --git a/test/runner/flags/browsers.js b/test/runner/flags/browsers.js new file mode 100644 index 000000000..c15d7085e --- /dev/null +++ b/test/runner/flags/browsers.js @@ -0,0 +1,25 @@ +// This list is static, so no requests are required +// in the command help menu. + +import { getBrowsers } from "../browserstack/api.js"; + +export const browsers = [ + "chrome", + "ie", + "firefox", + "edge", + "safari", + "opera", + "yandex", + "IE Mobile", + "Android Browser", + "Mobile Safari", + "jsdom" +]; + +// A function that can be used to update the above list. +export async function getAvailableBrowsers() { + const browsers = await getBrowsers( { flat: true } ); + const available = [ ...new Set( browsers.map( ( { browser } ) => browser ) ) ]; + return available.concat( "jsdom" ); +} -- cgit v1.2.3