Skip to content

Commit d9d9407

Browse files
committed
test(e2e): run datachannel serialization tests
1 parent 6ca38d3 commit d9d9407

32 files changed

+9853
-305
lines changed

.github/workflows/browserstack.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "BrowserStack Test"
2+
on: [push, pull_request]
3+
jobs:
4+
ubuntu-job:
5+
name: "BrowserStack Test on Ubuntu"
6+
runs-on: ubuntu-latest # Can be self-hosted runner also
7+
steps:
8+
- name: "BrowserStack Env Setup" # Invokes the setup-env action
9+
uses: browserstack/github-actions/setup-env@master
10+
with:
11+
username: ${{ secrets.BROWSERSTACK_USERNAME }}
12+
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
13+
14+
- name: "BrowserStack Local Tunnel Setup" # Invokes the setup-local action
15+
uses: browserstack/github-actions/setup-local@master
16+
with:
17+
local-testing: start
18+
local-identifier: peerjs-${{ github.run_id }}-${{ github.run_attempt }}
19+
20+
# The next 3 steps are for building the web application to be tested and starting the web server on the runner environment
21+
22+
- name: "Checkout the repository"
23+
uses: actions/checkout@v2
24+
25+
- name: "Building web application to be tested"
26+
run: npm install && npm run build
27+
28+
- name: "Running application under test"
29+
run: npx http-server -p 3000 --cors &
30+
31+
- name: "Running test on BrowserStack" # Invokes the actual test script that would run on BrowserStack browsers
32+
run: npm run e2e:bstack # See sample test script above
33+
env:
34+
BROWSERSTACK_LOCAL_IDENTIFIER: peerjs-${{ github.run_id }}-${{ github.run_attempt }}
35+
36+
- name: "BrowserStackLocal Stop" # Terminating the BrowserStackLocal tunnel connection
37+
uses: browserstack/github-actions/setup-local@master
38+
with:
39+
local-testing: stop

browserstack.err

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[object Object]

e2e/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"env": {
3+
"browser": true
4+
}
5+
}

e2e/alice.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<html>
2+
<head>
3+
<title>Alice</title>
4+
</head>
5+
</html>

e2e/bob.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<html>
2+
<head>
3+
<title>Bob</title>
4+
</head>
5+
</html>

0 commit comments

Comments
 (0)