Skip to content

Commit

Permalink
Merge pull request #51 from PiterWeb/main
Browse files Browse the repository at this point in the history
v3.0.1 Remote Controller
  • Loading branch information
PiterWeb authored Jan 26, 2025
2 parents a160e22 + 4e0fb4f commit e895143
Show file tree
Hide file tree
Showing 32 changed files with 7,931 additions and 4,932 deletions.
11 changes: 11 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
version: '3'

tasks:
build-front:
dir: frontend
cmds:
- pnpm install
- pnpm run build
desc: Build the frontend
build:
deps: [build-front]
cmds:
- wails build -platform=windows/amd64,windows/arm64,linux/amd64,linux/arm64
desc: Build the application for all platforms
build-win:
deps: [build-front]
cmds:
- wails build -platform=windows/amd64,windows/arm64
desc: Build the application for Windows
build-linux:
deps: [build-front]
cmds:
- wails build -platform=linux/amd64,linux/arm64
desc: Build the application for Linux
Expand All @@ -24,12 +33,14 @@ tasks:
- powershell.exe -Command { $env:GOOS="js";$env:GOARCH="wasm"; go build -o signal.wasm }
desc: Build the frontend wasm for Windows
dev-all:
deps: [build-front]
cmds:
- wails dev
desc: Run the application in development mode

dev-front:
dir: frontend
deps: [build-front]
cmds:
- pnpm run dev
desc: Run the frontend in development mode
Expand Down
1 change: 0 additions & 1 deletion frontend/build/.lock

This file was deleted.

33 changes: 27 additions & 6 deletions frontend/cypress/e2e/config/basic_conn.cy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
describe("Basic connection", () => {
import * as MockRTC from 'mockrtc';
import * as fs from 'fs';

it("load", () => {
const adminServer = MockRTC.getAdminServer();
adminServer.start().then(() => console.log('WebRTC Admin server started'));

const mockRTC = MockRTC.getRemote({ recordMessages: true, debug: true });

const signalWasmBuffer = fs.readFileSync('../../../static/wasm/signal.wasm');

describe('Basic connection', async () => {
const wasmModule = await WebAssembly.instantiate(signalWasmBuffer);

const signalEncode = wasmModule.instance.exports.signalEncode as <T>(signal: T) => string;
const signalDecode = wasmModule.instance.exports.signalDecode as <T>(signal: string) => T;

await mockRTC.start();

it('load', async () => {
cy.visit('http://localhost:34115/');
cy.wait(1000)
cy.log("hello")
})
cy.wait(1000);
cy.log('hello');

const mockPeer = await mockRTC.buildPeer().thenEcho();

const { offer: mockOffer, setAnswer } = await mockPeer.createOffer();

})
// Start WebRTC connection from the CypressUI
});
});
Loading

0 comments on commit e895143

Please sign in to comment.