1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-05-27 21:00:08 -07:00

remove snapshot tests

This commit is contained in:
Pavlo Buidenkov 2022-05-28 23:34:10 +02:00
parent 5b94b528ae
commit eaab617a60
44 changed files with 43 additions and 18750 deletions

View File

@ -26,5 +26,8 @@
"test/**/__snapshots__": true,
"yarn.lock": true,
"*.{css,sass,scss}.d.ts": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}

View File

@ -1,18 +0,0 @@
import React from 'react';
import renderer from 'react-test-renderer';
import LoadingSharingIcon from './LoadingSharingIcon';
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = renderer.create(
<>
<LoadingSharingIcon
loadingSharingIconType="desktop"
isShownLoadingSharingIcon
/>
</>
);
expect(subject).toMatchSnapshot();
});

View File

@ -1,93 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<div
className="row center-xs top-xs"
style={
Object {
"height": "100%",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className=""
>
<div
className="row center-xs"
style={
Object {
"height": "50px",
"width": "100%",
}
}
>
<div
className="col-xs-8 col-md-4"
>
<div
className="css-9ebb9a"
>
<div
className="css-1nih24x"
/>
<div
className="css-182ruc5"
/>
<div
className="css-fapzgm"
/>
<div
className="css-fqj3wr"
/>
<div
className="css-srr2wk"
/>
<div
className="css-1netspe"
/>
</div>
</div>
</div>
<div
className="row center-xs"
>
<div
className=""
>
<div
className="react-reveal"
style={
Object {
"opacity": undefined,
}
}
>
<span
className="bp3-icon bp3-icon-desktop"
icon="desktop"
>
<svg
data-icon="desktop"
fill="#5C7080"
height={60}
viewBox="0 0 20 20"
width={60}
>
<desc>
desktop
</desc>
<path
d="M19 0H1C.45 0 0 .45 0 1v13c0 .55.45 1 1 1h5.67l-.5 3H5c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1h-1.17l-.5-3H19c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1zm-1 13H2V2h16v11z"
fillRule="evenodd"
/>
</svg>
</span>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -1,396 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<div
className="bp3-card bp3-elevation-4"
>
<div
className="row middle-xs between-xs"
>
<div
className="col-xs-12 col-md-3"
>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<button
className="bp3-button bp3-minimal"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
tabIndex={0}
type="button"
>
<span
className="bp3-button-text"
>
<div
className="row middle-xs"
style={
Object {
"opacity": "0.75",
}
}
>
<div
className="col-xs-4"
>
<img
alt="logo"
height={42}
src="http://localhost/logo192.png"
width={42}
/>
</div>
<div
className="col-xs-8"
>
<h5
className="bp3-heading"
style={
Object {
"marginBottom": "0px",
}
}
>
Deskreen
</h5>
</div>
</div>
</span>
</button>
</span>
</span>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<button
className="bp3-button"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"borderRadius": "100px",
}
}
tabIndex={0}
type="button"
>
<span
className="bp3-button-text"
>
<div
className="row start-xs"
>
<div
className="col-xs"
>
<img
alt="heart"
height={16}
src="red_heart_2764_twemoji_120x120.png"
style={
Object {
"transform": "translateY(2px)",
}
}
width={16}
/>
</div>
<div
className="col-xs"
>
<div
style={
Object {
"transform": "translateY(2px) translateX(-5px)",
"width": "max-content",
}
}
>
<div
className=""
>
Donate
</div>
</div>
</div>
</div>
</span>
</button>
</span>
</span>
</div>
<div
className="col-xs-12 col-md-5"
>
<div
className="row center-xs"
style={
Object {
"height": "42px",
}
}
>
<div
className="row center-xs middle-xs"
style={
Object {
"backgroundColor": "#137CBD",
"borderRadius": "20px",
"height": "100%",
"width": "190px",
}
}
>
<div
className="row center-xs middle-xs"
style={
Object {
"width": "100%",
}
}
>
<button
className="bp3-button bp3-minimal"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"color": "white",
"minWidth": "70px",
"width": "85px",
}
}
type="button"
>
<span
className="bp3-button-text"
>
<div
className="row"
>
<div
className="col-xs"
>
<span
className="bp3-icon bp3-icon-pause"
icon="pause"
>
<svg
data-icon="pause"
fill="white"
height={16}
viewBox="0 0 16 16"
width={16}
>
<desc>
pause
</desc>
<path
d="M6 3H4c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h2c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm6 0h-2c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h2c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1z"
fillRule="evenodd"
/>
</svg>
</span>
</div>
<div
className="col-xs"
>
<div
className="bp3-text-large play-pause-text"
>
Pause
</div>
</div>
</div>
</span>
</button>
<div
className="bp3-divider"
style={
Object {
"borderBottom": "1px solid #ffffffa8",
"borderRight": "1px solid #ffffffa8",
"height": "20px",
}
}
/>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onClick={[Function]}
>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<button
className="bp3-button bp3-minimal"
onBlur={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
tabIndex={0}
type="button"
>
<span
className="bp3-button-text"
>
<span
className="bp3-icon bp3-icon-cog"
icon="cog"
>
<svg
data-icon="cog"
fill="white"
height={16}
viewBox="0 0 16 16"
width={16}
>
<desc>
cog
</desc>
<path
d="M15.19 6.39h-1.85c-.11-.37-.27-.71-.45-1.04l1.36-1.36c.31-.31.31-.82 0-1.13l-1.13-1.13a.803.803 0 00-1.13 0l-1.36 1.36c-.33-.17-.67-.33-1.04-.44V.79c0-.44-.36-.8-.8-.8h-1.6c-.44 0-.8.36-.8.8v1.86c-.39.12-.75.28-1.1.47l-1.3-1.3c-.3-.3-.79-.3-1.09 0L1.82 2.91c-.3.3-.3.79 0 1.09l1.3 1.3c-.2.34-.36.7-.48 1.09H.79c-.44 0-.8.36-.8.8v1.6c0 .44.36.8.8.8h1.85c.11.37.27.71.45 1.04l-1.36 1.36c-.31.31-.31.82 0 1.13l1.13 1.13c.31.31.82.31 1.13 0l1.36-1.36c.33.18.67.33 1.04.44v1.86c0 .44.36.8.8.8h1.6c.44 0 .8-.36.8-.8v-1.86c.39-.12.75-.28 1.1-.47l1.3 1.3c.3.3.79.3 1.09 0l1.09-1.09c.3-.3.3-.79 0-1.09l-1.3-1.3c.19-.35.36-.71.48-1.1h1.85c.44 0 .8-.36.8-.8v-1.6a.816.816 0 00-.81-.79zm-7.2 4.6c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"
fillRule="evenodd"
/>
</svg>
</span>
</span>
</button>
</span>
</span>
</span>
</span>
<div
className="bp3-divider"
style={
Object {
"borderBottom": "1px solid #ffffffa8",
"borderRight": "1px solid #ffffffa8",
"height": "20px",
}
}
/>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<button
className="bp3-button bp3-minimal"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
tabIndex={0}
type="button"
>
<span
className="bp3-button-text"
>
<img
alt="fullscreen-toggle"
height={16}
src="fullscreen_24px.svg"
style={
Object {
"filter": "invert(100%) sepia(100%) saturate(0%) hue-rotate(127deg) brightness(107%) contrast(102%)",
"transform": "scale(1.5) translateY(1px)",
}
}
width={16}
/>
</span>
</button>
</span>
</span>
</div>
</div>
</div>
</div>
<div
className="col-xs-12 col-md-3"
>
<div
className="row end-xs"
>
<div
className="col-xs-12"
>
<label
className="bp3-control bp3-switch bp3-disabled bp3-inline bp3-align-right"
style={
Object {
"marginBottom": "0px",
}
}
>
<input
checked={true}
disabled={true}
onChange={[Function]}
type="checkbox"
/>
<span
className="bp3-control-indicator"
>
<div
className="bp3-control-indicator-child"
>
<div
className="bp3-switch-inner-text"
>
ON
</div>
</div>
<div
className="bp3-control-indicator-child"
>
<div
className="bp3-switch-inner-text"
>
ON
</div>
</div>
</span>
Default Video Player
</label>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -1,26 +0,0 @@
import React from 'react';
import renderer from 'react-test-renderer';
import PlayerControlPanel from '.';
import ScreenSharingSource from '../../features/PeerConnection/ScreenSharingSourceEnum';
import { VideoQuality } from '../../features/VideoAutoQualityOptimizer/VideoQualityEnum';
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = renderer.create(
<>
<PlayerControlPanel
onSwitchChangedCallback={() => {}}
isPlaying
isDefaultPlayerTurnedOn
handleClickFullscreen={() => {}}
handleClickPlayPause={() => {}}
setVideoQuality={() => {}}
selectedVideoQuality={VideoQuality.Q_100_PERCENT}
screenSharingSourceType={ScreenSharingSource.SCREEN}
toaster={undefined}
/>
</>
);
expect(subject).toMatchSnapshot();
});

View File

@ -1,953 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`when getPromptContent is called should match exact snapshot on each step 1`] = `
<div
className="react-reveal"
style={
Object {
"backgroundColor": "rgba(240, 248, 250, 1)",
"boxShadow": "0 0 0 5px #A7B6C2",
"height": "100vh",
"left": 0,
"opacity": undefined,
"position": "absolute",
"top": 0,
"width": "100%",
"zIndex": 10,
}
}
>
<div
className="row bottom-xs"
style={
Object {
"height": "50vh",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className="row center-xs"
style={
Object {
"margin": "0 auto",
"width": "100%",
}
}
>
<div
className="col-xs-12"
style={
Object {
"marginBottom": "50px",
"textAlign": "center",
"width": "100%",
}
}
>
<div
style={
Object {
"width": "100%",
}
}
>
<div
className="row center-xs"
>
<h2
className="bp3-heading bp3-text-muted"
>
Deskreen Screen Viewer
</h2>
</div>
<div
className="row center-xs"
style={
Object {
"margin": "0 auto",
"width": "100%",
}
}
>
<div
className="col-md-6 col-xl-4"
>
<div
className="bp3-card bp3-elevation-3"
style={
Object {
"backgroundColor": "rgba(240, 248, 250, 1)",
"marginBottom": "30px",
}
}
>
<h3
className="bp3-heading"
>
My Device Info:
</h3>
<div
className="bp3-callout"
>
<div
className=""
>
Device Type:
</div>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<div
className=""
style={
Object {
"backgroundColor": "#00f99273",
"borderRadius": "20px",
"fontWeight": 900,
"paddingLeft": "10px",
"paddingRight": "10px",
}
}
tabIndex={0}
>
<div
className=""
>
Device IP:
</div>
</div>
</span>
</span>
<div
className=""
>
Device Browser:
</div>
<div
className=""
>
Device OS:
</div>
</div>
<div
className="bp3-text-muted"
>
These details should match with the ones that you see in alert popup on computer screen, where Deskreen is running
</div>
</div>
</div>
</div>
<div
id="prompt-text"
style={
Object {
"fontSize": "20px",
}
}
>
<h3
className="bp3-heading"
>
Error occurred :(
</h3>
</div>
</div>
</div>
</div>
</div>
<div
className="row top-xs"
id="connecting-screen"
style={
Object {
"height": "50vh",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className=""
>
Error occurred :(
</div>
</div>
</div>
`;
exports[`when getPromptContent is called should match exact snapshot on each step 2`] = `
<div
className="react-reveal"
style={
Object {
"backgroundColor": "rgba(240, 248, 250, 1)",
"boxShadow": "0 0 0 5px #A7B6C2",
"height": "100vh",
"left": 0,
"opacity": undefined,
"position": "absolute",
"top": 0,
"width": "100%",
"zIndex": 10,
}
}
>
<div
className="row bottom-xs"
style={
Object {
"height": "50vh",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className="row center-xs"
style={
Object {
"margin": "0 auto",
"width": "100%",
}
}
>
<div
className="col-xs-12"
style={
Object {
"marginBottom": "50px",
"textAlign": "center",
"width": "100%",
}
}
>
<div
style={
Object {
"width": "100%",
}
}
>
<div
className="row center-xs"
>
<h2
className="bp3-heading bp3-text-muted"
>
Deskreen Screen Viewer
</h2>
</div>
<div
className="row center-xs"
style={
Object {
"margin": "0 auto",
"width": "100%",
}
}
>
<div
className="col-md-6 col-xl-4"
>
<div
className="bp3-card bp3-elevation-3"
style={
Object {
"backgroundColor": "rgba(240, 248, 250, 1)",
"marginBottom": "30px",
}
}
>
<h3
className="bp3-heading"
>
My Device Info:
</h3>
<div
className="bp3-callout"
>
<div
className=""
>
Device Type:
</div>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<div
className=""
style={
Object {
"backgroundColor": "#00f99273",
"borderRadius": "20px",
"fontWeight": 900,
"paddingLeft": "10px",
"paddingRight": "10px",
}
}
tabIndex={0}
>
<div
className=""
>
Device IP:
</div>
</div>
</span>
</span>
<div
className=""
>
Device Browser:
</div>
<div
className=""
>
Device OS:
</div>
</div>
<div
className="bp3-text-muted"
>
These details should match with the ones that you see in alert popup on computer screen, where Deskreen is running
</div>
</div>
</div>
</div>
<div
id="prompt-text"
style={
Object {
"fontSize": "20px",
}
}
>
<h3
className="bp3-heading"
>
Waiting for user to click ALLOW button on screen sharing device...
</h3>
</div>
</div>
</div>
</div>
</div>
<div
className="row top-xs"
id="connecting-screen"
style={
Object {
"height": "50vh",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
id="pulsing-circle-1"
style={
Object {
"backgroundColor": "rgba(43, 149, 214, 0.7)",
"borderRadius": "100%",
"height": "100px",
"left": "0",
"marginLeft": "auto",
"marginRight": "auto",
"position": "absolute",
"right": "0",
"textAlign": "center",
"width": "100px",
"zIndex": 1,
}
}
/>
<div
id="pulsing-circle-2"
style={
Object {
"backgroundColor": "#2B95D6",
"borderRadius": "100%",
"height": "100px",
"left": "0",
"marginLeft": "auto",
"marginRight": "auto",
"position": "absolute",
"right": "0",
"textAlign": "center",
"width": "100px",
"zIndex": 2,
}
}
>
<div
className="row center-xs middle-xs"
style={
Object {
"height": "100%",
"width": "100%",
}
}
>
<div
className=""
>
<span
className="bp3-icon bp3-icon-feed"
icon="feed"
style={
Object {
"transform": "translateX(10px)",
}
}
>
<svg
data-icon="feed"
fill="white"
height={50}
viewBox="0 0 20 20"
width={50}
>
<desc>
feed
</desc>
<path
d="M2.5 15a2.5 2.5 0 000 5 2.5 2.5 0 000-5zm.5-5c-.55 0-1 .45-1 1s.45 1 1 1c2.76 0 5 2.24 5 5 0 .55.45 1 1 1s1-.45 1-1c0-3.87-3.13-7-7-7zM3 0c-.55 0-1 .45-1 1s.45 1 1 1c8.28 0 15 6.72 15 15 0 .55.45 1 1 1s1-.45 1-1C20 7.61 12.39 0 3 0zm0 5c-.55 0-1 .45-1 1s.45 1 1 1c5.52 0 10 4.48 10 10 0 .55.45 1 1 1s1-.45 1-1C15 10.37 9.63 5 3 5z"
fillRule="evenodd"
/>
</svg>
</span>
</div>
</div>
</div>
</div>
</div>
`;
exports[`when getPromptContent is called should match exact snapshot on each step 3`] = `
<div
className="react-reveal"
style={
Object {
"backgroundColor": "rgba(240, 248, 250, 1)",
"boxShadow": "0 0 0 5px #A7B6C2",
"height": "100vh",
"left": 0,
"opacity": undefined,
"position": "absolute",
"top": 0,
"width": "100%",
"zIndex": 10,
}
}
>
<div
className="row bottom-xs"
style={
Object {
"height": "50vh",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className="row center-xs"
style={
Object {
"margin": "0 auto",
"width": "100%",
}
}
>
<div
className="col-xs-12"
style={
Object {
"marginBottom": "50px",
"textAlign": "center",
"width": "100%",
}
}
>
<div
style={
Object {
"width": "100%",
}
}
>
<div
className="row center-xs"
>
<h2
className="bp3-heading bp3-text-muted"
>
Deskreen Screen Viewer
</h2>
</div>
<div
className="row center-xs"
style={
Object {
"margin": "0 auto",
"width": "100%",
}
}
>
<div
className="col-md-6 col-xl-4"
>
<div
className="bp3-card bp3-elevation-3"
style={
Object {
"backgroundColor": "rgba(240, 248, 250, 1)",
"marginBottom": "30px",
}
}
>
<h3
className="bp3-heading"
>
My Device Info:
</h3>
<div
className="bp3-callout"
>
<div
className=""
>
Device Type:
</div>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<div
className=""
style={
Object {
"backgroundColor": "#00f99273",
"borderRadius": "20px",
"fontWeight": 900,
"paddingLeft": "10px",
"paddingRight": "10px",
}
}
tabIndex={0}
>
<div
className=""
>
Device IP:
</div>
</div>
</span>
</span>
<div
className=""
>
Device Browser:
</div>
<div
className=""
>
Device OS:
</div>
</div>
<div
className="bp3-text-muted"
>
These details should match with the ones that you see in alert popup on computer screen, where Deskreen is running
</div>
</div>
</div>
</div>
<div
id="prompt-text"
style={
Object {
"fontSize": "20px",
}
}
>
<h3
className="bp3-heading"
>
Connected!
</h3>
</div>
</div>
</div>
</div>
</div>
<div
className="row top-xs"
id="connecting-screen"
style={
Object {
"height": "50vh",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className="pulse-3-once"
id="pulsing-circle-3"
style={
Object {
"backgroundColor": "#15B371",
"borderRadius": "100%",
"height": "100px",
"left": "0",
"marginLeft": "auto",
"marginRight": "auto",
"position": "absolute",
"right": "0",
"textAlign": "center",
"width": "100px",
}
}
>
<div
className="row center-xs middle-xs"
style={
Object {
"height": "100%",
"width": "100%",
}
}
>
<div
className=""
>
<span
className="bp3-icon bp3-icon-feed"
icon="feed"
style={
Object {
"transform": "translateX(10px)",
}
}
>
<svg
data-icon="feed"
fill="white"
height={50}
viewBox="0 0 20 20"
width={50}
>
<desc>
feed
</desc>
<path
d="M2.5 15a2.5 2.5 0 000 5 2.5 2.5 0 000-5zm.5-5c-.55 0-1 .45-1 1s.45 1 1 1c2.76 0 5 2.24 5 5 0 .55.45 1 1 1s1-.45 1-1c0-3.87-3.13-7-7-7zM3 0c-.55 0-1 .45-1 1s.45 1 1 1c8.28 0 15 6.72 15 15 0 .55.45 1 1 1s1-.45 1-1C20 7.61 12.39 0 3 0zm0 5c-.55 0-1 .45-1 1s.45 1 1 1c5.52 0 10 4.48 10 10 0 .55.45 1 1 1s1-.45 1-1C15 10.37 9.63 5 3 5z"
fillRule="evenodd"
/>
</svg>
</span>
</div>
</div>
</div>
</div>
</div>
`;
exports[`when getPromptContent is called should match exact snapshot on each step 4`] = `
<div
className="react-reveal"
style={
Object {
"backgroundColor": "rgba(240, 248, 250, 1)",
"boxShadow": "0 0 0 5px #A7B6C2",
"height": "100vh",
"left": 0,
"opacity": undefined,
"position": "absolute",
"top": 0,
"width": "100%",
"zIndex": 10,
}
}
>
<div
className="row bottom-xs"
style={
Object {
"height": "50vh",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className="row center-xs"
style={
Object {
"margin": "0 auto",
"width": "100%",
}
}
>
<div
className="col-xs-12"
style={
Object {
"marginBottom": "50px",
"textAlign": "center",
"width": "100%",
}
}
>
<div
style={
Object {
"width": "100%",
}
}
>
<div
className="row center-xs"
>
<h2
className="bp3-heading bp3-text-muted"
>
Deskreen Screen Viewer
</h2>
</div>
<div
className="row center-xs"
style={
Object {
"margin": "0 auto",
"width": "100%",
}
}
>
<div
className="col-md-6 col-xl-4"
>
<div
className="bp3-card bp3-elevation-3"
style={
Object {
"backgroundColor": "rgba(240, 248, 250, 1)",
"marginBottom": "30px",
}
}
>
<h3
className="bp3-heading"
>
My Device Info:
</h3>
<div
className="bp3-callout"
>
<div
className=""
>
Device Type:
</div>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<div
className=""
style={
Object {
"backgroundColor": "#00f99273",
"borderRadius": "20px",
"fontWeight": 900,
"paddingLeft": "10px",
"paddingRight": "10px",
}
}
tabIndex={0}
>
<div
className=""
>
Device IP:
</div>
</div>
</span>
</span>
<div
className=""
>
Device Browser:
</div>
<div
className=""
>
Device OS:
</div>
</div>
<div
className="bp3-text-muted"
>
These details should match with the ones that you see in alert popup on computer screen, where Deskreen is running
</div>
</div>
</div>
</div>
<div
id="prompt-text"
style={
Object {
"fontSize": "20px",
}
}
>
<h3
className="bp3-heading"
>
Waiting for user to select source to share from screen sharing device...
</h3>
</div>
</div>
</div>
</div>
</div>
<div
className="row top-xs"
id="connecting-screen"
style={
Object {
"height": "50vh",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className="row center-xs top-xs"
style={
Object {
"height": "100%",
"marginLeft": "0px",
"marginRight": "0px",
"width": "100%",
}
}
>
<div
className=""
>
<div
className="row center-xs"
style={
Object {
"height": "50px",
"width": "100%",
}
}
>
<div
className="col-xs-8 col-md-4"
>
<div
className="css-9ebb9a"
>
<div
className="css-1nih24x"
/>
<div
className="css-182ruc5"
/>
<div
className="css-fapzgm"
/>
<div
className="css-fqj3wr"
/>
<div
className="css-srr2wk"
/>
<div
className="css-1netspe"
/>
</div>
</div>
</div>
<div
className="row center-xs"
>
<div
className=""
>
<div
className="react-reveal"
style={
Object {
"opacity": undefined,
}
}
>
<span
className="bp3-icon bp3-icon-application"
icon="application"
>
<svg
data-icon="application"
fill="#5C7080"
height={60}
viewBox="0 0 20 20"
width={60}
>
<desc>
application
</desc>
<path
d="M3.5 9h9c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-9c-.28 0-.5.22-.5.5s.22.5.5.5zm0 2h5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-5c-.28 0-.5.22-.5.5s.22.5.5.5zM19 1H1c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1zm-1 16H2V6h16v11zM3.5 13h7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-7c-.28 0-.5.22-.5.5s.22.5.5.5z"
fillRule="evenodd"
/>
</svg>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -1,32 +0,0 @@
import React from 'react';
import renderer from 'react-test-renderer';
import ConnectionPrompts from '.';
jest.useFakeTimers();
const TEST_DEVICE_DETAILS = {
myIP: '',
myOS: '',
myDeviceType: '',
myBrowser: '',
};
describe('when getPromptContent is called', () => {
it('should match exact snapshot on each step', () => {
for (let i = 0; i < 4; ++i) {
const subject = renderer.create(
<>
<ConnectionPrompts
myDeviceDetails={TEST_DEVICE_DETAILS}
isShownTextPrompt
promptStep={i}
connectionIconType="feed"
isShownSpinnerIcon
spinnerIconType="application"
isOpen
/>
</>
);
expect(subject).toMatchSnapshot();
}
});
});

View File

@ -1,3 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `ShallowWrapper {}`;

View File

@ -1,38 +0,0 @@
import React, { Suspense } from 'react';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import MainView from '.';
import { I18nextProvider } from 'react-i18next';
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
// Mock react-i18next
i18n.use(initReactI18next).init({
lng: 'en',
fallbackLng: 'en',
ns: ['common'],
defaultNS: 'common',
resources: {
en: {
common: {},
},
},
debug: false,
});
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = shallow(
<Suspense fallback={<div>loading</div>}>
<I18nextProvider i18n={i18n}>
<MainView />
</I18nextProvider>
</Suspense>
);
expect(subject).toMatchSnapshot();
});

View File

@ -1,451 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<div
style={
Object {
"height": "100vh",
"left": 0,
"position": "absolute",
"top": 0,
"width": "100%",
"zIndex": 1,
}
}
>
<div
className="bp3-card bp3-elevation-4"
>
<div
className="row middle-xs between-xs"
>
<div
className="col-xs-12 col-md-3"
>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<button
className="bp3-button bp3-minimal"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
tabIndex={0}
type="button"
>
<span
className="bp3-button-text"
>
<div
className="row middle-xs"
style={
Object {
"opacity": "0.75",
}
}
>
<div
className="col-xs-4"
>
<img
alt="logo"
height={42}
src="http://localhost/logo192.png"
width={42}
/>
</div>
<div
className="col-xs-8"
>
<h5
className="bp3-heading"
style={
Object {
"marginBottom": "0px",
}
}
>
Deskreen
</h5>
</div>
</div>
</span>
</button>
</span>
</span>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<button
className="bp3-button"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"borderRadius": "100px",
}
}
tabIndex={0}
type="button"
>
<span
className="bp3-button-text"
>
<div
className="row start-xs"
>
<div
className="col-xs"
>
<img
alt="heart"
height={16}
src="red_heart_2764_twemoji_120x120.png"
style={
Object {
"transform": "translateY(2px)",
}
}
width={16}
/>
</div>
<div
className="col-xs"
>
<div
style={
Object {
"transform": "translateY(2px) translateX(-5px)",
"width": "max-content",
}
}
>
<div
className=""
>
Donate
</div>
</div>
</div>
</div>
</span>
</button>
</span>
</span>
</div>
<div
className="col-xs-12 col-md-5"
>
<div
className="row center-xs"
style={
Object {
"height": "42px",
}
}
>
<div
className="row center-xs middle-xs"
style={
Object {
"backgroundColor": "#137CBD",
"borderRadius": "20px",
"height": "100%",
"width": "190px",
}
}
>
<div
className="row center-xs middle-xs"
style={
Object {
"width": "100%",
}
}
>
<button
className="bp3-button bp3-minimal"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"color": "white",
"minWidth": "70px",
"width": "85px",
}
}
type="button"
>
<span
className="bp3-button-text"
>
<div
className="row"
>
<div
className="col-xs"
>
<span
className="bp3-icon bp3-icon-play"
icon="play"
>
<svg
data-icon="play"
fill="white"
height={16}
viewBox="0 0 16 16"
width={16}
>
<desc>
play
</desc>
<path
d="M12 8c0-.35-.19-.64-.46-.82l.01-.02-6-4-.01.02A.969.969 0 005 3c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1 .21 0 .39-.08.54-.18l.01.02 6-4-.01-.02c.27-.18.46-.47.46-.82z"
fillRule="evenodd"
/>
</svg>
</span>
</div>
<div
className="col-xs"
>
<div
className="bp3-text-large play-pause-text"
>
Play
</div>
</div>
</div>
</span>
</button>
<div
className="bp3-divider"
style={
Object {
"borderBottom": "1px solid #ffffffa8",
"borderRight": "1px solid #ffffffa8",
"height": "20px",
}
}
/>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onClick={[Function]}
>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<button
className="bp3-button bp3-minimal"
onBlur={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
tabIndex={0}
type="button"
>
<span
className="bp3-button-text"
>
<span
className="bp3-icon bp3-icon-cog"
icon="cog"
>
<svg
data-icon="cog"
fill="white"
height={16}
viewBox="0 0 16 16"
width={16}
>
<desc>
cog
</desc>
<path
d="M15.19 6.39h-1.85c-.11-.37-.27-.71-.45-1.04l1.36-1.36c.31-.31.31-.82 0-1.13l-1.13-1.13a.803.803 0 00-1.13 0l-1.36 1.36c-.33-.17-.67-.33-1.04-.44V.79c0-.44-.36-.8-.8-.8h-1.6c-.44 0-.8.36-.8.8v1.86c-.39.12-.75.28-1.1.47l-1.3-1.3c-.3-.3-.79-.3-1.09 0L1.82 2.91c-.3.3-.3.79 0 1.09l1.3 1.3c-.2.34-.36.7-.48 1.09H.79c-.44 0-.8.36-.8.8v1.6c0 .44.36.8.8.8h1.85c.11.37.27.71.45 1.04l-1.36 1.36c-.31.31-.31.82 0 1.13l1.13 1.13c.31.31.82.31 1.13 0l1.36-1.36c.33.18.67.33 1.04.44v1.86c0 .44.36.8.8.8h1.6c.44 0 .8-.36.8-.8v-1.86c.39-.12.75-.28 1.1-.47l1.3 1.3c.3.3.79.3 1.09 0l1.09-1.09c.3-.3.3-.79 0-1.09l-1.3-1.3c.19-.35.36-.71.48-1.1h1.85c.44 0 .8-.36.8-.8v-1.6a.816.816 0 00-.81-.79zm-7.2 4.6c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"
fillRule="evenodd"
/>
</svg>
</span>
</span>
</button>
</span>
</span>
</span>
</span>
<div
className="bp3-divider"
style={
Object {
"borderBottom": "1px solid #ffffffa8",
"borderRight": "1px solid #ffffffa8",
"height": "20px",
}
}
/>
<span
className="bp3-popover-wrapper"
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<button
className="bp3-button bp3-minimal"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
tabIndex={0}
type="button"
>
<span
className="bp3-button-text"
>
<img
alt="fullscreen-toggle"
height={16}
src="fullscreen_24px.svg"
style={
Object {
"filter": "invert(100%) sepia(100%) saturate(0%) hue-rotate(127deg) brightness(107%) contrast(102%)",
"transform": "scale(1.5) translateY(1px)",
}
}
width={16}
/>
</span>
</button>
</span>
</span>
</div>
</div>
</div>
</div>
<div
className="col-xs-12 col-md-3"
>
<div
className="row end-xs"
>
<div
className="col-xs-12"
>
<label
className="bp3-control bp3-switch bp3-disabled bp3-inline bp3-align-right"
style={
Object {
"marginBottom": "0px",
}
}
>
<input
checked={false}
disabled={true}
onChange={[Function]}
type="checkbox"
/>
<span
className="bp3-control-indicator"
>
<div
className="bp3-control-indicator-child"
>
<div
className="bp3-switch-inner-text"
>
OFF
</div>
</div>
<div
className="bp3-control-indicator-child"
>
<div
className="bp3-switch-inner-text"
>
OFF
</div>
</div>
</span>
Default Video Player
</label>
</div>
</div>
</div>
</div>
</div>
<div
id="video-container"
style={
Object {
"margin": "0 auto",
"position": "relative",
}
}
>
<div
className="player-wrapper"
id="player-wrapper-id"
style={
Object {
"paddingTop": "56.25%",
"position": "relative",
}
}
>
<div
id="react-player-wrapper-id"
style={
Object {
"backgroundColor": "black",
"height": "100%",
"left": 0,
"position": "absolute",
"top": 0,
"width": "100%",
}
}
/>
</div>
<canvas
id="comparison-canvas"
style={
Object {
"display": "none",
}
}
/>
</div>
</div>
`;

View File

@ -1,27 +0,0 @@
import React from 'react';
import renderer from 'react-test-renderer';
import PlayerView from '.';
import ScreenSharingSource from '../../features/PeerConnection/ScreenSharingSourceEnum';
import { VideoQuality } from '../../features/VideoAutoQualityOptimizer/VideoQualityEnum';
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = renderer.create(
<>
<PlayerView
isWithControls={false}
setIsWithControls={() => {}}
isFullScreenOn={false}
setIsFullScreenOn={() => {}}
handlePlayPause={() => {}}
isPlaying={false}
setVideoQuality={() => {}}
videoQuality={VideoQuality.Q_100_PERCENT}
screenSharingSourceType={ScreenSharingSource.SCREEN}
streamUrl={undefined}
/>
</>
);
expect(subject).toMatchSnapshot();
});

View File

@ -1,3 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `null`;

View File

@ -1,14 +0,0 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { AppContextProvider } from '.';
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = renderer.create(
<>
<AppContextProvider />
</>
);
expect(subject).toMatchSnapshot();
});

View File

@ -1,25 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import AllowConnectionForDeviceAlert from './AllowConnectionForDeviceAlert';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = mount(
<>
<Router>
<AllowConnectionForDeviceAlert
device={{} as Device}
isOpen
onCancel={() => {}}
onConfirm={() => {}}
/>
</Router>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,39 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import ConnectedDevicesListDrawer from './ConnectedDevicesListDrawer';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
jest.mock('electron', () => {
return {
remote: {
getGlobal: (globalName: string) => {
if (globalName === 'connectedDevicesService') {
return {
getDevices: () => [],
};
}
return {};
},
},
};
});
it('should match exact snapshot', () => {
const subject = mount(
<>
<Router>
<ConnectedDevicesListDrawer
isOpen
handleToggle={() => {}}
stepperRef={null}
/>
</Router>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,25 +0,0 @@
import React, { Suspense } from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import SettingsOverlay from './SettingsOverlay';
import { SettingsProvider } from '../../containers/SettingsProvider';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = mount(
<>
<Suspense fallback={<div>Loading... </div>}>
<SettingsProvider>
<Router>
<SettingsOverlay isSettingsOpen handleClose={() => {}} />
</Router>
</SettingsProvider>
</Suspense>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,39 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import ShareAppOrScreenControlGroup from './ShareAppOrScreenControlGroup';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
jest.mock('electron', () => {
return {
remote: {
getGlobal: (globalName: string) => {
if (globalName === 'desktopCapturerSourcesService') {
return {
getScreenSources: () => [],
getAppWindowSources: () => [],
};
}
return {};
},
},
};
});
it('should match exact snapshot', () => {
const subject = mount(
<>
<Router>
<ShareAppOrScreenControlGroup
handleNextEntireScreen={() => {}}
handleNextApplicationWindow={() => {}}
/>
</Router>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,23 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import DeviceConnectedInfoButton from './DeviceConnectedInfoButton';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = mount(
<>
<Router>
<DeviceConnectedInfoButton
device={{} as Device}
onDisconnect={() => {}}
/>
</Router>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,337 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<BrowserRouter>
<Router
history={
Object {
"action": "POP",
"block": [Function],
"createHref": [Function],
"go": [Function],
"goBack": [Function],
"goForward": [Function],
"length": 1,
"listen": [Function],
"location": Object {
"hash": "",
"pathname": "/",
"search": "",
"state": undefined,
},
"push": [Function],
"replace": [Function],
}
}
>
<DeviceConnectedInfoButton
device={Object {}}
onDisconnect={[Function]}
>
<Blueprint3.Popover
boundary="scrollParent"
captureDismiss={false}
content={
<Row>
<div
style={
Object {
"borderRadius": "100px",
"padding": "20px",
}
}
>
<Row
style={
Object {
"margin": "0 px 10px 10px 10px",
}
}
>
<DeviceInfoCallout />
</Row>
<Row>
<Col
xs={12}
>
<Blueprint3.Button
icon="disable"
intent="danger"
onClick={[Function]}
style={
Object {
"borderRadius": "100px",
"width": "100%",
}
}
>
</Blueprint3.Button>
</Col>
</Row>
</div>
</Row>
}
defaultIsOpen={false}
disabled={false}
fill={false}
hasBackdrop={false}
hoverCloseDelay={300}
hoverOpenDelay={150}
inheritDarkTheme={false}
interactionKind="click"
minimal={false}
modifiers={Object {}}
openOnTargetFocus={true}
position="bottom"
targetTagName="span"
transitionDuration={0}
usePortal={true}
wrapperTagName="span"
>
<Manager>
<span
className="bp3-popover-wrapper"
>
<Reference
innerRef={[Function]}
>
<InnerReference
innerRef={[Function]}
setReferenceNode={[Function]}
>
<Blueprint3.ResizeSensor
onResize={[Function]}
>
<span
className="bp3-popover-target"
onClick={[Function]}
>
<Blueprint3.Tooltip
className=""
content={
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
}
hoverCloseDelay={0}
hoverOpenDelay={400}
key=".0"
minimal={false}
position="right"
transitionDuration={100}
>
<Blueprint3.Popover
autoFocus={false}
boundary="scrollParent"
canEscapeKeyClose={false}
captureDismiss={false}
className=""
content={
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
}
defaultIsOpen={false}
disabled={false}
enforceFocus={false}
fill={false}
hasBackdrop={false}
hoverCloseDelay={0}
hoverOpenDelay={400}
inheritDarkTheme={true}
interactionKind="hover-target"
lazy={true}
minimal={false}
modifiers={
Object {
"arrow": Object {
"enabled": true,
},
}
}
openOnTargetFocus={true}
popoverClassName="bp3-tooltip"
position="right"
targetTagName="span"
transitionDuration={100}
usePortal={true}
wrapperTagName="span"
>
<Manager>
<span
className="bp3-popover-wrapper"
>
<Reference
innerRef={[Function]}
>
<InnerReference
innerRef={[Function]}
setReferenceNode={[Function]}
>
<Blueprint3.ResizeSensor
onResize={[Function]}
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<Blueprint3.Button
className=""
id="connected-device-info-stepper-button"
intent="success"
key=".0"
style={
Object {
"borderRadius": "100px",
"height": "10px !important",
"margin": "0 auto",
"position": "relative",
"width": "150px",
}
}
tabIndex={0}
>
<button
className="bp3-button bp3-intent-success"
id="connected-device-info-stepper-button"
onBlur={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"borderRadius": "100px",
"height": "10px !important",
"margin": "0 auto",
"position": "relative",
"width": "150px",
}
}
tabIndex={0}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<span
className="bp3-button-text"
key="text"
>
<Row>
<div
className="row"
>
<Col
xs={1}
>
<div
className="col-xs-1"
>
<Blueprint3.Icon
icon="info-sign"
>
<span
className="bp3-icon bp3-icon-info-sign"
icon="info-sign"
>
<svg
data-icon="info-sign"
height={16}
viewBox="0 0 16 16"
width={16}
>
<desc>
info-sign
</desc>
<path
d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zM7 3h2v2H7V3zm3 10H6v-1h1V7H6V6h3v6h1v1z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
</div>
</Col>
<Col
xs={true}
>
<div
className="col-xs"
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
/>
</Blueprint3.Text>
</div>
</Col>
</div>
</Row>
</span>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</span>
</Blueprint3.ResizeSensor>
</InnerReference>
</Reference>
<Blueprint3.Overlay
autoFocus={false}
backdropClassName="bp3-popover-backdrop"
backdropProps={Object {}}
canEscapeKeyClose={false}
canOutsideClickClose={false}
enforceFocus={false}
hasBackdrop={false}
isOpen={false}
lazy={true}
onClose={[Function]}
transitionDuration={100}
transitionName="bp3-popover"
usePortal={true}
/>
</span>
</Manager>
</Blueprint3.Popover>
</Blueprint3.Tooltip>
</span>
</Blueprint3.ResizeSensor>
</InnerReference>
</Reference>
<Blueprint3.Overlay
autoFocus={true}
backdropClassName="bp3-popover-backdrop"
backdropProps={Object {}}
canEscapeKeyClose={true}
canOutsideClickClose={true}
enforceFocus={true}
hasBackdrop={false}
isOpen={false}
lazy={true}
onClose={[Function]}
transitionDuration={0}
transitionName="bp3-popover"
usePortal={true}
/>
</span>
</Manager>
</Blueprint3.Popover>
</DeviceConnectedInfoButton>
</Router>
</BrowserRouter>
`;

View File

@ -1,39 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import ChooseAppOrScreeenStep from './ChooseAppOrScreeenStep';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
jest.mock('electron', () => {
return {
remote: {
getGlobal: (globalName: string) => {
if (globalName === 'desktopCapturerSourcesService') {
return {
getScreenSources: () => [],
getAppWindowSources: () => [],
};
}
return {};
},
},
};
});
it('should match exact snapshot', () => {
const subject = mount(
<>
<Router>
<ChooseAppOrScreeenStep
handleNextEntireScreen={() => {}}
handleNextApplicationWindow={() => {}}
/>
</Router>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,42 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import ChooseAppOrScreenOverlay from './ChooseAppOrScreenOverlay';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
jest.mock('electron', () => {
return {
remote: {
getGlobal: (globalName: string) => {
if (globalName === 'desktopCapturerSourcesService') {
return {
getScreenSources: () => [],
getAppWindowSources: () => [],
};
}
return {};
},
},
};
});
it('should match exact snapshot', () => {
const subject = mount(
<>
<Router>
<ChooseAppOrScreenOverlay
isEntireScreenToShareChosen
isChooseAppOrScreenOverlayOpen
handleNextEntireScreen={() => {}}
handleNextApplicationWindow={() => {}}
handleClose={() => {}}
/>
</Router>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,823 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<BrowserRouter>
<Router
history={
Object {
"action": "POP",
"block": [Function],
"createHref": [Function],
"go": [Function],
"goBack": [Function],
"goForward": [Function],
"length": 1,
"listen": [Function],
"location": Object {
"hash": "",
"pathname": "/",
"search": "",
"state": undefined,
},
"push": [Function],
"replace": [Function],
}
}
>
<ChooseAppOrScreenOverlay
handleClose={[Function]}
handleNextApplicationWindow={[Function]}
handleNextEntireScreen={[Function]}
isChooseAppOrScreenOverlayOpen={true}
isEntireScreenToShareChosen={true}
>
<Blueprint3.Dialog
autoFocus={true}
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="makeStyles-dialogRoot-1 choose-app-or-screen-dialog"
enforceFocus={true}
hasBackdrop={true}
isOpen={true}
onClose={[Function]}
transitionDuration={0}
usePortal={true}
>
<Blueprint3.Overlay
autoFocus={true}
backdropProps={Object {}}
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="bp3-overlay-scroll-container"
enforceFocus={true}
hasBackdrop={true}
isOpen={true}
lazy={true}
onClose={[Function]}
transitionDuration={0}
transitionName="bp3-overlay"
usePortal={true}
>
<Blueprint3.Portal
container={
<body
class="bp3-overlay-open"
>
<div
class="bp3-portal"
>
<div
class="bp3-overlay bp3-overlay-open bp3-overlay-scroll-container"
>
<div
class="bp3-overlay-backdrop bp3-overlay-appear bp3-overlay-appear-active"
tabindex="0"
/>
<div
class="bp3-dialog-container bp3-overlay-content bp3-overlay-appear bp3-overlay-appear-active"
tabindex="0"
>
<div
class="bp3-dialog makeStyles-dialogRoot-1 choose-app-or-screen-dialog"
>
<div
id="choose-app-or-screen-overlay-container"
style="min-height: 95%;"
>
<div
class="react-reveal"
style="position: fixed; z-index: 99999; width: 90%; padding-top: 0px; padding-left: 15px; padding-right: 15px;"
>
<div
class="bp3-card bp3-elevation-2"
style="padding: 10px; border-radius: 5px; height: 60px; width: 100%;"
>
<div
class="row middle-xs between-xs"
style="width: 100%;"
>
<div
class="col-xs-9"
>
<div>
<h3
class="bp3-heading"
style="margin-bottom: 0px;"
/>
</div>
</div>
<div
class="col-xs-2"
>
<button
class="bp3-button bp3-intent-warning"
style="border-radius: 100px;"
type="button"
>
<span
class="bp3-icon bp3-icon-refresh"
icon="refresh"
>
<svg
data-icon="refresh"
height="16"
viewBox="0 0 16 16"
width="16"
>
<desc>
refresh
</desc>
<path
d="M14.99 6.99c-.55 0-1 .45-1 1 0 3.31-2.69 6-6 6-1.77 0-3.36-.78-4.46-2h1.46c.55 0 1-.45 1-1s-.45-1-1-1h-4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1v-1.74a7.95 7.95 0 006 2.74c4.42 0 8-3.58 8-8 0-.55-.45-1-1-1zm0-7c-.55 0-1 .45-1 1v1.74a7.95 7.95 0 00-6-2.74c-4.42 0-8 3.58-8 8 0 .55.45 1 1 1s1-.45 1-1c0-3.31 2.69-6 6-6 1.77 0 3.36.78 4.46 2h-1.46c-.55 0-1 .45-1 1s.45 1 1 1h4c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1z"
fill-rule="evenodd"
/>
</svg>
</span>
</button>
</div>
<div
class="col-xs-1"
>
<button
class="bp3-button"
id="close-overlay-button"
style="border-radius: 100px; width: 40px; height: 40px;"
type="button"
>
<span
class="bp3-button-text"
>
<span
class="bp3-icon bp3-icon-cross"
icon="cross"
>
<svg
data-icon="cross"
height="30"
viewBox="0 0 20 20"
width="30"
>
<desc>
cross
</desc>
<path
d="M11.41 10l4.29-4.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L10 8.59l-4.29-4.3a1.003 1.003 0 00-1.42 1.42L8.59 10 4.3 14.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71l4.29-4.3 4.29 4.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L11.41 10z"
fill-rule="evenodd"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
</div>
</div>
<div
class="react-reveal"
>
<div
class="bp3-card bp3-elevation-0"
style="position: relative; z-index: 1; height: 100%;"
>
<div
class="row"
>
<div
class="makeStyles-sharePreviewsContainer-4"
>
<div
class="row center-xs around-xs"
style="height: 90%;"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
}
>
<Portal
containerInfo={
<div
class="bp3-portal"
>
<div
class="bp3-overlay bp3-overlay-open bp3-overlay-scroll-container"
>
<div
class="bp3-overlay-backdrop bp3-overlay-appear bp3-overlay-appear-active"
tabindex="0"
/>
<div
class="bp3-dialog-container bp3-overlay-content bp3-overlay-appear bp3-overlay-appear-active"
tabindex="0"
>
<div
class="bp3-dialog makeStyles-dialogRoot-1 choose-app-or-screen-dialog"
>
<div
id="choose-app-or-screen-overlay-container"
style="min-height: 95%;"
>
<div
class="react-reveal"
style="position: fixed; z-index: 99999; width: 90%; padding-top: 0px; padding-left: 15px; padding-right: 15px;"
>
<div
class="bp3-card bp3-elevation-2"
style="padding: 10px; border-radius: 5px; height: 60px; width: 100%;"
>
<div
class="row middle-xs between-xs"
style="width: 100%;"
>
<div
class="col-xs-9"
>
<div>
<h3
class="bp3-heading"
style="margin-bottom: 0px;"
/>
</div>
</div>
<div
class="col-xs-2"
>
<button
class="bp3-button bp3-intent-warning"
style="border-radius: 100px;"
type="button"
>
<span
class="bp3-icon bp3-icon-refresh"
icon="refresh"
>
<svg
data-icon="refresh"
height="16"
viewBox="0 0 16 16"
width="16"
>
<desc>
refresh
</desc>
<path
d="M14.99 6.99c-.55 0-1 .45-1 1 0 3.31-2.69 6-6 6-1.77 0-3.36-.78-4.46-2h1.46c.55 0 1-.45 1-1s-.45-1-1-1h-4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1v-1.74a7.95 7.95 0 006 2.74c4.42 0 8-3.58 8-8 0-.55-.45-1-1-1zm0-7c-.55 0-1 .45-1 1v1.74a7.95 7.95 0 00-6-2.74c-4.42 0-8 3.58-8 8 0 .55.45 1 1 1s1-.45 1-1c0-3.31 2.69-6 6-6 1.77 0 3.36.78 4.46 2h-1.46c-.55 0-1 .45-1 1s.45 1 1 1h4c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1z"
fill-rule="evenodd"
/>
</svg>
</span>
</button>
</div>
<div
class="col-xs-1"
>
<button
class="bp3-button"
id="close-overlay-button"
style="border-radius: 100px; width: 40px; height: 40px;"
type="button"
>
<span
class="bp3-button-text"
>
<span
class="bp3-icon bp3-icon-cross"
icon="cross"
>
<svg
data-icon="cross"
height="30"
viewBox="0 0 20 20"
width="30"
>
<desc>
cross
</desc>
<path
d="M11.41 10l4.29-4.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L10 8.59l-4.29-4.3a1.003 1.003 0 00-1.42 1.42L8.59 10 4.3 14.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71l4.29-4.3 4.29 4.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L11.41 10z"
fill-rule="evenodd"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
</div>
</div>
<div
class="react-reveal"
>
<div
class="bp3-card bp3-elevation-0"
style="position: relative; z-index: 1; height: 100%;"
>
<div
class="row"
>
<div
class="makeStyles-sharePreviewsContainer-4"
>
<div
class="row center-xs around-xs"
style="height: 90%;"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}
>
<TransitionGroup
appear={true}
childFactory={[Function]}
className="bp3-overlay bp3-overlay-open bp3-overlay-scroll-container"
component="div"
onKeyDown={[Function]}
>
<div
className="bp3-overlay bp3-overlay-open bp3-overlay-scroll-container"
onKeyDown={[Function]}
>
<CSSTransition
addEndListener={[Function]}
appear={true}
classNames="bp3-overlay"
in={true}
key=".$__backdrop"
onExited={[Function]}
timeout={0}
>
<Transition
addEndListener={[Function]}
appear={true}
enter={true}
exit={true}
in={true}
mountOnEnter={false}
onEnter={[Function]}
onEntered={[Function]}
onEntering={[Function]}
onExit={[Function]}
onExited={[Function]}
onExiting={[Function]}
timeout={0}
unmountOnExit={false}
>
<div
className="bp3-overlay-backdrop"
onMouseDown={[Function]}
tabIndex={0}
/>
</Transition>
</CSSTransition>
<CSSTransition
addEndListener={[Function]}
appear={true}
classNames="bp3-overlay"
in={true}
key=".$.0"
onExited={[Function]}
timeout={0}
>
<Transition
addEndListener={[Function]}
appear={true}
enter={true}
exit={true}
in={true}
mountOnEnter={false}
onEnter={[Function]}
onEntered={[Function]}
onEntering={[Function]}
onExit={[Function]}
onExited={[Function]}
onExiting={[Function]}
timeout={0}
unmountOnExit={false}
>
<div
className="bp3-dialog-container bp3-overlay-content"
tabIndex={0}
>
<div
className="bp3-dialog makeStyles-dialogRoot-1 choose-app-or-screen-dialog"
>
<div
id="choose-app-or-screen-overlay-container"
style={
Object {
"minHeight": "95%",
}
}
>
<Fade
delay={0}
duration={0}
>
<RevealBase
fraction={0.2}
inEffect={
Object {
"count": 1,
"delay": 0,
"duration": 0,
"forever": undefined,
"make": [Function],
"reverse": undefined,
"style": Object {
"animationFillMode": "both",
},
}
}
outEffect={
Object {
"count": 1,
"delay": 0,
"duration": 0,
"forever": undefined,
"make": [Function],
"reverse": undefined,
"style": Object {
"animationFillMode": "both",
},
}
}
refProp="ref"
>
<div
className="react-reveal"
style={
Object {
"opacity": undefined,
"paddingLeft": "15px",
"paddingRight": "15px",
"paddingTop": "0px",
"position": "fixed",
"width": "90%",
"zIndex": 99999,
}
}
>
<Blueprint3.Card
elevation={2}
interactive={false}
style={
Object {
"borderRadius": "5px",
"height": "60px",
"padding": "10px",
"width": "100%",
}
}
>
<div
className="bp3-card bp3-elevation-2"
style={
Object {
"borderRadius": "5px",
"height": "60px",
"padding": "10px",
"width": "100%",
}
}
>
<Row
between="xs"
middle="xs"
style={
Object {
"width": "100%",
}
}
>
<div
className="row middle-xs between-xs"
style={
Object {
"width": "100%",
}
}
>
<Col
xs={9}
>
<div
className="col-xs-9"
>
<div>
<Component
style={
Object {
"marginBottom": "0px",
}
}
>
<h3
className="bp3-heading"
style={
Object {
"marginBottom": "0px",
}
}
/>
</Component>
</div>
</div>
</Col>
<Col
xs={2}
>
<div
className="col-xs-2"
>
<Blueprint3.Button
icon="refresh"
intent="warning"
onClick={[Function]}
style={
Object {
"borderRadius": "100px",
"width": "max-content",
}
}
>
<button
className="bp3-button bp3-intent-warning"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"borderRadius": "100px",
"width": "max-content",
}
}
type="button"
>
<Blueprint3.Icon
icon="refresh"
key="leftIcon"
>
<span
className="bp3-icon bp3-icon-refresh"
icon="refresh"
>
<svg
data-icon="refresh"
height={16}
viewBox="0 0 16 16"
width={16}
>
<desc>
refresh
</desc>
<path
d="M14.99 6.99c-.55 0-1 .45-1 1 0 3.31-2.69 6-6 6-1.77 0-3.36-.78-4.46-2h1.46c.55 0 1-.45 1-1s-.45-1-1-1h-4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1v-1.74a7.95 7.95 0 006 2.74c4.42 0 8-3.58 8-8 0-.55-.45-1-1-1zm0-7c-.55 0-1 .45-1 1v1.74a7.95 7.95 0 00-6-2.74c-4.42 0-8 3.58-8 8 0 .55.45 1 1 1s1-.45 1-1c0-3.31 2.69-6 6-6 1.77 0 3.36.78 4.46 2h-1.46c-.55 0-1 .45-1 1s.45 1 1 1h4c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</div>
</Col>
<Col
xs={1}
>
<div
className="col-xs-1"
>
<CloseOverlayButton
onClick={[Function]}
style={
Object {
"borderRadius": "100px",
"height": "40px",
"width": "40px",
}
}
>
<Blueprint3.Button
className=""
id="close-overlay-button"
onClick={[Function]}
style={
Object {
"borderRadius": "100px",
"height": "40px",
"width": "40px",
}
}
>
<button
className="bp3-button"
id="close-overlay-button"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"borderRadius": "100px",
"height": "40px",
"width": "40px",
}
}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<span
className="bp3-button-text"
key="text"
>
<Blueprint3.Icon
icon="cross"
iconSize={30}
>
<span
className="bp3-icon bp3-icon-cross"
icon="cross"
>
<svg
data-icon="cross"
height={30}
viewBox="0 0 20 20"
width={30}
>
<desc>
cross
</desc>
<path
d="M11.41 10l4.29-4.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L10 8.59l-4.29-4.3a1.003 1.003 0 00-1.42 1.42L8.59 10 4.3 14.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71l4.29-4.3 4.29 4.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L11.41 10z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
</span>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</CloseOverlayButton>
</div>
</Col>
</div>
</Row>
</div>
</Blueprint3.Card>
</div>
</RevealBase>
</Fade>
<Zoom
duration={0}
style={
Object {
"position": "relative",
"zIndex": "1",
}
}
>
<RevealBase
fraction={0.2}
inEffect={
Object {
"count": 1,
"delay": 0,
"duration": 0,
"forever": undefined,
"make": [Function],
"reverse": undefined,
"style": Object {
"animationFillMode": "both",
},
}
}
outEffect={
Object {
"count": 1,
"delay": 0,
"duration": 0,
"forever": undefined,
"make": [Function],
"reverse": undefined,
"style": Object {
"animationFillMode": "both",
},
}
}
refProp="ref"
style={
Object {
"position": "relative",
"zIndex": "1",
}
}
>
<div
className="react-reveal"
style={
Object {
"opacity": undefined,
}
}
>
<Blueprint3.Card
elevation={0}
interactive={false}
style={
Object {
"height": "100%",
"position": "relative",
"zIndex": 1,
}
}
>
<div
className="bp3-card bp3-elevation-0"
style={
Object {
"height": "100%",
"position": "relative",
"zIndex": 1,
}
}
>
<Row>
<div
className="row"
>
<div
className="makeStyles-sharePreviewsContainer-4"
>
<PreviewGridList
handleNextApplicationWindow={[Function]}
handleNextEntireScreen={[Function]}
isEntireScreen={true}
viewSharingObjectsMap={Map {}}
>
<Row
around="xs"
center="xs"
style={
Object {
"height": "90%",
}
}
>
<div
className="row center-xs around-xs"
style={
Object {
"height": "90%",
}
}
/>
</Row>
</PreviewGridList>
</div>
</div>
</Row>
</div>
</Blueprint3.Card>
</div>
</RevealBase>
</Zoom>
</div>
</div>
</div>
</Transition>
</CSSTransition>
</div>
</TransitionGroup>
</Portal>
</Blueprint3.Portal>
</Blueprint3.Overlay>
</Blueprint3.Dialog>
</ChooseAppOrScreenOverlay>
</Router>
</BrowserRouter>
`;

View File

@ -1,20 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import ConfirmStep from './ConfirmStep';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
it('should match exact snapshot', () => {
const subject = mount(
<>
<Router>
<ConfirmStep device={{} as Device} />
</Router>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,6 +1,5 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import IntermediateStep from './IntermediateStep';
@ -10,6 +9,9 @@ jest.useFakeTimers();
jest.mock('electron', () => {
return {
ipcRenderer: {
invoke: jest.fn(),
},
remote: {
getGlobal: (globalName: string) => {
if (globalName === 'desktopCapturerSourcesService') {
@ -18,6 +20,14 @@ jest.mock('electron', () => {
getAppWindowSources: () => [],
};
}
if (globalName === 'sharingSessionService') {
return {
waitingForConnectionSharingSession: {
callPeer: jest.fn(),
},
changeSharingSessionStatusToSharing: jest.fn(),
};
}
return {};
},
},
@ -61,17 +71,6 @@ function setup(
};
}
it('should match exact snapshot on each step', () => {
for (let testActiveStep = 0; testActiveStep < 3; testActiveStep += 1) {
const { component } = setup(
testActiveStep,
() => {},
() => {}
);
expect(EnzymeToJson(component)).toMatchSnapshot();
}
});
it('should call resetPendingConnectionDevice when Confirm button clicked on confirm step', async () => {
const confirmStepNumber = 2;
const mockResetPendingConnectionDeviceCallback = jest.fn();

View File

@ -25,12 +25,6 @@ describe('<ScanQRStep />', () => {
jest.clearAllMocks();
});
describe('when rendered', () => {
it('should match exact snapshot', () => {
expect(EnzymeToJson(wrapper)).toMatchSnapshot();
});
});
describe('when user clicks on magnify QR code button', () => {
it('should set "QR Code Dialog Root" isOpen property to "true"', () => {
// @ts-ignore

View File

@ -1,49 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import SuccessStep from './SuccessStep';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
const connectNewDeviceButtonSelector = 'button.bp3-button.bp3-intent-primary';
function setup(handleResetMock = () => {}) {
const getWrapper = () =>
mount(
<>
<Router>
<SuccessStep handleReset={handleResetMock} />
</Router>
</>
);
const component = getWrapper();
const buttons = {
connectNewDeviceButton: component.find(connectNewDeviceButtonSelector),
};
return {
component,
buttons,
};
}
it('should match exact snapshot', () => {
const { component } = setup();
expect(EnzymeToJson(component)).toMatchSnapshot();
});
describe('when "Connect New Device" button is clicked', () => {
it('should call handleReset injected functional property', () => {
const mockHandleResetCallback = jest.fn();
const { buttons } = setup(mockHandleResetCallback);
buttons.connectNewDeviceButton.simulate('click');
expect(mockHandleResetCallback).toBeCalled();
});
});

View File

@ -1,307 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<BrowserRouter>
<Router
history={
Object {
"action": "POP",
"block": [Function],
"createHref": [Function],
"go": [Function],
"goBack": [Function],
"goForward": [Function],
"length": 1,
"listen": [Function],
"location": Object {
"hash": "",
"pathname": "/",
"search": "",
"state": undefined,
},
"push": [Function],
"replace": [Function],
}
}
>
<ChooseAppOrScreeenStep
handleNextApplicationWindow={[Function]}
handleNextEntireScreen={[Function]}
>
<Row
style={
Object {
"width": "100%",
}
}
>
<div
className="row"
style={
Object {
"width": "100%",
}
}
>
<Col
xs={12}
>
<div
className="col-xs-12"
>
<Row
center="xs"
>
<div
className="row center-xs"
>
<Col
xs={6}
>
<div
className="col-xs-6"
>
<Row
center="xs"
>
<div
className="row center-xs"
>
<Col>
<div
className=""
>
<ShareAppOrScreenControlGroup
handleNextApplicationWindow={[Function]}
handleNextEntireScreen={[Function]}
>
<Blueprint3.ControlGroup
className="makeStyles-controlGroupRoot-1"
fill={true}
id="share-screen-or-app-btn-group"
style={
Object {
"width": "380px",
}
}
vertical={false}
>
<div
className="bp3-control-group bp3-fill makeStyles-controlGroupRoot-1"
id="share-screen-or-app-btn-group"
style={
Object {
"width": "380px",
}
}
>
<Blueprint3.Button
className="makeStyles-shareEntireScreenButton-2"
intent="primary"
onClick={[Function]}
>
<button
className="bp3-button bp3-intent-primary makeStyles-shareEntireScreenButton-2"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<span
className="bp3-button-text"
key="text"
>
<Blueprint3.Icon
className="makeStyles-shareEntireScreenButtonIcon-3"
color="white"
icon="desktop"
iconSize={100}
>
<span
className="bp3-icon bp3-icon-desktop makeStyles-shareEntireScreenButtonIcon-3"
icon="desktop"
>
<svg
data-icon="desktop"
fill="white"
height={100}
viewBox="0 0 20 20"
width={100}
>
<desc>
desktop
</desc>
<path
d="M19 0H1C.45 0 0 .45 0 1v13c0 .55.45 1 1 1h5.67l-.5 3H5c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1h-1.17l-.5-3H19c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1zm-1 13H2V2h16v11z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<Blueprint3.Text
className="bp3-running-text"
ellipsize={false}
tagName="div"
>
<div
className="bp3-running-text"
/>
</Blueprint3.Text>
</span>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
<Blueprint3.Button
className="makeStyles-shareAppButton-4"
intent="primary"
onClick={[Function]}
>
<button
className="bp3-button bp3-intent-primary makeStyles-shareAppButton-4"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<span
className="bp3-button-text"
key="text"
>
<Blueprint3.Icon
className="makeStyles-shareAppButtonIcon-5"
color="white"
icon="application"
iconSize={100}
>
<span
className="bp3-icon bp3-icon-application makeStyles-shareAppButtonIcon-5"
icon="application"
>
<svg
data-icon="application"
fill="white"
height={100}
viewBox="0 0 20 20"
width={100}
>
<desc>
application
</desc>
<path
d="M3.5 9h9c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-9c-.28 0-.5.22-.5.5s.22.5.5.5zm0 2h5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-5c-.28 0-.5.22-.5.5s.22.5.5.5zM19 1H1c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1zm-1 16H2V6h16v11zM3.5 13h7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-7c-.28 0-.5.22-.5.5s.22.5.5.5z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<Blueprint3.Text
className="bp3-running-text"
ellipsize={false}
tagName="div"
>
<div
className="bp3-running-text"
/>
</Blueprint3.Text>
</span>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
<Blueprint3.Button
active={true}
className="makeStyles-orDecorationButton-6"
style={
Object {
"zIndex": 999,
}
}
>
<button
className="bp3-button bp3-active makeStyles-orDecorationButton-6"
onBlur={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"zIndex": 999,
}
}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</div>
</Blueprint3.ControlGroup>
<ChooseAppOrScreenOverlay
handleClose={[Function]}
handleNextApplicationWindow={[Function]}
handleNextEntireScreen={[Function]}
isChooseAppOrScreenOverlayOpen={false}
isEntireScreenToShareChosen={false}
>
<Blueprint3.Dialog
autoFocus={true}
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="makeStyles-dialogRoot-7 choose-app-or-screen-dialog"
enforceFocus={true}
hasBackdrop={true}
isOpen={false}
onClose={[Function]}
transitionDuration={0}
usePortal={true}
>
<Blueprint3.Overlay
autoFocus={true}
backdropProps={Object {}}
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="bp3-overlay-scroll-container"
enforceFocus={true}
hasBackdrop={true}
isOpen={false}
lazy={true}
onClose={[Function]}
transitionDuration={0}
transitionName="bp3-overlay"
usePortal={true}
/>
</Blueprint3.Dialog>
</ChooseAppOrScreenOverlay>
</ShareAppOrScreenControlGroup>
</div>
</Col>
</div>
</Row>
</div>
</Col>
</div>
</Row>
</div>
</Col>
</div>
</Row>
</ChooseAppOrScreeenStep>
</Router>
</BrowserRouter>
`;

View File

@ -1,516 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<BrowserRouter>
<Router
history={
Object {
"action": "POP",
"block": [Function],
"createHref": [Function],
"go": [Function],
"goBack": [Function],
"goForward": [Function],
"length": 1,
"listen": [Function],
"location": Object {
"hash": "",
"pathname": "/",
"search": "",
"state": undefined,
},
"push": [Function],
"replace": [Function],
}
}
>
<ConfirmStep
device={Object {}}
>
<div
style={
Object {
"marginTop": "50px",
"width": "80%",
}
}
>
<Row
style={
Object {
"marginBottom": "10px",
}
}
>
<div
className="row"
style={
Object {
"marginBottom": "10px",
}
}
>
<Col
style={
Object {
"textAlign": "center",
}
}
xs={12}
>
<div
className="col-xs-12"
style={
Object {
"textAlign": "center",
}
}
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
/>
</Blueprint3.Text>
</div>
</Col>
</div>
</Row>
<Row
center="xs"
middle="xs"
>
<div
className="row center-xs middle-xs"
>
<Col
xs={5}
>
<div
className="col-xs-5"
>
<DeviceInfoCallout>
<Component
style={
Object {
"margin": "0 auto",
"textAlign": "center",
}
}
>
<h4
className="bp3-heading"
style={
Object {
"margin": "0 auto",
"textAlign": "center",
}
}
>
:
</h4>
</Component>
<Blueprint3.Callout
id="device-info-callout"
style={
Object {
"borderRadius": "8px",
}
}
>
<div
className="bp3-callout"
id="device-info-callout"
style={
Object {
"borderRadius": "8px",
}
}
>
<Row
center="xs"
>
<div
className="row center-xs"
>
<Col
xs={12}
>
<div
className="col-xs-12"
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
>
:
<span />
</div>
</Blueprint3.Text>
<Blueprint3.Tooltip
content={
<React.Fragment>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
<span
style={
Object {
"fontWeight": 900,
}
}
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
</span>
</React.Fragment>
}
hoverCloseDelay={0}
hoverOpenDelay={100}
minimal={false}
position="top"
transitionDuration={100}
>
<Blueprint3.Popover
autoFocus={false}
boundary="scrollParent"
canEscapeKeyClose={false}
captureDismiss={false}
content={
<React.Fragment>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
<span
style={
Object {
"fontWeight": 900,
}
}
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
</span>
</React.Fragment>
}
defaultIsOpen={false}
disabled={false}
enforceFocus={false}
fill={false}
hasBackdrop={false}
hoverCloseDelay={0}
hoverOpenDelay={100}
inheritDarkTheme={true}
interactionKind="hover-target"
lazy={true}
minimal={false}
modifiers={
Object {
"arrow": Object {
"enabled": true,
},
}
}
openOnTargetFocus={true}
popoverClassName="bp3-tooltip"
position="top"
targetTagName="span"
transitionDuration={100}
usePortal={true}
wrapperTagName="span"
>
<Manager>
<span
className="bp3-popover-wrapper"
>
<Reference
innerRef={[Function]}
>
<InnerReference
innerRef={[Function]}
setReferenceNode={[Function]}
>
<Blueprint3.ResizeSensor
onResize={[Function]}
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<div
className=""
key=".0"
style={
Object {
"backgroundColor": "#00f99273",
"borderRadius": "20px",
"fontWeight": 900,
"paddingLeft": "10px",
"paddingRight": "10px",
}
}
tabIndex={0}
>
<Blueprint3.Text
className="bp3-text-large"
ellipsize={false}
tagName="div"
>
<div
className="bp3-text-large"
>
:
<span
className="device-ip-span"
/>
</div>
</Blueprint3.Text>
</div>
</span>
</Blueprint3.ResizeSensor>
</InnerReference>
</Reference>
<Blueprint3.Overlay
autoFocus={false}
backdropClassName="bp3-popover-backdrop"
backdropProps={Object {}}
canEscapeKeyClose={false}
canOutsideClickClose={false}
enforceFocus={false}
hasBackdrop={false}
isOpen={false}
lazy={true}
onClose={[Function]}
transitionDuration={100}
transitionName="bp3-popover"
usePortal={true}
/>
</span>
</Manager>
</Blueprint3.Popover>
</Blueprint3.Tooltip>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
>
:
<span />
</div>
</Blueprint3.Text>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
>
:
<span />
</div>
</Blueprint3.Text>
<div
style={
Object {
"margin": "0 auto",
"width": "200px",
}
}
>
<Blueprint3.Text
className="bp3-text-muted"
ellipsize={true}
tagName="div"
>
<div
className="bp3-text-overflow-ellipsis bp3-text-muted"
>
:
<span />
</div>
</Blueprint3.Text>
</div>
</div>
</Col>
</div>
</Row>
</div>
</Blueprint3.Callout>
</DeviceInfoCallout>
</div>
</Col>
<Col
xs={5}
>
<div
className="col-xs-5"
>
<SharingSourcePreviewCard>
<Blueprint3.Card
className="preview-share-thumb-container"
elevation={0}
interactive={false}
onClick={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
onMouseOver={[Function]}
style={
Object {
"backgroundColor": "rgba(0,0,0,0.0)",
"height": "200px",
"minWidth": "250px",
}
}
>
<div
className="bp3-card bp3-elevation-0 preview-share-thumb-container"
onClick={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
onMouseOver={[Function]}
style={
Object {
"backgroundColor": "rgba(0,0,0,0.0)",
"height": "200px",
"minWidth": "250px",
}
}
>
<Row
center="xs"
middle="xs"
style={
Object {
"height": "95%",
"minWidth": "200px",
}
}
>
<div
className="row center-xs middle-xs"
style={
Object {
"height": "95%",
"minWidth": "200px",
}
}
>
<Col
xs={12}
>
<div
className="col-xs-12"
>
<Blueprint3.Spinner
size={60}
>
<div
className="bp3-spinner"
>
<div
className="bp3-spinner-animation"
>
<svg
height={60}
strokeWidth="6.67"
viewBox="1.67 1.67 96.67 96.67"
width={60}
>
<path
className="bp3-spinner-track"
d="M 50,50 m 0,-45 a 45,45 0 1 1 0,90 a 45,45 0 1 1 0,-90"
/>
<path
className="bp3-spinner-head"
d="M 50,50 m 0,-45 a 45,45 0 1 1 0,90 a 45,45 0 1 1 0,-90"
pathLength={280}
strokeDasharray="280 280"
strokeDashoffset={210}
/>
</svg>
</div>
</div>
</Blueprint3.Spinner>
</div>
</Col>
</div>
</Row>
<Row
center="xs"
>
<div
className="row center-xs"
>
<Col
style={
Object {
"backgroundColor": "rgba(0,0,0,0.45)",
"color": "white",
"textAlign": "center",
}
}
xs={12}
>
<div
className="col-xs-12"
style={
Object {
"backgroundColor": "rgba(0,0,0,0.45)",
"color": "white",
"textAlign": "center",
}
}
>
<Blueprint3.Text
ellipsize={true}
tagName="div"
>
<div
className="bp3-text-overflow-ellipsis"
/>
</Blueprint3.Text>
</div>
</Col>
</div>
</Row>
</div>
</Blueprint3.Card>
</SharingSourcePreviewCard>
</div>
</Col>
</div>
</Row>
</div>
</ConfirmStep>
</Router>
</BrowserRouter>
`;

View File

@ -1,210 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<BrowserRouter>
<Router
history={
Object {
"action": "POP",
"block": [Function],
"createHref": [Function],
"go": [Function],
"goBack": [Function],
"goForward": [Function],
"length": 1,
"listen": [Function],
"location": Object {
"hash": "",
"pathname": "/",
"search": "",
"state": undefined,
},
"push": [Function],
"replace": [Function],
}
}
>
<SuccessStep
handleReset={[Function]}
>
<Col
md={6}
style={
Object {
"display": "flex",
"flexDirection": "column",
"justifyContent": "center",
}
}
xs={8}
>
<div
className="col-xs-8 col-md-6"
style={
Object {
"display": "flex",
"flexDirection": "column",
"justifyContent": "center",
}
}
>
<Row
center="xs"
>
<div
className="row center-xs"
>
<Col
xs={12}
>
<div
className="col-xs-12"
>
<Blueprint3.Icon
color="#0F9960"
icon="endorsed"
iconSize={35}
>
<span
className="bp3-icon bp3-icon-endorsed"
icon="endorsed"
>
<svg
data-icon="endorsed"
fill="#0F9960"
height={35}
viewBox="0 0 20 20"
width={35}
>
<desc>
endorsed
</desc>
<path
d="M19.83 9.38L18.81 7.6V5.62c0-.45-.23-.85-.61-1.08l-1.71-1-1.02-1.76a1.25 1.25 0 00-1.08-.61h-2.03l-1.74-1c-.38-.23-.87-.23-1.25 0l-1.74 1H5.65c-.44 0-.85.23-1.08.61L3.58 3.5l-1.8 1.04c-.38.24-.62.64-.62 1.08v2.06L.17 9.4c-.11.19-.17.4-.17.61s.06.42.17.61l.99 1.72v2.06c0 .45.23.85.61 1.08l1.78 1.02.99 1.72c.23.38.63.61 1.08.61h1.99l1.74 1c.19.11.41.17.62.17.21 0 .42-.06.61-.17l1.74-1h2.03c.44 0 .85-.23 1.08-.61l1.02-1.76 1.71-1c.38-.23.61-.64.61-1.08v-1.97l1.02-1.78c.27-.38.27-.85.04-1.25zm-5.08-.71l-5.01 5.01c-.18.18-.43.29-.71.29-.28 0-.53-.11-.71-.29l-3.01-3.01a1.003 1.003 0 011.42-1.42l2.3 2.3 4.31-4.3a1.003 1.003 0 011.71.71c0 .28-.12.53-.3.71z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<Component>
<h5
className="bp3-heading"
/>
</Component>
</div>
</Col>
</div>
</Row>
<Row
center="xs"
>
<div
className="row center-xs"
>
<Col
xs={10}
>
<div
className="col-xs-10"
>
<div
style={
Object {
"marginBottom": "10px",
}
}
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
/>
</Blueprint3.Text>
</div>
<div
id="connected-devices-list-text-success"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
style={
Object {
"marginBottom": "25px",
"textDecoration": "underline dotted",
}
}
>
<Blueprint3.Text
className=""
ellipsize={false}
tagName="div"
>
<div
className=""
/>
</Blueprint3.Text>
</div>
</div>
</Col>
</div>
</Row>
<Blueprint3.Button
icon="repeat"
intent="primary"
onClick={[Function]}
style={
Object {
"borderRadius": "100px",
}
}
>
<button
className="bp3-button bp3-intent-primary"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"borderRadius": "100px",
}
}
type="button"
>
<Blueprint3.Icon
icon="repeat"
key="leftIcon"
>
<span
className="bp3-icon bp3-icon-repeat"
icon="repeat"
>
<svg
data-icon="repeat"
height={16}
viewBox="0 0 16 16"
width={16}
>
<desc>
repeat
</desc>
<path
d="M10 5c0 .55.45 1 1 1h4c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1s-1 .45-1 1v1.74A7.95 7.95 0 008 0C3.58 0 0 3.58 0 8c0 4.06 3.02 7.4 6.94 7.92.02 0 .04.01.06.01.33.04.66.07 1 .07 4.42 0 8-3.58 8-8 0-.55-.45-1-1-1s-1 .45-1 1c0 3.31-2.69 6-6 6-.71 0-1.37-.15-2-.38v.01C3.67 12.81 2 10.61 2 8c0-3.31 2.69-6 6-6 1.77 0 3.36.78 4.46 2H11c-.55 0-1 .45-1 1z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</div>
</Col>
</SuccessStep>
</Router>
</BrowserRouter>
`;

View File

@ -8,6 +8,17 @@ import TopPanel from './TopPanel';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
jest.mock('electron', () => {
return {
ipcRenderer: {
invoke: jest.fn(),
},
remote: {
getGlobal: jest.fn(),
},
};
});
const settingsButtonSelector = '#top-panel-settings-button';
const connectedDevicesListButtonSelector =
'#top-panel-connected-devices-list-button';
@ -23,10 +34,6 @@ describe('<TopPanel />', () => {
jest.clearAllMocks();
});
it('should match exact snapshot', () => {
expect(EnzymeToJson(wrapper)).toMatchSnapshot();
});
describe('when Settings button in top panel is clicked', () => {
it('should Settings Overlay props isSettingsOpen to true', () => {
// @ts-ignore

View File

@ -1,500 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<BrowserRouter>
<Router
history={
Object {
"action": "POP",
"block": [Function],
"createHref": [Function],
"go": [Function],
"goBack": [Function],
"goForward": [Function],
"length": 1,
"listen": [Function],
"location": Object {
"hash": "",
"pathname": "/",
"search": "",
"state": undefined,
},
"push": [Function],
"replace": [Function],
}
}
>
<AllowConnectionForDeviceAlert
device={Object {}}
isOpen={true}
onCancel={[Function]}
onConfirm={[Function]}
>
<Blueprint3.Alert
canEscapeKeyCancel={false}
canOutsideClickCancel={false}
cancelButtonText=""
className="class-allow-device-to-connect-alert"
confirmButtonText=""
icon="feed"
intent="danger"
isOpen={true}
onCancel={[Function]}
onConfirm={[Function]}
transitionDuration={0}
usePortal={false}
>
<Blueprint3.Dialog
canEscapeKeyClose={false}
canOutsideClickClose={false}
className="bp3-alert class-allow-device-to-connect-alert"
isOpen={true}
onCancel={[Function]}
onClose={[Function]}
onConfirm={[Function]}
transitionDuration={0}
usePortal={false}
>
<Blueprint3.Overlay
autoFocus={true}
backdropProps={Object {}}
canEscapeKeyClose={false}
canOutsideClickClose={false}
className="bp3-overlay-scroll-container"
enforceFocus={true}
hasBackdrop={true}
isOpen={true}
lazy={true}
onCancel={[Function]}
onClose={[Function]}
onConfirm={[Function]}
transitionDuration={0}
transitionName="bp3-overlay"
usePortal={false}
>
<TransitionGroup
appear={true}
childFactory={[Function]}
className="bp3-overlay bp3-overlay-open bp3-overlay-inline bp3-overlay-scroll-container"
component="div"
onKeyDown={[Function]}
>
<div
className="bp3-overlay bp3-overlay-open bp3-overlay-inline bp3-overlay-scroll-container"
onKeyDown={[Function]}
>
<CSSTransition
addEndListener={[Function]}
appear={true}
classNames="bp3-overlay"
in={true}
key=".$__backdrop"
onExited={[Function]}
timeout={0}
>
<Transition
addEndListener={[Function]}
appear={true}
enter={true}
exit={true}
in={true}
mountOnEnter={false}
onEnter={[Function]}
onEntered={[Function]}
onEntering={[Function]}
onExit={[Function]}
onExited={[Function]}
onExiting={[Function]}
timeout={0}
unmountOnExit={false}
>
<div
className="bp3-overlay-backdrop"
onMouseDown={[Function]}
/>
</Transition>
</CSSTransition>
<CSSTransition
addEndListener={[Function]}
appear={true}
classNames="bp3-overlay"
in={true}
key=".$.0"
onExited={[Function]}
timeout={0}
>
<Transition
addEndListener={[Function]}
appear={true}
enter={true}
exit={true}
in={true}
mountOnEnter={false}
onEnter={[Function]}
onEntered={[Function]}
onEntering={[Function]}
onExit={[Function]}
onExited={[Function]}
onExiting={[Function]}
timeout={0}
unmountOnExit={false}
>
<div
className="bp3-dialog-container bp3-overlay-content"
tabIndex={0}
>
<div
className="bp3-dialog bp3-alert class-allow-device-to-connect-alert"
>
<div
className="bp3-alert-body"
>
<Blueprint3.Icon
icon="feed"
iconSize={40}
intent="danger"
>
<span
className="bp3-icon bp3-icon-feed bp3-intent-danger"
icon="feed"
>
<svg
data-icon="feed"
height={40}
viewBox="0 0 20 20"
width={40}
>
<desc>
feed
</desc>
<path
d="M2.5 15a2.5 2.5 0 000 5 2.5 2.5 0 000-5zm.5-5c-.55 0-1 .45-1 1s.45 1 1 1c2.76 0 5 2.24 5 5 0 .55.45 1 1 1s1-.45 1-1c0-3.87-3.13-7-7-7zM3 0c-.55 0-1 .45-1 1s.45 1 1 1c8.28 0 15 6.72 15 15 0 .55.45 1 1 1s1-.45 1-1C20 7.61 12.39 0 3 0zm0 5c-.55 0-1 .45-1 1s.45 1 1 1c5.52 0 10 4.48 10 10 0 .55.45 1 1 1s1-.45 1-1C15 10.37 9.63 5 3 5z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<div
className="bp3-alert-contents"
>
<Component>
<h4
className="bp3-heading"
/>
</Component>
<DeviceInfoCallout>
<Component
style={
Object {
"margin": "0 auto",
"textAlign": "center",
}
}
>
<h4
className="bp3-heading"
style={
Object {
"margin": "0 auto",
"textAlign": "center",
}
}
>
:
</h4>
</Component>
<Blueprint3.Callout
id="device-info-callout"
style={
Object {
"borderRadius": "8px",
}
}
>
<div
className="bp3-callout"
id="device-info-callout"
style={
Object {
"borderRadius": "8px",
}
}
>
<Row
center="xs"
>
<div
className="row center-xs"
>
<Col
xs={12}
>
<div
className="col-xs-12"
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
>
:
<span />
</div>
</Blueprint3.Text>
<Blueprint3.Tooltip
content={
<React.Fragment>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
<span
style={
Object {
"fontWeight": 900,
}
}
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
</span>
</React.Fragment>
}
hoverCloseDelay={0}
hoverOpenDelay={100}
minimal={false}
position="top"
transitionDuration={100}
>
<Blueprint3.Popover
autoFocus={false}
boundary="scrollParent"
canEscapeKeyClose={false}
captureDismiss={false}
content={
<React.Fragment>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
<span
style={
Object {
"fontWeight": 900,
}
}
>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
</Blueprint3.Text>
</span>
</React.Fragment>
}
defaultIsOpen={false}
disabled={false}
enforceFocus={false}
fill={false}
hasBackdrop={false}
hoverCloseDelay={0}
hoverOpenDelay={100}
inheritDarkTheme={true}
interactionKind="hover-target"
lazy={true}
minimal={false}
modifiers={
Object {
"arrow": Object {
"enabled": true,
},
}
}
openOnTargetFocus={true}
popoverClassName="bp3-tooltip"
position="top"
targetTagName="span"
transitionDuration={100}
usePortal={true}
wrapperTagName="span"
>
<Manager>
<span
className="bp3-popover-wrapper"
>
<Reference
innerRef={[Function]}
>
<InnerReference
innerRef={[Function]}
setReferenceNode={[Function]}
>
<Blueprint3.ResizeSensor
onResize={[Function]}
>
<span
className="bp3-popover-target"
onBlur={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
<div
className=""
key=".0"
style={
Object {
"backgroundColor": "#00f99273",
"borderRadius": "20px",
"fontWeight": 900,
"paddingLeft": "10px",
"paddingRight": "10px",
}
}
tabIndex={0}
>
<Blueprint3.Text
className="bp3-text-large"
ellipsize={false}
tagName="div"
>
<div
className="bp3-text-large"
>
:
<span
className="device-ip-span"
/>
</div>
</Blueprint3.Text>
</div>
</span>
</Blueprint3.ResizeSensor>
</InnerReference>
</Reference>
<Blueprint3.Overlay
autoFocus={false}
backdropClassName="bp3-popover-backdrop"
backdropProps={Object {}}
canEscapeKeyClose={false}
canOutsideClickClose={false}
enforceFocus={false}
hasBackdrop={false}
isOpen={false}
lazy={true}
onClose={[Function]}
transitionDuration={100}
transitionName="bp3-popover"
usePortal={true}
/>
</span>
</Manager>
</Blueprint3.Popover>
</Blueprint3.Tooltip>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
>
:
<span />
</div>
</Blueprint3.Text>
<Blueprint3.Text
ellipsize={false}
tagName="div"
>
<div
className=""
>
:
<span />
</div>
</Blueprint3.Text>
<div
style={
Object {
"margin": "0 auto",
"width": "200px",
}
}
>
<Blueprint3.Text
className="bp3-text-muted"
ellipsize={true}
tagName="div"
>
<div
className="bp3-text-overflow-ellipsis bp3-text-muted"
>
:
<span />
</div>
</Blueprint3.Text>
</div>
</div>
</Col>
</div>
</Row>
</div>
</Blueprint3.Callout>
</DeviceInfoCallout>
</div>
</div>
<div
className="bp3-alert-footer"
>
<Blueprint3.Button
intent="danger"
onClick={[Function]}
text=""
>
<button
className="bp3-button bp3-intent-danger"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</div>
</div>
</div>
</Transition>
</CSSTransition>
</div>
</TransitionGroup>
</Blueprint3.Overlay>
</Blueprint3.Dialog>
</Blueprint3.Alert>
</AllowConnectionForDeviceAlert>
</Router>
</BrowserRouter>
`;

View File

@ -1,643 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<BrowserRouter>
<Router
history={
Object {
"action": "POP",
"block": [Function],
"createHref": [Function],
"go": [Function],
"goBack": [Function],
"goForward": [Function],
"length": 1,
"listen": [Function],
"location": Object {
"hash": "",
"pathname": "/",
"search": "",
"state": undefined,
},
"push": [Function],
"replace": [Function],
}
}
>
<ConnectedDevicesListDrawer
handleToggle={[Function]}
isOpen={true}
stepperRef={null}
>
<Blueprint3.Drawer
canOutsideClickClose={true}
className="makeStyles-drawerRoot-1"
isOpen={true}
onClose={[Function]}
position="bottom"
size="90%"
style={Object {}}
transitionDuration={0}
vertical={false}
>
<Blueprint3.Overlay
autoFocus={true}
backdropProps={Object {}}
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="bp3-overlay-container"
enforceFocus={true}
hasBackdrop={true}
isOpen={true}
lazy={true}
onClose={[Function]}
position="bottom"
size="90%"
style={Object {}}
transitionDuration={0}
transitionName="bp3-overlay"
usePortal={true}
vertical={false}
>
<Blueprint3.Portal
container={
<body
class="bp3-overlay-open"
>
<div
class="bp3-portal"
>
<div
class="bp3-overlay bp3-overlay-open bp3-overlay-container"
>
<div
class="bp3-overlay-backdrop bp3-overlay-appear bp3-overlay-appear-active"
tabindex="0"
/>
<div
class="bp3-drawer bp3-position-bottom makeStyles-drawerRoot-1 bp3-overlay-content bp3-overlay-appear bp3-overlay-appear-active"
style="height: 90%;"
tabindex="0"
>
<div
class="makeStyles-drawerInnerTopPanel-2 row middle-xs between-xs"
>
<div
class="col-xs-11"
>
<div
class="row middle-xs"
>
<div
class="makeStyles-topHeader-4"
>
<div
class="bp3-text-muted"
/>
</div>
<button
class="bp3-button bp3-disabled bp3-intent-danger"
disabled=""
style="border-radius: 100px;"
tabindex="-1"
type="button"
>
<span
class="bp3-icon bp3-icon-disable"
icon="disable"
>
<svg
data-icon="disable"
height="16"
viewBox="0 0 16 16"
width="16"
>
<desc>
disable
</desc>
<path
d="M7.99-.01c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm-6 8c0-3.31 2.69-6 6-6 1.3 0 2.49.42 3.47 1.12l-8.35 8.35c-.7-.98-1.12-2.17-1.12-3.47zm6 6c-1.3 0-2.49-.42-3.47-1.12l8.35-8.35c.7.98 1.12 2.17 1.12 3.47 0 3.32-2.68 6-6 6z"
fill-rule="evenodd"
/>
</svg>
</span>
</button>
</div>
</div>
<div
class="col-xs-1"
>
<button
class="bp3-button makeStyles-closeButton-6 undefined"
id="close-overlay-button"
type="button"
>
<span
class="bp3-button-text"
>
<span
class="bp3-icon bp3-icon-cross"
icon="cross"
>
<svg
data-icon="cross"
height="30"
viewBox="0 0 20 20"
width="30"
>
<desc>
cross
</desc>
<path
d="M11.41 10l4.29-4.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L10 8.59l-4.29-4.3a1.003 1.003 0 00-1.42 1.42L8.59 10 4.3 14.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71l4.29-4.3 4.29 4.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L11.41 10z"
fill-rule="evenodd"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="makeStyles-connectedDevicesRoot-3 row"
>
<div
class="col-xs-12"
>
<div
class="react-reveal makeStyles-zoomFullWidth-5"
/>
</div>
</div>
</div>
</div>
</div>
</body>
}
>
<Portal
containerInfo={
<div
class="bp3-portal"
>
<div
class="bp3-overlay bp3-overlay-open bp3-overlay-container"
>
<div
class="bp3-overlay-backdrop bp3-overlay-appear bp3-overlay-appear-active"
tabindex="0"
/>
<div
class="bp3-drawer bp3-position-bottom makeStyles-drawerRoot-1 bp3-overlay-content bp3-overlay-appear bp3-overlay-appear-active"
style="height: 90%;"
tabindex="0"
>
<div
class="makeStyles-drawerInnerTopPanel-2 row middle-xs between-xs"
>
<div
class="col-xs-11"
>
<div
class="row middle-xs"
>
<div
class="makeStyles-topHeader-4"
>
<div
class="bp3-text-muted"
/>
</div>
<button
class="bp3-button bp3-disabled bp3-intent-danger"
disabled=""
style="border-radius: 100px;"
tabindex="-1"
type="button"
>
<span
class="bp3-icon bp3-icon-disable"
icon="disable"
>
<svg
data-icon="disable"
height="16"
viewBox="0 0 16 16"
width="16"
>
<desc>
disable
</desc>
<path
d="M7.99-.01c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm-6 8c0-3.31 2.69-6 6-6 1.3 0 2.49.42 3.47 1.12l-8.35 8.35c-.7-.98-1.12-2.17-1.12-3.47zm6 6c-1.3 0-2.49-.42-3.47-1.12l8.35-8.35c.7.98 1.12 2.17 1.12 3.47 0 3.32-2.68 6-6 6z"
fill-rule="evenodd"
/>
</svg>
</span>
</button>
</div>
</div>
<div
class="col-xs-1"
>
<button
class="bp3-button makeStyles-closeButton-6 undefined"
id="close-overlay-button"
type="button"
>
<span
class="bp3-button-text"
>
<span
class="bp3-icon bp3-icon-cross"
icon="cross"
>
<svg
data-icon="cross"
height="30"
viewBox="0 0 20 20"
width="30"
>
<desc>
cross
</desc>
<path
d="M11.41 10l4.29-4.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L10 8.59l-4.29-4.3a1.003 1.003 0 00-1.42 1.42L8.59 10 4.3 14.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71l4.29-4.3 4.29 4.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L11.41 10z"
fill-rule="evenodd"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="makeStyles-connectedDevicesRoot-3 row"
>
<div
class="col-xs-12"
>
<div
class="react-reveal makeStyles-zoomFullWidth-5"
/>
</div>
</div>
</div>
</div>
</div>
}
>
<TransitionGroup
appear={true}
childFactory={[Function]}
className="bp3-overlay bp3-overlay-open bp3-overlay-container"
component="div"
onKeyDown={[Function]}
>
<div
className="bp3-overlay bp3-overlay-open bp3-overlay-container"
onKeyDown={[Function]}
>
<CSSTransition
addEndListener={[Function]}
appear={true}
classNames="bp3-overlay"
in={true}
key=".$__backdrop"
onExited={[Function]}
timeout={0}
>
<Transition
addEndListener={[Function]}
appear={true}
enter={true}
exit={true}
in={true}
mountOnEnter={false}
onEnter={[Function]}
onEntered={[Function]}
onEntering={[Function]}
onExit={[Function]}
onExited={[Function]}
onExiting={[Function]}
timeout={0}
unmountOnExit={false}
>
<div
className="bp3-overlay-backdrop"
onMouseDown={[Function]}
tabIndex={0}
/>
</Transition>
</CSSTransition>
<CSSTransition
addEndListener={[Function]}
appear={true}
classNames="bp3-overlay"
in={true}
key=".$.0"
onExited={[Function]}
timeout={0}
>
<Transition
addEndListener={[Function]}
appear={true}
enter={true}
exit={true}
in={true}
mountOnEnter={false}
onEnter={[Function]}
onEntered={[Function]}
onEntering={[Function]}
onExit={[Function]}
onExited={[Function]}
onExiting={[Function]}
timeout={0}
unmountOnExit={false}
>
<div
className="bp3-drawer bp3-position-bottom makeStyles-drawerRoot-1 bp3-overlay-content"
style={
Object {
"height": "90%",
}
}
tabIndex={0}
>
<Row
between="xs"
className="makeStyles-drawerInnerTopPanel-2"
middle="xs"
>
<div
className="makeStyles-drawerInnerTopPanel-2 row middle-xs between-xs"
>
<Col
xs={11}
>
<div
className="col-xs-11"
>
<Row
middle="xs"
>
<div
className="row middle-xs"
>
<div
className="makeStyles-topHeader-4"
>
<Blueprint3.Text
className="bp3-text-muted"
ellipsize={false}
tagName="div"
>
<div
className="bp3-text-muted"
/>
</Blueprint3.Text>
</div>
<Blueprint3.Button
disabled={true}
icon="disable"
intent="danger"
onClick={[Function]}
style={
Object {
"borderRadius": "100px",
}
}
>
<button
className="bp3-button bp3-disabled bp3-intent-danger"
disabled={true}
onBlur={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"borderRadius": "100px",
}
}
tabIndex={-1}
type="button"
>
<Blueprint3.Icon
icon="disable"
key="leftIcon"
>
<span
className="bp3-icon bp3-icon-disable"
icon="disable"
>
<svg
data-icon="disable"
height={16}
viewBox="0 0 16 16"
width={16}
>
<desc>
disable
</desc>
<path
d="M7.99-.01c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm-6 8c0-3.31 2.69-6 6-6 1.3 0 2.49.42 3.47 1.12l-8.35 8.35c-.7-.98-1.12-2.17-1.12-3.47zm6 6c-1.3 0-2.49-.42-3.47-1.12l8.35-8.35c.7.98 1.12 2.17 1.12 3.47 0 3.32-2.68 6-6 6z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</div>
</Row>
</div>
</Col>
<Col
xs={1}
>
<div
className="col-xs-1"
>
<CloseOverlayButton
isDefaultStyles={true}
onClick={[Function]}
>
<Blueprint3.Button
className="makeStyles-closeButton-6 undefined"
id="close-overlay-button"
onClick={[Function]}
>
<button
className="bp3-button makeStyles-closeButton-6 undefined"
id="close-overlay-button"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<span
className="bp3-button-text"
key="text"
>
<Blueprint3.Icon
icon="cross"
iconSize={30}
>
<span
className="bp3-icon bp3-icon-cross"
icon="cross"
>
<svg
data-icon="cross"
height={30}
viewBox="0 0 20 20"
width={30}
>
<desc>
cross
</desc>
<path
d="M11.41 10l4.29-4.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L10 8.59l-4.29-4.3a1.003 1.003 0 00-1.42 1.42L8.59 10 4.3 14.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71l4.29-4.3 4.29 4.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L11.41 10z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
</span>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</CloseOverlayButton>
</div>
</Col>
</div>
</Row>
<Row
className="makeStyles-connectedDevicesRoot-3"
>
<div
className="makeStyles-connectedDevicesRoot-3 row"
>
<Col
xs={12}
>
<div
className="col-xs-12"
>
<Fade
bottom={true}
cascade={true}
duration={0}
>
<RevealBase
bottom={true}
cascade={true}
fraction={0.2}
inEffect={
Object {
"count": 1,
"delay": 0,
"duration": 0,
"forever": undefined,
"make": [Function],
"reverse": undefined,
"style": Object {
"animationFillMode": "both",
},
}
}
outEffect={
Object {
"count": 1,
"delay": 0,
"duration": 0,
"forever": undefined,
"make": [Function],
"reverse": undefined,
"style": Object {
"animationFillMode": "both",
},
}
}
refProp="ref"
>
<div
className="react-reveal makeStyles-zoomFullWidth-5"
style={
Object {
"opacity": undefined,
}
}
/>
</RevealBase>
</Fade>
</div>
</Col>
</div>
</Row>
</div>
</Transition>
</CSSTransition>
</div>
</TransitionGroup>
</Portal>
</Blueprint3.Portal>
</Blueprint3.Overlay>
</Blueprint3.Drawer>
<Blueprint3.Alert
canEscapeKeyCancel={true}
canOutsideClickCancel={true}
cancelButtonText=""
confirmButtonText=""
icon="warning-sign"
intent="danger"
isOpen={false}
onCancel={[Function]}
onClose={[Function]}
onConfirm={[Function]}
transitionDuration={0}
>
<Blueprint3.Dialog
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="bp3-alert"
isOpen={false}
onCancel={[Function]}
onClose={[Function]}
onConfirm={[Function]}
transitionDuration={0}
>
<Blueprint3.Overlay
autoFocus={true}
backdropProps={Object {}}
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="bp3-overlay-scroll-container"
enforceFocus={true}
hasBackdrop={true}
isOpen={false}
lazy={true}
onCancel={[Function]}
onClose={[Function]}
onConfirm={[Function]}
transitionDuration={0}
transitionName="bp3-overlay"
usePortal={true}
/>
</Blueprint3.Dialog>
</Blueprint3.Alert>
</ConnectedDevicesListDrawer>
</Router>
</BrowserRouter>
`;

View File

@ -1,247 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should match exact snapshot 1`] = `
<BrowserRouter>
<Router
history={
Object {
"action": "POP",
"block": [Function],
"createHref": [Function],
"go": [Function],
"goBack": [Function],
"goForward": [Function],
"length": 1,
"listen": [Function],
"location": Object {
"hash": "",
"pathname": "/",
"search": "",
"state": undefined,
},
"push": [Function],
"replace": [Function],
}
}
>
<ShareAppOrScreenControlGroup
handleNextApplicationWindow={[Function]}
handleNextEntireScreen={[Function]}
>
<Blueprint3.ControlGroup
className="makeStyles-controlGroupRoot-1"
fill={true}
id="share-screen-or-app-btn-group"
style={
Object {
"width": "380px",
}
}
vertical={false}
>
<div
className="bp3-control-group bp3-fill makeStyles-controlGroupRoot-1"
id="share-screen-or-app-btn-group"
style={
Object {
"width": "380px",
}
}
>
<Blueprint3.Button
className="makeStyles-shareEntireScreenButton-2"
intent="primary"
onClick={[Function]}
>
<button
className="bp3-button bp3-intent-primary makeStyles-shareEntireScreenButton-2"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<span
className="bp3-button-text"
key="text"
>
<Blueprint3.Icon
className="makeStyles-shareEntireScreenButtonIcon-3"
color="white"
icon="desktop"
iconSize={100}
>
<span
className="bp3-icon bp3-icon-desktop makeStyles-shareEntireScreenButtonIcon-3"
icon="desktop"
>
<svg
data-icon="desktop"
fill="white"
height={100}
viewBox="0 0 20 20"
width={100}
>
<desc>
desktop
</desc>
<path
d="M19 0H1C.45 0 0 .45 0 1v13c0 .55.45 1 1 1h5.67l-.5 3H5c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1h-1.17l-.5-3H19c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1zm-1 13H2V2h16v11z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<Blueprint3.Text
className="bp3-running-text"
ellipsize={false}
tagName="div"
>
<div
className="bp3-running-text"
/>
</Blueprint3.Text>
</span>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
<Blueprint3.Button
className="makeStyles-shareAppButton-4"
intent="primary"
onClick={[Function]}
>
<button
className="bp3-button bp3-intent-primary makeStyles-shareAppButton-4"
onBlur={[Function]}
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<span
className="bp3-button-text"
key="text"
>
<Blueprint3.Icon
className="makeStyles-shareAppButtonIcon-5"
color="white"
icon="application"
iconSize={100}
>
<span
className="bp3-icon bp3-icon-application makeStyles-shareAppButtonIcon-5"
icon="application"
>
<svg
data-icon="application"
fill="white"
height={100}
viewBox="0 0 20 20"
width={100}
>
<desc>
application
</desc>
<path
d="M3.5 9h9c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-9c-.28 0-.5.22-.5.5s.22.5.5.5zm0 2h5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-5c-.28 0-.5.22-.5.5s.22.5.5.5zM19 1H1c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1zm-1 16H2V6h16v11zM3.5 13h7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-7c-.28 0-.5.22-.5.5s.22.5.5.5z"
fillRule="evenodd"
key="0"
/>
</svg>
</span>
</Blueprint3.Icon>
<Blueprint3.Text
className="bp3-running-text"
ellipsize={false}
tagName="div"
>
<div
className="bp3-running-text"
/>
</Blueprint3.Text>
</span>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
<Blueprint3.Button
active={true}
className="makeStyles-orDecorationButton-6"
style={
Object {
"zIndex": 999,
}
}
>
<button
className="bp3-button bp3-active makeStyles-orDecorationButton-6"
onBlur={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
style={
Object {
"zIndex": 999,
}
}
type="button"
>
<Blueprint3.Icon
key="leftIcon"
/>
<Blueprint3.Icon
key="rightIcon"
/>
</button>
</Blueprint3.Button>
</div>
</Blueprint3.ControlGroup>
<ChooseAppOrScreenOverlay
handleClose={[Function]}
handleNextApplicationWindow={[Function]}
handleNextEntireScreen={[Function]}
isChooseAppOrScreenOverlayOpen={false}
isEntireScreenToShareChosen={false}
>
<Blueprint3.Dialog
autoFocus={true}
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="makeStyles-dialogRoot-7 choose-app-or-screen-dialog"
enforceFocus={true}
hasBackdrop={true}
isOpen={false}
onClose={[Function]}
transitionDuration={0}
usePortal={true}
>
<Blueprint3.Overlay
autoFocus={true}
backdropProps={Object {}}
canEscapeKeyClose={true}
canOutsideClickClose={true}
className="bp3-overlay-scroll-container"
enforceFocus={true}
hasBackdrop={true}
isOpen={false}
lazy={true}
onClose={[Function]}
transitionDuration={0}
transitionName="bp3-overlay"
usePortal={true}
/>
</Blueprint3.Dialog>
</ChooseAppOrScreenOverlay>
</ShareAppOrScreenControlGroup>
</Router>
</BrowserRouter>
`;

View File

@ -7,6 +7,14 @@ import {
jest.useFakeTimers();
jest.mock('electron', () => {
return {
ipcRenderer: {
invoke: jest.fn(),
},
};
});
describe('i18next.config.client tests', () => {
beforeEach(() => {});

View File

@ -1,47 +0,0 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import { ToastProvider } from 'react-toast-notifications';
import DeskreenStepper from './DeskreenStepper';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
jest.mock('electron', () => {
return {
remote: {
getGlobal: (globalName: string) => {
if (globalName === 'sharingSessionService') {
return {
createWaitingForConnectionSharingSession: () =>
new Promise(() => {}),
setAppLanguage: () => {},
setAppTheme: () => {},
};
}
if (globalName === 'connectedDevicesService') {
return {
getDevices: () => [],
addPendingConnectedDeviceListener: () => {},
};
}
return {};
},
},
};
});
it('should match exact snapshot', () => {
const subject = mount(
<>
<ToastProvider placement="top-center">
<Router>
<DeskreenStepper />
</Router>
</ToastProvider>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

View File

@ -1,49 +0,0 @@
import React, { Suspense } from 'react';
import Enzyme, { mount } from 'enzyme';
import EnzymeToJson from 'enzyme-to-json';
import Adapter from 'enzyme-adapter-react-16';
import { BrowserRouter as Router } from 'react-router-dom';
import HomePage from './HomePage';
import { SettingsProvider } from './SettingsProvider';
Enzyme.configure({ adapter: new Adapter() });
jest.useFakeTimers();
jest.mock('electron', () => {
return {
remote: {
getGlobal: (globalName: string) => {
if (globalName === 'connectedDevicesService') {
return {
getDevices: () => [],
addPendingConnectedDeviceListener: () => {},
};
}
if (globalName === 'sharingSessionService') {
return {
createWaitingForConnectionSharingSession: () =>
new Promise(() => {}),
setAppLanguage: () => {},
setAppTheme: () => {},
};
}
return {};
},
},
};
});
it('should match exact snapshot', () => {
const subject = mount(
<>
<Suspense fallback={<div>Loading... </div>}>
<SettingsProvider>
<Router>
<HomePage />
</Router>
</SettingsProvider>
</Suspense>
</>
);
expect(EnzymeToJson(subject)).toMatchSnapshot();
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -16,6 +16,15 @@ jest.useFakeTimers();
jest.mock('simple-peer');
jest.mock('electron', () => {
return {
ipcRenderer: {
on: jest.fn(),
invoke: jest.fn(),
},
};
});
const TEST_PARTNER = {
username: 'asdfaf',
publicKey: 'afafdsg',

View File

@ -31,10 +31,6 @@ const TEST_CONNECTED_DEVICES_SERVICE = ({
const TEST_ROOM_ID_SERVICE = ({
a223: '2g2g',
} as unknown) as ConnectedDevicesService;
// const TEST_SHARING_SESSIONS = [
// { denyConnectionForPartner: jest.fn(), destroy: jest.fn() },
// { denyConnectionForPartner: jest.fn(), destroy: jest.fn() },
// ];
const testMapSharingSessions = new Map();
testMapSharingSessions.set('1', {
denyConnectionForPartner: jest.fn(),

View File

@ -88,8 +88,6 @@ export default function initIpcMainHandlers(
ipcMain.handle('unmark-room-id-as-taken', (_, roomID) => {
const deskreenGlobal = getDeskreenGlobal();
deskreenGlobal[DeskreenGlobalService.RoomIDService].unmarkRoomIDAsTaken(
roomID
);
deskreenGlobal.roomIDService.unmarkRoomIDAsTaken(roomID);
});
}

View File

@ -194,10 +194,6 @@ describe('app menu MenyBuilder tests', () => {
});
describe('when menu from buildDarwinTemplate was created', () => {
it('should match a snapshot', () => {
expect(menuBuilder.buildDarwinTemplate()).toMatchSnapshot();
});
describe('when in About submenu menu quit label click event occured', () => {
it('should call app.quit() and stop() on signaling server, stop should be called before quit', () => {
const res = menuBuilder.buildDarwinTemplate();

View File

@ -1,4 +0,0 @@
// eslint-disable-next-line import/prefer-default-export
export enum DeskreenGlobalService {
RoomIDService = 'roomIDService',
}