PixelStreamingInfrastructure/.github/workflows
hmuurine f58b32cae6
Unit tests for library (#156)
* add unit test coverage reports to gitignore

* add jest dependencies

* add jest config

* add Config unit tests

* add AFKController unit tests

* mock video codecs list

* test for PixelStreaming SettingsChangedEvent

* mock/unmock functions for RTCRtpReceiver

* mock WebSocket

* test for PixelStreaming.connect()

* unit test for disconnect

* unit tests for reconnect

* added eventemitter events in tests

* test that listStreamers is sent on WS connect

* mock RTCPeerConnection and RTCIceCandidate

* test webRtcConnected event

* test RTCPeerConnect close

* fixed variable name for consistency

* check for navigator.getGamepads before calling it

* mock addTransceiver, createAnswer, getTransceivers, setRemoteDescription

* test for receiving a connection offer

* add null checks for peerConnection since it might be null if connectiong closed

* mock addIceCandidate

* test for receiving ICE candidate message

* mock setLocalDescription, getStats

* test for statistics

* test webRtcDisconnected event

* mock RTCDataChannel and RTCDataChannelEvent

* test for dataChannelOpen event

* mock RTCTrackEvent

* mock MediaStream and MediaStreamTrack

* mock video element play()

* test playStream and playStreamRejected events

* mock video readyState

* mock WebRTC data channel send()

* test emitCommand

* test emitUIInteraction

* test emitConsoleCommand

* Jest mock for HTMLMediaElement.play()

* check boolean return value of all emit* commands

* test dataChannelClose event

* added TextEncoder and TextDecoder to Jest globals

* mock datachannel onmessage

* test UE -> browser data channel message

* clarified in test description that we are using a Response message

* extracted commonly used setup steps as util functions

* triggerSdpOffer -> triggerSdpOfferMessage for consistency

* run unit tests as a Github action

* Revert "break one of the tests to test the GH action"

This reverts commit 05f5742cf0.

* run tests only if files changed under Frontend/library

* added unit test run instructions to README.md
2023-03-17 12:41:05 +10:00
..
container-images.yml Update workflow for ss container to point to dockerfile 2023-02-25 21:04:21 +10:00
create-gh-release.yml Smaller bundle size (#117) 2023-02-23 09:53:01 +10:00
publish-library-to-npm.yml Bring Github actions to 5.2 branch (#105) 2023-02-17 18:03:37 +10:00
publish-ui-library-to-npm.yml Decouple UI from the frontend library (#110) 2023-02-22 17:12:12 +10:00
run-library-unit-tests.yml Unit tests for library (#156) 2023-03-17 12:41:05 +10:00