Skip to content

Commit 43b4b67

Browse files
committed
Remove Sauce Labs
1 parent c953af5 commit 43b4b67

File tree

4 files changed

+377
-1456
lines changed

4 files changed

+377
-1456
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ jobs:
77
name: Test
88
runs-on: ubuntu-latest
99

10+
container:
11+
image: cypress/browsers:latest
12+
1013
steps:
1114
- uses: actions/checkout@v4
1215

13-
- name: Setup Node
14-
uses: actions/setup-node@v4
15-
with:
16-
node-version: 20
17-
cache: 'yarn'
18-
1916
- name: Install Dependencies
2017
run: yarn install --frozen-lockfile
2118

karma.conf.cjs

Lines changed: 13 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
const config = {
22
basePath: ".",
33

4-
browsers: ["ChromeHeadless"],
4+
browsers: ["ChromiumHeadless", "CustomFirefoxHeadless"],
5+
6+
customLaunchers: {
7+
CustomFirefoxHeadless: {
8+
base: "Firefox",
9+
flags: ["-headless"],
10+
},
11+
},
512

613
frameworks: ["qunit"],
714

@@ -24,113 +31,23 @@ const config = {
2431
webpack: {
2532
mode: "development",
2633
resolve: {
27-
extensions: [".js"]
28-
}
34+
extensions: [".js"],
35+
},
2936
},
3037

3138
client: {
3239
clearContext: false,
3340
qunit: {
34-
showUI: true
35-
}
41+
showUI: true,
42+
},
3643
},
3744

3845
hostname: "0.0.0.0",
3946

4047
captureTimeout: 180000,
4148
browserDisconnectTimeout: 180000,
4249
browserDisconnectTolerance: 3,
43-
browserNoActivityTimeout: 300000
44-
}
45-
46-
if (process.env.CI) {
47-
config.customLaunchers = {
48-
sl_chrome_latest: {
49-
base: "SauceLabs",
50-
browserName: "chrome",
51-
browserVersion: "latest"
52-
},
53-
sl_chrome_latest_i8n: {
54-
base: "SauceLabs",
55-
browserName: "chrome",
56-
browserVersion: "latest",
57-
"goog:chromeOptions": {
58-
args: ["--lang=tr"]
59-
}
60-
},
61-
sl_firefox_65: {
62-
base: "SauceLabs",
63-
browserName: "firefox",
64-
browserVersion: "65.0"
65-
},
66-
67-
// Context:
68-
// https://github.com/karma-runner/karma-sauce-launcher/issues/275
69-
// https://saucelabs.com/blog/update-firefox-tests-before-oct-4-2022
70-
sl_firefox_latest: {
71-
base: "SauceLabs",
72-
browserName: "firefox",
73-
browserVersion: "latest",
74-
"moz:debuggerAddress": true
75-
},
76-
sl_safari_12_1: {
77-
base: "SauceLabs",
78-
browserName: "safari",
79-
platformName: "macOS 10.13",
80-
browserVersion: "12.1"
81-
},
82-
sl_safari_latest_catalina: {
83-
base: "SauceLabs",
84-
browserName: "safari",
85-
platformName: "macOS 10.15",
86-
browserVersion: "latest"
87-
},
88-
sl_safari_latest_big_sur: {
89-
base: "SauceLabs",
90-
browserName: "safari",
91-
platformName: "macOS 11",
92-
browserVersion: "latest"
93-
},
94-
sl_edge_79: {
95-
base: "SauceLabs",
96-
browserName: "microsoftedge",
97-
platformName: "Windows 10",
98-
browserVersion: "79.0"
99-
},
100-
sl_edge_latest: {
101-
base: "SauceLabs",
102-
browserName: "microsoftedge",
103-
platformName: "Windows 10",
104-
browserVersion: "latest"
105-
},
106-
// TODO: migrate to W3C capabilities
107-
sl_ios_latest: {
108-
base: "SauceLabs",
109-
browserName: "safari",
110-
platform: "ios",
111-
device: "iPhone X Simulator",
112-
version: "13.0"
113-
},
114-
// TODO: migrate to W3C capabilities
115-
sl_android_latest: {
116-
base: "SauceLabs",
117-
browserName: "chrome",
118-
platform: "android",
119-
device: "Android GoogleAPI Emulator",
120-
version: "10.0"
121-
}
122-
}
123-
config.browsers = Object.keys(config.customLaunchers)
124-
config.reporters = ["dots", "saucelabs"]
125-
config.sauceLabs = {
126-
testName: "Stimulus Browser Tests",
127-
[atob("dXNlcm5hbWU=")]: atob("c3RpbXVsdXM="),
128-
[atob("YWNjZXNzS2V5")]: atob("NDI2NzMxMzUtYTViYy00ODlhLThlYTktMDY4MmMzYjcyMjRh")
129-
}
130-
131-
function atob(a) {
132-
return Buffer.from(a, "base64").toString()
133-
}
50+
browserNoActivityTimeout: 300000,
13451
}
13552

13653
module.exports = function (karmaConfig) {

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@
4545
"format": "yarn lint --fix"
4646
},
4747
"devDependencies": {
48-
"@rollup/plugin-node-resolve": "^13.0.0",
48+
"@rollup/plugin-node-resolve": "^16.0.1",
4949
"@rollup/plugin-typescript": "^11.1.1",
5050
"@types/qunit": "^2.19.10",
5151
"@types/webpack-env": "^1.14.0",
5252
"@typescript-eslint/eslint-plugin": "^5.59.11",
5353
"@typescript-eslint/parser": "^5.59.11",
54-
"concurrently": "^6.2.1",
54+
"concurrently": "^9.1.2",
5555
"eslint": "^8.43.0",
5656
"eslint-config-prettier": "^8.8.0",
5757
"eslint-plugin-prettier": "^4.2.1",
58-
"karma": "^6.4.2",
58+
"karma": "^6.4.4",
5959
"karma-chrome-launcher": "^3.2.0",
60-
"karma-qunit": "^4.1.2",
61-
"karma-sauce-launcher": "^4.3.6",
60+
"karma-firefox-launcher": "^2.1.3",
61+
"karma-qunit": "^4.2.1",
6262
"karma-webpack": "^4.0.2",
6363
"prettier": "^2.8.8",
6464
"qunit": "^2.20.0",

0 commit comments

Comments
 (0)