Skip to content

Commit

Permalink
Merge branch 'main' into unmount-video-element
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton authored Sep 20, 2023
2 parents bdabb52 + da140cb commit d615898
Show file tree
Hide file tree
Showing 37 changed files with 758 additions and 156 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/egress-composite-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Egress Composite E2E
on:
pull_request:
types:
- opened
- synchronize
- reopened
paths:
- 'sample-apps/react/egress-composite/**'
- 'packages/client/**'
- 'packages/react-sdk/**'
- 'packages/styling/**'
- 'packages/react-bindings/**'
env:
VITE_STREAM_API_KEY: ${{ vars.EGRESS_STREAM_API_KEY }}
VITE_STREAM_USER_TOKEN: ${{ secrets.EGRESS_USER_TOKEN }}
STREAM_SDK_TEST_APP: ${{ secrets.STREAM_SDK_TEST_APP }}
STREAM_SDK_TEST_ACCOUNT_EMAIL: ${{ secrets.STREAM_SDK_TEST_ACCOUNT_EMAIL }}
STREAM_SDK_TEST_ACCOUNT_PASSWORD: ${{ secrets.STREAM_SDK_TEST_ACCOUNT_PASSWORD }}
STREAM_SDK_TEST_ACCOUNT_OTP_SECRET: ${{ secrets.STREAM_SDK_TEST_ACCOUNT_OTP_SECRET }}

jobs:
test:
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Install dependencies
run: yarn install --immutable

- name: Build packages
env:
NODE_ENV: production
run: yarn build:react:deps

- name: Cache Playwright browsers
uses: actions/cache@v3
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}${{ runner.arch }}-playwright-browsers

- name: Install Playwright browsers if not cached
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install chromium

- name: Install Playwright system dependencies (always)
run: npx playwright install-deps

- name: Run Playwright tests
working-directory: sample-apps/react/egress-composite
run: yarn buddy auth && yarn test:e2e
7 changes: 7 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

### [0.3.20](https://github.com/GetStream/stream-video-js/compare/client0.3.19...client0.3.20) (2023-09-19)


### Features

* Update with new API spec ([#1098](https://github.com/GetStream/stream-video-js/issues/1098)) ([ced372c](https://github.com/GetStream/stream-video-js/commit/ced372ca068086375024d59a977014efcadefef2))

### [0.3.19](https://github.com/GetStream/stream-video-js/compare/client0.3.18...client0.3.19) (2023-09-15)


Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/video-client",
"version": "0.3.19",
"version": "0.3.20",
"packageManager": "[email protected]",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand Down
1 change: 1 addition & 0 deletions packages/client/src/__tests__/server-side/call.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ describe('call API', () => {
response = await call.update({
settings_override: {
recording: {
mode: RecordSettingsRequestModeEnum.AVAILABLE,
audio_only: false,
quality: RecordSettingsRequestQualityEnum._1080P,
mode: RecordSettingsRequestModeEnum.AUTO_ON,

Check warning on line 126 in packages/client/src/__tests__/server-side/call.test.ts

View workflow job for this annotation

GitHub Actions / test-and-build

Duplicate key 'mode'
Expand Down
90 changes: 59 additions & 31 deletions packages/client/src/gen/coordinator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ export interface CallReactionEvent {
type: string;
}
/**
*
* CallRecording represents a recording of a call.
* @export
* @interface CallRecording
*/
Expand Down Expand Up @@ -844,6 +844,62 @@ export interface CallRecording {
*/
url: string;
}
/**
* This event is sent when call recording has failed
* @export
* @interface CallRecordingFailedEvent
*/
export interface CallRecordingFailedEvent {
/**
*
* @type {string}
* @memberof CallRecordingFailedEvent
*/
call_cid: string;
/**
*
* @type {string}
* @memberof CallRecordingFailedEvent
*/
created_at: string;
/**
* The type of event: "call.recording_failed" in this case
* @type {string}
* @memberof CallRecordingFailedEvent
*/
type: string;
}
/**
* This event is sent when call recording is ready
* @export
* @interface CallRecordingReadyEvent
*/
export interface CallRecordingReadyEvent {
/**
*
* @type {string}
* @memberof CallRecordingReadyEvent
*/
call_cid: string;
/**
*
* @type {CallRecording}
* @memberof CallRecordingReadyEvent
*/
call_recording: CallRecording;
/**
*
* @type {string}
* @memberof CallRecordingReadyEvent
*/
created_at: string;
/**
* The type of event: "call.recording_ready" in this case
* @type {string}
* @memberof CallRecordingReadyEvent
*/
type: string;
}
/**
* This event is sent when call recording has started
* @export
Expand Down Expand Up @@ -1487,12 +1543,6 @@ export interface CallSettingsResponse {
* @interface CallStateResponseFields
*/
export interface CallStateResponseFields {
/**
*
* @type {Array<UserResponse>}
* @memberof CallStateResponseFields
*/
blocked_users: Array<UserResponse>;
/**
*
* @type {CallResponse}
Expand Down Expand Up @@ -2227,12 +2277,6 @@ export interface GeofenceSettingsRequest {
* @interface GetCallResponse
*/
export interface GetCallResponse {
/**
*
* @type {Array<UserResponse>}
* @memberof GetCallResponse
*/
blocked_users: Array<UserResponse>;
/**
*
* @type {CallResponse}
Expand Down Expand Up @@ -2369,12 +2413,6 @@ export interface GetOrCreateCallRequest {
* @interface GetOrCreateCallResponse
*/
export interface GetOrCreateCallResponse {
/**
*
* @type {Array<UserResponse>}
* @memberof GetOrCreateCallResponse
*/
blocked_users: Array<UserResponse>;
/**
*
* @type {CallResponse}
Expand Down Expand Up @@ -2611,12 +2649,6 @@ export interface JoinCallRequest {
* @interface JoinCallResponse
*/
export interface JoinCallResponse {
/**
*
* @type {Array<UserResponse>}
* @memberof JoinCallResponse
*/
blocked_users: Array<UserResponse>;
/**
*
* @type {CallResponse}
Expand Down Expand Up @@ -4001,12 +4033,6 @@ export interface UpdateCallRequest {
* @interface UpdateCallResponse
*/
export interface UpdateCallResponse {
/**
*
* @type {Array<UserResponse>}
* @memberof UpdateCallResponse
*/
blocked_users: Array<UserResponse>;
/**
*
* @type {CallResponse}
Expand Down Expand Up @@ -4314,6 +4340,8 @@ export type VideoEvent =
| ({ type: 'call.permission_request' } & PermissionRequestEvent)
| ({ type: 'call.permissions_updated' } & UpdatedCallPermissionsEvent)
| ({ type: 'call.reaction_new' } & CallReactionEvent)
| ({ type: 'call.recording_failed' } & CallRecordingFailedEvent)
| ({ type: 'call.recording_ready' } & CallRecordingReadyEvent)
| ({ type: 'call.recording_started' } & CallRecordingStartedEvent)
| ({ type: 'call.recording_stopped' } & CallRecordingStoppedEvent)
| ({ type: 'call.rejected' } & CallRejectedEvent)
Expand Down
2 changes: 2 additions & 0 deletions packages/client/src/store/CallState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ export class CallState {
'connection.error': undefined,
'connection.ok': undefined,
'health.check': undefined,
'call.recording_failed': undefined,
'call.recording_ready': undefined,
custom: undefined,

// events that update call state:
Expand Down
5 changes: 5 additions & 0 deletions packages/react-bindings/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

### [0.2.21](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-0.2.20...@stream-io/video-react-bindings-0.2.21) (2023-09-19)

### Dependency Updates

* `@stream-io/video-client` updated to version `0.1.0`
### [0.2.20](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-0.2.19...@stream-io/video-react-bindings-0.2.20) (2023-09-15)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/react-bindings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/video-react-bindings",
"version": "0.2.20",
"version": "0.2.21",
"packageManager": "[email protected]",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

### [0.0.18](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.17...@stream-io/video-react-native-sdk-0.0.18) (2023-09-19)

### Dependency Updates

* `@stream-io/video-client` updated to version `0.1.0`
* `@stream-io/video-react-bindings` updated to version `0.2.21`
### [0.0.17](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.16...@stream-io/video-react-native-sdk-0.0.17) (2023-09-18)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/video-react-native-sdk",
"version": "0.0.17",
"version": "0.0.18",
"packageManager": "[email protected]",
"main": "dist/commonjs/index.js",
"module": "dist/module/index.js",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

### [0.3.24](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.3.23...@stream-io/video-react-sdk-0.3.24) (2023-09-19)

### Dependency Updates

* `@stream-io/video-client` updated to version `0.1.0`
* `@stream-io/video-react-bindings` updated to version `0.2.21`
### [0.3.23](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.3.22...@stream-io/video-react-sdk-0.3.23) (2023-09-18)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/video-react-sdk",
"version": "0.3.23",
"version": "0.3.24",
"packageManager": "[email protected]",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export const ParticipantView = forwardRef<HTMLDivElement, ParticipantViewProps>(

return (
<div
data-testid="participant-view"
ref={(element) => {
applyElementToRef(ref, element);
setTrackedElement(element);
Expand Down
3 changes: 3 additions & 0 deletions sample-apps/react/egress-composite/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ dist-ssr
*.sln
*.sw?
.vercel
/test-results/
/playwright-report/
/playwright/.cache/
8 changes: 7 additions & 1 deletion sample-apps/react/egress-composite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"start": "vite",
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
"preview": "vite preview",
"test:e2e": "playwright test",
"buddy": "stream-video-buddy"
},
"dependencies": {
"@stream-io/video-react-sdk": "workspace:^",
Expand All @@ -17,9 +19,13 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@playwright/test": "^1.37.1",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.0.0",
"axios": "^1.5.0",
"nanoid": "^4.0.2",
"stream-video-buddy": "https://github.com/GetStream/stream-video-buddy#1.6.10",
"typescript": "^4.9.5",
"vercel": "^32.1.0",
"vite": "^4.4.9"
Expand Down
42 changes: 42 additions & 0 deletions sample-apps/react/egress-composite/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { defineConfig } from '@playwright/test';

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './tests',
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'list',
// custom path to omit architecture/system from file name (darwin-amd64/darwin-arm64/linux-amd64...)
snapshotPathTemplate: './tests/__screenshots__/{testFilePath}/{arg}{ext}',
expect: {
toHaveScreenshot: {
// to account for CI headless
maxDiffPixelRatio: 0.05,
},
},
use: {
headless: !!process.env.CI,
trace: 'on-first-retry',
viewport: { width: 1920, height: 1080 },
baseURL: 'http://localhost:5173',
// TODO: find out why custom data-test-id does not work
// testIdAttribute: 'data-testid',
},
webServer: [
{
timeout: 10000,
command: 'yarn buddy server --port 4567',
reuseExistingServer: false,
port: 4567,
},
{
timeout: 10000,
command: 'yarn dev',
reuseExistingServer: false,
port: 5173,
},
],
});
Loading

0 comments on commit d615898

Please sign in to comment.