Skip to content

Commit e895143

Browse files
authored
Merge pull request #51 from PiterWeb/main
v3.0.1 Remote Controller
2 parents a160e22 + 4e0fb4f commit e895143

32 files changed

+7931
-4932
lines changed

Taskfile.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
version: '3'
22

33
tasks:
4+
build-front:
5+
dir: frontend
6+
cmds:
7+
- pnpm install
8+
- pnpm run build
9+
desc: Build the frontend
410
build:
11+
deps: [build-front]
512
cmds:
613
- wails build -platform=windows/amd64,windows/arm64,linux/amd64,linux/arm64
714
desc: Build the application for all platforms
815
build-win:
16+
deps: [build-front]
917
cmds:
1018
- wails build -platform=windows/amd64,windows/arm64
1119
desc: Build the application for Windows
1220
build-linux:
21+
deps: [build-front]
1322
cmds:
1423
- wails build -platform=linux/amd64,linux/arm64
1524
desc: Build the application for Linux
@@ -24,12 +33,14 @@ tasks:
2433
- powershell.exe -Command { $env:GOOS="js";$env:GOARCH="wasm"; go build -o signal.wasm }
2534
desc: Build the frontend wasm for Windows
2635
dev-all:
36+
deps: [build-front]
2737
cmds:
2838
- wails dev
2939
desc: Run the application in development mode
3040

3141
dev-front:
3242
dir: frontend
43+
deps: [build-front]
3344
cmds:
3445
- pnpm run dev
3546
desc: Run the frontend in development mode

frontend/build/.lock

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
1-
describe("Basic connection", () => {
1+
import * as MockRTC from 'mockrtc';
2+
import * as fs from 'fs';
23

3-
it("load", () => {
4+
const adminServer = MockRTC.getAdminServer();
5+
adminServer.start().then(() => console.log('WebRTC Admin server started'));
6+
7+
const mockRTC = MockRTC.getRemote({ recordMessages: true, debug: true });
8+
9+
const signalWasmBuffer = fs.readFileSync('../../../static/wasm/signal.wasm');
10+
11+
describe('Basic connection', async () => {
12+
const wasmModule = await WebAssembly.instantiate(signalWasmBuffer);
13+
14+
const signalEncode = wasmModule.instance.exports.signalEncode as <T>(signal: T) => string;
15+
const signalDecode = wasmModule.instance.exports.signalDecode as <T>(signal: string) => T;
16+
17+
await mockRTC.start();
18+
19+
it('load', async () => {
420
cy.visit('http://localhost:34115/');
5-
cy.wait(1000)
6-
cy.log("hello")
7-
})
21+
cy.wait(1000);
22+
cy.log('hello');
23+
24+
const mockPeer = await mockRTC.buildPeer().thenEcho();
25+
26+
const { offer: mockOffer, setAnswer } = await mockPeer.createOffer();
827

9-
})
28+
// Start WebRTC connection from the CypressUI
29+
});
30+
});

0 commit comments

Comments
 (0)