-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first scenario from multi-source scope - viewer projects specified so…
…urceId
- Loading branch information
1 parent
eca0346
commit 8385430
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/millicast-sdk/integration-tests/features/multi-source.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
Feature: Multi-source feature | ||
|
||
Scenario: Publisher streams with specified sourceId and Viewer projects media | ||
Given the "publisher1" opens "Publisher" app | ||
When the "publisher1" starts the stream with the specified options | ||
| codec | h264 | | ||
| sourceId | CAM1 | | ||
And the "publisher1" stream should be LIVE | ||
|
||
When the "viewer1" opens "Viewer" app | ||
And the "viewer1" connected stream should be LIVE | ||
And the "viewer1" projects sourceId "CAM1" | ||
|
||
Then the "viewer1" should be able to view media tracks for the connected stream | ||
|
10 changes: 10 additions & 0 deletions
10
packages/millicast-sdk/integration-tests/src/steps/viewerProject.step.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { When } from "@cucumber/cucumber"; | ||
import { ScenarioWorld } from "cucumber-playwright-framework"; | ||
import { viewerProject } from "../stepsImpl/viewerProject.step.impl"; | ||
|
||
When( | ||
/^the "([^"]*)" projects sourceId "([^"]*)"$/, | ||
async function (this: ScenarioWorld, actor: string, sourceId: string) { | ||
await viewerProject(this, actor, sourceId); | ||
}, | ||
); |
14 changes: 14 additions & 0 deletions
14
packages/millicast-sdk/integration-tests/src/stepsImpl/viewerProject.step.impl.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ScenarioWorld, logger, runStep } from "cucumber-playwright-framework"; | ||
|
||
export async function viewerProject( | ||
scenarioWorld: ScenarioWorld, | ||
actor: string, | ||
sourceId: string, | ||
) { | ||
logger.debug(`viewerProject function was called`); | ||
|
||
await runStep([ | ||
`the ${actor} switch to the "Viewer" app`, | ||
`the ${actor} executes the "window.millicastView.project('${sourceId}', [{'media': 'video'} , {'media': 'audio'}])" JavaScript function on the page`, | ||
], scenarioWorld); | ||
} |