{data?.networkInterfaces.map((e) => (
openLink(baseURL.replace('__IP__', e.address))}
- className={style.if}
+ className={style.interface}
>
{`${e.name} - ${e.address}`}
diff --git a/client/src/features/info/InfoTitle.jsx b/client/src/features/info/InfoTitle.jsx
index 02be743b5..dbee9bcbc 100644
--- a/client/src/features/info/InfoTitle.jsx
+++ b/client/src/features/info/InfoTitle.jsx
@@ -6,10 +6,9 @@ import CollapseBar from '../../common/components/collapseBar/CollapseBar';
import style from './Info.module.scss';
export default function InfoTitle(props) {
+ const { title, data } = props;
const [collapsed, setCollapsed] = useState(false);
- const { title, data, roll } = props;
-
const noTitl = data.title == null || data.title === '';
const noPres = data.presenter == null || data.presenter === '';
const noSubt = data.subtitle == null || data.subtitle === '';
@@ -21,7 +20,6 @@ export default function InfoTitle(props) {
title={title}
isCollapsed={collapsed}
onClick={() => setCollapsed((c) => !c)}
- roll={roll}
/>
{!collapsed && (
<>
diff --git a/client/src/features/menu/EventListMenu.jsx b/client/src/features/menu/EventListMenu.jsx
deleted file mode 100644
index 4fd7044d5..000000000
--- a/client/src/features/menu/EventListMenu.jsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import { memo, useCallback, useContext } from 'react';
-import { ButtonGroup, HStack } from '@chakra-ui/react';
-import { FiTarget } from '@react-icons/all-files/fi/FiTarget';
-import { IoCaretDown } from '@react-icons/all-files/io5/IoCaretDown';
-import { IoCaretUp } from '@react-icons/all-files/io5/IoCaretUp';
-import TooltipActionBtn from 'common/components/buttons/TooltipActionBtn';
-import { CursorContext } from 'common/context/CursorContext';
-import { useEventAction } from 'common/hooks/useEventAction';
-
-import MenuActionButtons from './MenuActionButtons';
-
-import style from './EventListMenu.module.css';
-
-const cursorBtnProps = {
- size: 'sm',
- color: 'pink.300',
- borderColor: 'pink.300',
- variant: 'outline',
- _hover: { bg: 'pink.400', color: 'white' },
-};
-
-const EventListMenu = () => {
- const { isCursorLocked, toggleCursorLocked, moveCursorUp, moveCursorDown } =
- useContext(CursorContext);
- const { addEvent, deleteAllEvents } = useEventAction();
-
- const actionHandler = useCallback(
- (action) => {
- switch (action) {
- case 'event':
- addEvent({ type: action });
- break;
- case 'delay':
- addEvent({ type: action });
- break;
- case 'block':
- addEvent({ type: action });
- break;
- case 'cursorUp':
- moveCursorUp();
- break;
- case 'cursorDown':
- moveCursorDown();
- break;
- case 'togglelock':
- toggleCursorLocked();
- break;
- case 'deleteall':
- deleteAllEvents();
- break;
- default:
- break;
- }
- },
- [addEvent, deleteAllEvents, moveCursorDown, moveCursorUp, toggleCursorLocked],
- );
-
- return (
-
-
- actionHandler('cursorUp')}
- icon={}
- tooltip='Move cursor up Alt + ↑'
- />
- actionHandler('cursorDown')}
- icon={}
- tooltip='Move cursor down Alt + ↓'
- />
- actionHandler('togglelock')}
- icon={}
- tooltip='Lock cursor to current'
- width='3em'
- backgroundColor={isCursorLocked && 'pink.400'}
- color={isCursorLocked ? 'white' : 'pink.400'}
- variant={isCursorLocked ? 'solid' : 'outline'}
- />
-
-
-
- );
-};
-
-export default memo(EventListMenu);
diff --git a/client/src/features/menu/EventListMenu.module.css b/client/src/features/menu/EventListMenu.module.scss
similarity index 62%
rename from client/src/features/menu/EventListMenu.module.css
rename to client/src/features/menu/EventListMenu.module.scss
index 33e96aa73..d7e7f7306 100644
--- a/client/src/features/menu/EventListMenu.module.css
+++ b/client/src/features/menu/EventListMenu.module.scss
@@ -1,5 +1,5 @@
.headerButtons {
align-content: center;
- justify-content: flex-end;
+ justify-content: space-between;
gap: 8px;
}
diff --git a/client/src/features/menu/EventListMenu.tsx b/client/src/features/menu/EventListMenu.tsx
new file mode 100644
index 000000000..875d79a1e
--- /dev/null
+++ b/client/src/features/menu/EventListMenu.tsx
@@ -0,0 +1,97 @@
+import { memo, useCallback, useContext } from 'react';
+import {
+ Button,
+ Divider,
+ HStack,
+ IconButton,
+ Menu,
+ MenuButton,
+ MenuItem,
+ MenuList,
+ Tooltip,
+} from '@chakra-ui/react';
+import { FiClock } from '@react-icons/all-files/fi/FiClock';
+import { FiMinusCircle } from '@react-icons/all-files/fi/FiMinusCircle';
+import { FiPlus } from '@react-icons/all-files/fi/FiPlus';
+import { FiTrash2 } from '@react-icons/all-files/fi/FiTrash2';
+import { CursorContext } from 'common/context/CursorContext';
+
+import { useEventAction } from '../../common/hooks/useEventAction';
+
+import style from './EventListMenu.module.scss';
+
+const menuStyle = {
+ color: '#000000',
+ backgroundColor: 'rgba(255,255,255,1)',
+};
+
+const EventListMenu = () => {
+ const { isCursorLocked, toggleCursorLocked } = useContext(CursorContext);
+ const { addEvent, deleteAllEvents } = useEventAction();
+
+ type ActionTypes = 'event' | 'delay' | 'block' | 'delete-all' | 'toggle-lock';
+ const actionHandler = useCallback(
+ (action: ActionTypes) => {
+ switch (action) {
+ case 'toggle-lock':
+ toggleCursorLocked();
+ break;
+ case 'event':
+ addEvent({ type: action });
+ break;
+ case 'delay':
+ addEvent({ type: action });
+ break;
+ case 'block':
+ addEvent({ type: action });
+ break;
+ case 'delete-all':
+ deleteAllEvents();
+ break;
+ }
+ },
+ [toggleCursorLocked],
+ );
+
+ return (
+
+
+
+
+ );
+};
+
+export default memo(EventListMenu);
diff --git a/client/src/features/menu/MenuActionButtons.tsx b/client/src/features/menu/MenuActionButtons.tsx
deleted file mode 100644
index b0eca81ba..000000000
--- a/client/src/features/menu/MenuActionButtons.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import {
- IconButton,
- Divider,
- Menu,
- MenuButton,
- MenuItem,
- MenuList,
- Tooltip,
-} from '@chakra-ui/react';
-import { FiClock } from '@react-icons/all-files/fi/FiClock';
-import { FiMinusCircle } from '@react-icons/all-files/fi/FiMinusCircle';
-import { FiPlus } from '@react-icons/all-files/fi/FiPlus';
-import { FiTrash2 } from '@react-icons/all-files/fi/FiTrash2';
-import { useEventAction } from 'common/hooks/useEventAction';
-import { Size } from 'common/models/UtilTypes';
-
-
-interface MenuActionButtonsProps {
- actionHandler: (action: string) => void;
- size?: Size;
-}
-
-// Todo: add useEventActionsHook
-export default function MenuActionButtons(props: MenuActionButtonsProps) {
- const { actionHandler, size = 'xs' } = props;
- const { deleteAllEvents } = useEventAction();
- const menuStyle = {
- color: '#000000',
- backgroundColor: 'rgba(255,255,255,1)',
- };
-
- return (
-
- );
-}
-
diff --git a/client/src/features/menu/MenuBar.jsx b/client/src/features/menu/MenuBar.jsx
deleted file mode 100644
index e69de29bb..000000000
diff --git a/client/src/features/menu/MenuBar.tsx b/client/src/features/menu/MenuBar.tsx
index 77b23d9ed..a4e5776ea 100644
--- a/client/src/features/menu/MenuBar.tsx
+++ b/client/src/features/menu/MenuBar.tsx
@@ -4,8 +4,8 @@ import { FiHelpCircle } from '@react-icons/all-files/fi/FiHelpCircle';
import { FiMaximize } from '@react-icons/all-files/fi/FiMaximize';
import { FiMinimize } from '@react-icons/all-files/fi/FiMinimize';
import { FiSave } from '@react-icons/all-files/fi/FiSave';
-import { FiSettings } from '@react-icons/all-files/fi/FiSettings';
import { FiUpload } from '@react-icons/all-files/fi/FiUpload';
+import { IoSettingsOutline } from '@react-icons/all-files/io5/IoSettingsOutline';
import { downloadEvents } from 'common/api/ontimeApi';
import QuitIconBtn from '../../common/components/buttons/QuitIconBtn';
@@ -116,7 +116,7 @@ export default function MenuBar(props: MenuBarProps) {
/>
}
+ icon={
}
className={isSettingsOpen ? style.open : ''}
clickHandler={onSettingsOpen}
tooltip='Settings'
diff --git a/client/src/features/menu/__tests__/MenuActionButtons.test.jsx b/client/src/features/menu/__tests__/MenuActionButtons.test.jsx
deleted file mode 100644
index cf4cc9b10..000000000
--- a/client/src/features/menu/__tests__/MenuActionButtons.test.jsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { QueryClientProvider } from '@tanstack/react-query';
-import { render, screen } from '@testing-library/react';
-import { vi } from 'vitest';
-
-import { queryClientMock } from '../../../__mocks__/QueryClient.mock';
-import MenuActionButtons from '../MenuActionButtons';
-
-const actionHandler = vi.fn();
-const renderInMock = () => {
- render(
-
-
- ,
- );
-};
-
-test('check that menu bar renders correctly', () => {
- // need to inject the react query provider
- renderInMock();
-
- const b = screen.getByRole('button', {
- name: /create menu/i,
- });
-
- expect(b).toBeInTheDocument();
-});
\ No newline at end of file
diff --git a/client/src/features/table/TableWrapper.jsx b/client/src/features/table/TableWrapper.jsx
index 806819b1d..add666899 100644
--- a/client/src/features/table/TableWrapper.jsx
+++ b/client/src/features/table/TableWrapper.jsx
@@ -83,7 +83,10 @@ export default function TableWrapper() {
return
loading...;
}
return (
-
+
+
{general.title}
diff --git a/client/src/features/viewers/backstage/Backstage.scss b/client/src/features/viewers/backstage/Backstage.scss
index 55810553b..22801f663 100644
--- a/client/src/features/viewers/backstage/Backstage.scss
+++ b/client/src/features/viewers/backstage/Backstage.scss
@@ -31,7 +31,7 @@
.today-container {
background-color: var(--outdent-background-color-override, $viewer-outdent-bg-color);
padding: 1vh 1vw;
- border-radius: 1vw;
+ border-radius: $element-border-radius;
.label {
font-size: 1.3vw;
@@ -50,7 +50,7 @@
}
.event {
- border-radius: 0 2vw 2vw 0;
+ border-radius: 0 $element-border-radius $element-border-radius 0;
margin-left: -1vw;
padding: 1vh 2vw;
overflow: hidden;
@@ -115,12 +115,12 @@
.clock-container {
grid-area: time;
- border-radius: 0 0 1vw 1vw;
+ border-radius: 0 0 $element-border-radius $element-border-radius;
}
.timer-container {
grid-area: clck;
- border-radius: 1vw 1vw 0 0;
+ border-radius: $element-border-radius $element-border-radius 0 0;
}
.info {
diff --git a/client/src/features/viewers/countdown/Countdown.jsx b/client/src/features/viewers/countdown/Countdown.jsx
index 22e9201a1..f75cf1392 100644
--- a/client/src/features/viewers/countdown/Countdown.jsx
+++ b/client/src/features/viewers/countdown/Countdown.jsx
@@ -90,10 +90,10 @@ export default function Countdown(props) {
: formatTime(follow.timeEnd + delay, formatOptions);
return (
-
+
{follow === null ? (
-
+
Select an event to follow
{backstageEvents.length === 0 ? (
@@ -112,7 +112,7 @@ export default function Countdown(props) {
) : (
-
+
Time Now
diff --git a/client/src/features/viewers/countdown/Countdown.scss b/client/src/features/viewers/countdown/Countdown.scss
index ccaeeaf09..fb744551c 100644
--- a/client/src/features/viewers/countdown/Countdown.scss
+++ b/client/src/features/viewers/countdown/Countdown.scss
@@ -80,7 +80,7 @@
color: var(--accent-color-override, $accent-color);
background-color: var(--outdent-background-color-override, $viewer-outdent-bg-color);
padding: 1vh 2vw;
- border-radius: 1vw;
+ border-radius: $element-border-radius;
}
.status {
diff --git a/client/src/features/viewers/lower-thirds/LowerClean.scss b/client/src/features/viewers/lower-thirds/LowerClean.scss
index b32cca142..51bf1dfdb 100644
--- a/client/src/features/viewers/lower-thirds/LowerClean.scss
+++ b/client/src/features/viewers/lower-thirds/LowerClean.scss
@@ -10,7 +10,7 @@
.lower-container {
position: absolute;
padding: 1vh 2vh;
- border-radius: 1vh;
+ border-radius: 8px;
}
.message-container {
diff --git a/client/src/features/viewers/lower-thirds/LowerLines.scss b/client/src/features/viewers/lower-thirds/LowerLines.scss
index 72b2a8537..04792b5f9 100644
--- a/client/src/features/viewers/lower-thirds/LowerLines.scss
+++ b/client/src/features/viewers/lower-thirds/LowerLines.scss
@@ -15,7 +15,7 @@
display: flex;
flex-direction: column;
width: 45vw;
- border-radius: 0 1vh 1vh 0;
+ border-radius: 0 8px 8px 0;
}
.message-container {
diff --git a/client/src/features/viewers/picture-in-picture/Pip.jsx b/client/src/features/viewers/picture-in-picture/Pip.jsx
index a073233f0..5120bb86b 100644
--- a/client/src/features/viewers/picture-in-picture/Pip.jsx
+++ b/client/src/features/viewers/picture-in-picture/Pip.jsx
@@ -65,7 +65,7 @@ export default function Pip(props) {
const clock = formatTime(time.clock, formatOptions);
return (
-
+
{general.title}
diff --git a/client/src/features/viewers/picture-in-picture/Pip.scss b/client/src/features/viewers/picture-in-picture/Pip.scss
index fde38641a..10e2cbc22 100644
--- a/client/src/features/viewers/picture-in-picture/Pip.scss
+++ b/client/src/features/viewers/picture-in-picture/Pip.scss
@@ -27,7 +27,7 @@
.timer-container {
background-color: var(--outdent-background-color-override, $viewer-outdent-bg-color);
padding: 1vh 1vw;
- border-radius: 1vw;
+ border-radius: $element-border-radius;
.label {
font-size: 1.3vw;
@@ -126,11 +126,11 @@
.clock-container {
grid-area: time;
- border-radius: 0 0 1vw 1vw;
+ border-radius: 0 0 $element-border-radius $element-border-radius;
}
.timer-container {
grid-area: clck;
- border-radius: 1vw 1vw 0 0;
+ border-radius: $element-border-radius $element-border-radius 0 0;
}
}
diff --git a/client/src/features/viewers/public/Public.jsx b/client/src/features/viewers/public/Public.jsx
index 5cb49d01c..3a436f252 100644
--- a/client/src/features/viewers/public/Public.jsx
+++ b/client/src/features/viewers/public/Public.jsx
@@ -38,7 +38,7 @@ export default function Public(props) {
const clock = formatTime(time.clock, formatOptions);
return (
-
+
{general.title}
diff --git a/client/src/features/viewers/public/Public.scss b/client/src/features/viewers/public/Public.scss
index fb5fa3c38..f13abfa95 100644
--- a/client/src/features/viewers/public/Public.scss
+++ b/client/src/features/viewers/public/Public.scss
@@ -31,7 +31,7 @@
.today-container {
background-color: var(--outdent-background-color-override, $viewer-outdent-bg-color);
padding: 1vh 1vw;
- border-radius: 1vw;
+ border-radius: $element-border-radius;
.label {
font-size: 1.3vw;
@@ -50,7 +50,7 @@
}
.event {
- border-radius: 0 2vw 2vw 0;
+ border-radius: 0 $element-border-radius $element-border-radius 0;
margin-left: -1vw;
padding: 1vh 2vw;
overflow: hidden;
@@ -114,7 +114,7 @@
.clock-container {
grid-area: time;
- border-radius: 1vw;
+ border-radius: $element-border-radius;
}
.info {
diff --git a/client/src/features/viewers/studio/StudioClock.jsx b/client/src/features/viewers/studio/StudioClock.jsx
index 74688657e..74a899720 100644
--- a/client/src/features/viewers/studio/StudioClock.jsx
+++ b/client/src/features/viewers/studio/StudioClock.jsx
@@ -54,7 +54,7 @@ export default function StudioClock(props) {
const [, , secondsNow] = stringFromMillis(time.clock).split(':');
return (
-
+
{clock}
diff --git a/client/src/features/viewers/timer/Timer.jsx b/client/src/features/viewers/timer/Timer.jsx
index 2e5e8f1e2..b26e88d51 100644
--- a/client/src/features/viewers/timer/Timer.jsx
+++ b/client/src/features/viewers/timer/Timer.jsx
@@ -66,7 +66,10 @@ export default function Timer(props) {
};
return (
-
+
diff --git a/client/src/features/viewers/timer/Timer.module.scss b/client/src/features/viewers/timer/Timer.module.scss
deleted file mode 100644
index e69de29bb..000000000
diff --git a/client/src/features/viewers/timer/Timer.scss b/client/src/features/viewers/timer/Timer.scss
index 88948c4f0..28073c155 100644
--- a/client/src/features/viewers/timer/Timer.scss
+++ b/client/src/features/viewers/timer/Timer.scss
@@ -30,7 +30,7 @@
.event {
background-color: var(--outdent-background-color-override, $viewer-outdent-bg-color);
padding: 1vh 2vw;
- border-radius: 1vw;
+ border-radius: $element-border-radius;
max-width: 100%;
&.now {
diff --git a/client/src/index.scss b/client/src/index.scss
index f44154719..1888f9b34 100644
--- a/client/src/index.scss
+++ b/client/src/index.scss
@@ -3,7 +3,7 @@
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
- scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.01);
+ scrollbar-color: #2b2b2b rgba(255, 255, 255, 0.01);
scrollbar-width: thin;
}
diff --git a/client/src/theme/_main.scss b/client/src/theme/_main.scss
index 67dead90e..df9da6fa0 100644
--- a/client/src/theme/_main.scss
+++ b/client/src/theme/_main.scss
@@ -6,6 +6,7 @@ $bg-black-100: #070707;
$bg-black-200: #1a1a1a; // container borders
$bg-black-300: #1f1f1f; // container text
$bg-gray-1100: #232323; // container borders
+$bg-gray-1050: #242424; // container borders
$bg-gray-1000: #262626; // container borders
$bg-gray-950: #292929;
$bg-gray-900: #303030;
@@ -42,7 +43,7 @@ $opacity-disabled: 0.4;
$notes-color: #d69e2e;
$text-white: #fffffa;
-$text-gray-disabled: #999;
+$text-gray-disabled: #505050;
$header-gray: #ccc;
$label-gray: #aaa;
$clocks: #ddd;
@@ -64,11 +65,17 @@ $title-gray: #ddd;
$subtitle-gray: #aaa;
//////////////////////////////////// block elements
+$bg-container-l1: #202020;
+$bg-container-l2: #232323;
+$bg-container-l3: #2b2b2b;
+$border-l1: 1px solid $bg-gray-1000;
+$border-l3: 1px solid $bg-gray-900;
+
$block-delay-color: #ecc94b;
$delay-text: #d69e2e;
$block-delay-border: #d69e2e55;
$block-block-color: #805ad5;
-$block-border: 1px solid $bg-gray-900;
+$block-border: 1px solid $bg-gray-1100;
//////////////////////////////////// viewer cards
@mixin card-title {
diff --git a/client/src/theme/_mixins.scss b/client/src/theme/_mixins.scss
index bacbcfcfb..44f0b194c 100644
--- a/client/src/theme/_mixins.scss
+++ b/client/src/theme/_mixins.scss
@@ -9,13 +9,12 @@
}
@mixin second-container {
- background-color: $bg-gray-1100;
- border: 1px solid rgba(0, 0, 0, 0.05);
+ background-color: $bg-container-l2;
border-radius: 4px;
}
@mixin third-container {
- background-color: $bg-black-300;
+ background-color: $bg-gray-1100;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 2px;
}
diff --git a/client/src/theme/_viewerDefs.scss b/client/src/theme/_viewerDefs.scss
index 067dbab38..bb9da705e 100644
--- a/client/src/theme/_viewerDefs.scss
+++ b/client/src/theme/_viewerDefs.scss
@@ -7,8 +7,9 @@ $delay-color: $delay-text;
// Main Properties of a viewer
$viewer-background-color: $bg-black; // --background-color-override
$viewer-color: $title-white; // --color-override
-$viewer-outdent-bg-color: $bg-gray-1100; // --outdent-background-color-override
+$viewer-outdent-bg-color: $bg-container-l1; // --outdent-background-color-override
$viewer-overlay-bg-color: $bg-overlay;
+$element-border-radius: 8px;
// Properties related to timer
$timer-finished-color: $ontime-pink-variant;
diff --git a/server/cypress/integration/navigation.spec.js b/server/cypress/integration/navigation.spec.js
index b47ecf8de..fa90eed38 100644
--- a/server/cypress/integration/navigation.spec.js
+++ b/server/cypress/integration/navigation.spec.js
@@ -3,38 +3,37 @@ describe('validate routes', () => {
describe('viewer routes', () => {
it('default to stage timer', () => {
cy.visit('http://localhost:4001/');
+ cy.get('[data-testid="timer-view"]').should('exist');
cy.contains('Time Now');
});
- it('renders stage timer', () => {
+ it('renders stage timer routes', () => {
cy.visit('http://localhost:4001/timer');
+ cy.get('[data-testid="timer-view"]').should('exist');
cy.contains('Time Now');
- });
- it('renders presenter', () => {
cy.visit('http://localhost:4001/presenter');
+ cy.get('[data-testid="timer-view"]').should('exist');
cy.contains('Time Now');
- });
- it('renders speaker', () => {
cy.visit('http://localhost:4001/speaker');
+ cy.get('[data-testid="timer-view"]').should('exist');
cy.contains('Time Now');
- });
- it('renders backstage view /stage', () => {
cy.visit('http://localhost:4001/stage');
+ cy.get('[data-testid="timer-view"]').should('exist');
cy.contains('Time Now');
});
- it('renders backstage view /backstage', () => {
+ it('renders backstage routes', () => {
cy.visit('http://localhost:4001/backstage');
+ cy.get('[data-testid="backstage-view"]').should('exist');
cy.contains('Today');
cy.contains('Time Now');
cy.contains('Info');
- });
- it('renders backstage view /sm', () => {
cy.visit('http://localhost:4001/sm');
+ cy.get('[data-testid="backstage-view"]').should('exist');
cy.contains('Today');
cy.contains('Time Now');
cy.contains('Info');
@@ -42,6 +41,7 @@ describe('validate routes', () => {
it('renders public view', () => {
cy.visit('http://localhost:4001/public');
+ cy.get('[data-testid="public-view"]').should('exist');
cy.contains('Today');
cy.contains('Time Now');
cy.contains('Info');
@@ -49,8 +49,8 @@ describe('validate routes', () => {
it('renders pip view', () => {
cy.visit('http://localhost:4001/pip');
+ cy.get('[data-testid="pip-view"]').should('exist');
cy.contains('Today');
- cy.contains('Info');
});
it('renders lower third with no errors', () => {
@@ -60,16 +60,21 @@ describe('validate routes', () => {
it('renders studio clock', () => {
cy.visit('http://localhost:4001/studio');
+ cy.get('[data-testid="studio-view"]').should('exist');
cy.contains('ON AIR');
});
it('renders countdown selection', () => {
cy.visit('http://localhost:4001/countdown');
+ cy.get('[data-testid="countdown-view"]').should('exist');
+ cy.get('[data-testid="countdown-select"]').should('exist');
cy.contains('Select an event to follow');
});
it('renders countdown with event', () => {
cy.visit('http://localhost:4001/countdown?event=1');
+ cy.get('[data-testid="countdown-view"]').should('exist');
+ cy.get('[data-testid="countdown-event"]').should('exist');
cy.contains('Time Now');
cy.contains('Start Time');
cy.contains('End Time');
@@ -78,38 +83,30 @@ describe('validate routes', () => {
describe('clock view timer', () => {
it('renders base route', () => {
- // base route
cy.visit('http://localhost:4001/clock');
cy.get('[data-testid="clock-view"]').should('exist');
- // ontime fallsback to stage timer on errors, so we check for that
cy.get('.App').should('not.contain', 'Time Now');
});
});
describe('minimal timer and options', () => {
it('renders base route', () => {
- // base route
cy.visit('http://localhost:4001/minimal');
cy.get('[data-testid="minimal-timer"]').should('exist');
- // ontime fallsback to stage timer on errors, so we check for that
cy.get('.App').should('not.contain', 'Time Now');
});
it('renders with defined options', () => {
- // route with options
cy.visit(
'http://localhost:4001/minimal?font=arial=1&size=1.5&text=0f0&key=ff0&hideovertime=true&alignx=start&aligny=end&offsetx=100&offsety=-100&hidemessages=true'
);
cy.get('[data-testid="minimal-timer"]').should('exist');
- // ontime fallback to stage timer on errors, so we check for that
cy.get('.App').should('not.contain', 'Time Now');
});
it('hides nav on given option', () => {
- // route with options for no nav
cy.visit('http://localhost:4001/minimal?hidenav=true');
cy.get('[data-testid="minimal-timer"]').should('exist');
- // ontime fallback to stage timer on errors, so we check for that
cy.get('.App').should('not.contain', 'Time Now');
cy.get('[data-testid="nav-logo"]').should('not.exist');
});
@@ -118,49 +115,53 @@ describe('validate routes', () => {
describe('editor routes', () => {
it('app editor', () => {
cy.visit('http://localhost:4001/editor');
- cy.contains('Event List');
- cy.contains('Timer Control');
- cy.contains('Messages Control');
- cy.contains('Info');
+ cy.get('[data-testid="event-editor"]').should('exist');
+ cy.get('[data-testid="panel-event-list"]').should('exist');
+ cy.get('[data-testid="panel-timer-control"]').should('exist');
+ cy.get('[data-testid="panel-messages-control"]').should('exist');
+ cy.get('[data-testid="panel-info"]').should('exist');
});
it('self contained eventlist', () => {
cy.visit('http://localhost:4001/eventlist');
- cy.get('.App').should('contain', 'Event List');
- cy.get('.App').should('not.contain', 'Timer Control');
- cy.get('.App').should('not.contain', 'Messages Control');
- cy.get('.App').should('not.contain', 'Info');
+ cy.get('[data-testid="panel-event-list"]').should('exist');
+ cy.get('[data-testid="panel-timer-control"]').should('not.exist');
+ cy.get('[data-testid="panel-messages-control"]').should('not.exist');
+ cy.get('[data-testid="panel-info"]').should('not.exist');
});
it('self contained timercontrol', () => {
cy.visit('http://localhost:4001/timercontrol');
- cy.get('.App').should('not.contain', 'Event List');
- cy.get('.App').should('contain', 'Timer Control');
- cy.get('.App').should('not.contain', 'Messages Control');
- cy.get('.App').should('not.contain', 'Info');
+ cy.get('[data-testid="panel-event-list"]').should('not.exist');
+ cy.get('[data-testid="panel-timer-control"]').should('exist');
+ cy.get('[data-testid="panel-messages-control"]').should('not.exist');
+ cy.get('[data-testid="panel-info"]').should('not.exist');
});
it('self contained messagecontrol', () => {
cy.visit('http://localhost:4001/messagecontrol');
- cy.get('.App').should('not.contain', 'Event List');
- cy.get('.App').should('not.contain', 'Timer Control');
- cy.get('.App').should('contain', 'Messages Control');
- cy.get('.App').should('not.contain', 'Info');
+ cy.get('[data-testid="panel-event-list"]').should('not.exist');
+ cy.get('[data-testid="panel-timer-control"]').should('not.exist');
+ cy.get('[data-testid="panel-messages-control"]').should('exist');
+ cy.get('[data-testid="panel-info"]').should('not.exist');
});
it('self contained info', () => {
cy.visit('http://localhost:4001/info');
- cy.get('.App').should('not.contain', 'Event List');
- cy.get('.App').should('not.contain', 'Timer Control');
- cy.get('.App').should('not.contain', 'Messages Control');
- cy.get('.App').should('contain', 'Info');
+ cy.get('[data-testid="panel-event-list"]').should('not.exist');
+ cy.get('[data-testid="panel-timer-control"]').should('not.exist');
+ cy.get('[data-testid="panel-messages-control"]').should('not.exist');
+ cy.get('[data-testid="panel-info"]').should('exist');
});
});
it('table routes', () => {
cy.visit('http://localhost:4001/table');
cy.contains('Running Timer');
+ cy.get('[data-testid="cuesheet"]').should('exist');
cy.visit('http://localhost:4001/cuesheet');
cy.contains('Running Timer');
+ cy.get('[data-testid="cuesheet"]').should('exist');
cy.visit('http://localhost:4001/cuelist');
cy.contains('Running Timer');
+ cy.get('[data-testid="cuesheet"]').should('exist');
});
});