Allow call and broadcast PiP at the same time (#9829)
This commit is contained in:
parent
d2763c329d
commit
c257e137aa
6 changed files with 79 additions and 33 deletions
|
@ -24,18 +24,22 @@ import PictureInPictureDragger, {
|
|||
describe("PictureInPictureDragger", () => {
|
||||
let renderResult: RenderResult;
|
||||
|
||||
const mkContent1: CreatePipChildren = () => {
|
||||
return <div>content 1</div>;
|
||||
};
|
||||
const mkContent1: Array<CreatePipChildren> = [
|
||||
() => {
|
||||
return <div>content 1</div>;
|
||||
},
|
||||
];
|
||||
|
||||
const mkContent2: CreatePipChildren = () => {
|
||||
return (
|
||||
<div>
|
||||
content 2<br />
|
||||
content 2.2
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const mkContent2: Array<CreatePipChildren> = [
|
||||
() => {
|
||||
return (
|
||||
<div>
|
||||
content 2<br />
|
||||
content 2.2
|
||||
</div>
|
||||
);
|
||||
},
|
||||
];
|
||||
|
||||
describe("when rendering the dragger with PiP content 1", () => {
|
||||
beforeEach(() => {
|
||||
|
@ -66,4 +70,16 @@ describe("PictureInPictureDragger", () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("when rendering the dragger with PiP content 1 and 2", () => {
|
||||
beforeEach(() => {
|
||||
renderResult = render(
|
||||
<PictureInPictureDragger draggable={true}>{[...mkContent1, ...mkContent2]}</PictureInPictureDragger>,
|
||||
);
|
||||
});
|
||||
|
||||
it("should render both contents", () => {
|
||||
expect(renderResult.container).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -279,9 +279,18 @@ describe("PipView", () => {
|
|||
});
|
||||
|
||||
it("should render the voice broadcast recording PiP", () => {
|
||||
// check for the „Live“ badge
|
||||
// check for the „Live“ badge to be present
|
||||
expect(screen.queryByText("Live")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("and a call it should show both, the call and the recording", async () => {
|
||||
await withCall(async () => {
|
||||
// Broadcast: Check for the „Live“ badge to be present
|
||||
expect(screen.queryByText("Live")).toBeInTheDocument();
|
||||
// Call: Check for the „Fill screen“ button to be present
|
||||
expect(screen.queryByLabelText("Fill screen")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("when there is a voice broadcast playback and pre-recording", () => {
|
||||
|
|
|
@ -1,5 +1,22 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`PictureInPictureDragger when rendering the dragger with PiP content 1 and 2 should render both contents 1`] = `
|
||||
<div>
|
||||
<aside
|
||||
style="transform: translateX(680px) translateY(478px);"
|
||||
>
|
||||
<div>
|
||||
content 1
|
||||
</div>
|
||||
<div>
|
||||
content 2
|
||||
<br />
|
||||
content 2.2
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`PictureInPictureDragger when rendering the dragger with PiP content 1 and rendering PiP content 2 should update the PiP content 1`] = `
|
||||
<div>
|
||||
<aside
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue