From 99b6cbba7f4153adf6d599afb0513f9a5d77611b Mon Sep 17 00:00:00 2001 From: Pavlo Buidenkov Date: Mon, 28 Sep 2020 15:28:37 +0300 Subject: [PATCH] WIP, sharing session defined with unit tests --- .../AllowConnectionForDeviceAlert.tsx | 6 +- app/components/ConnectedDevicesListDrawer.tsx | 6 +- .../DeviceConnectedInfoButton.tsx | 6 +- .../DeviceConnectedInfoButton.spec.tsx.snap | 2 +- app/components/StepsOfStepper/ConfirmStep.tsx | 6 +- app/constants/test-devices.json | 60 +++++++++---------- .../ConnectedDevicesProvider/Device.d.ts | 6 +- .../SharingSession.spec.ts | 34 +++++++++++ .../SharingSessionServiceType.d.ts | 33 ++++++++++ .../SharingSessionsService.ts | 6 ++ .../SharingSessionsService/SharingType.ts | 7 +++ app/features/SharingSessionsService/index.ts | 36 +++++++++++ app/server/roomIDService.ts | 49 +++++++++++++++ package.json | 1 + test/ux/Stepper.ux.ts | 32 +++++----- yarn.lock | 5 ++ 16 files changed, 233 insertions(+), 62 deletions(-) create mode 100644 app/features/SharingSessionsService/SharingSession.spec.ts create mode 100644 app/features/SharingSessionsService/SharingSessionServiceType.d.ts create mode 100644 app/features/SharingSessionsService/SharingSessionsService.ts create mode 100644 app/features/SharingSessionsService/SharingType.ts create mode 100644 app/features/SharingSessionsService/index.ts create mode 100644 app/server/roomIDService.ts diff --git a/app/components/AllowConnectionForDeviceAlert.tsx b/app/components/AllowConnectionForDeviceAlert.tsx index d6fe17b..4f8b9fb 100644 --- a/app/components/AllowConnectionForDeviceAlert.tsx +++ b/app/components/AllowConnectionForDeviceAlert.tsx @@ -32,7 +32,7 @@ export default function AllowConnectionForDeviceAlert( {`Device IP: `} - {device?.deviceIp} + {device?.deviceIP} @@ -43,12 +43,12 @@ export default function AllowConnectionForDeviceAlert( - {`Device OS: ${device?.deviceOs}`} + {`Device OS: ${device?.deviceOS}`} - {`session ID: ${device?.sessionId}`} + {`session ID: ${device?.sharingSessionID}`} diff --git a/app/components/ConnectedDevicesListDrawer.tsx b/app/components/ConnectedDevicesListDrawer.tsx index eeccf17..dc966b4 100644 --- a/app/components/ConnectedDevicesListDrawer.tsx +++ b/app/components/ConnectedDevicesListDrawer.tsx @@ -165,11 +165,11 @@ export default function ConnectedDevicesListDrawer( > - {device.deviceIp} + {device.deviceIP} {device.deviceType} - {device.deviceOs} - {device.sessionId} + {device.deviceOS} + {device.sharingSessionID}