From 6371998eeab22f32725e8c21de79114747ac420b Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Wed, 22 Sep 2021 18:45:51 -0300 Subject: [PATCH 1/8] initial commit --- .../Board/Output/Output.container.js | 39 ++++++++++++++++++- .../Output/SymbolOutput/SymbolOutput.css | 5 +++ .../Board/Output/SymbolOutput/SymbolOutput.js | 39 ++++++++++++------- src/components/Board/Symbol/Symbol.js | 33 ++++++++++++---- 4 files changed, 95 insertions(+), 21 deletions(-) diff --git a/src/components/Board/Output/Output.container.js b/src/components/Board/Output/Output.container.js index e9676b403..298098912 100644 --- a/src/components/Board/Output/Output.container.js +++ b/src/components/Board/Output/Output.container.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import { injectIntl, intlShape } from 'react-intl'; import { connect } from 'react-redux'; import keycode from 'keycode'; +import shortid from 'shortid'; import messages from '../Board.messages'; import { showNotification } from '../../Notifications/Notifications.actions'; import { isAndroid } from '../../../cordova-util'; @@ -60,7 +61,8 @@ export class OutputContainer extends Component { } state = { - translatedOutput: [] + translatedOutput: [], + isLiveMode: false }; outputReducer(accumulator, currentValue) { @@ -225,6 +227,38 @@ export class OutputContainer extends Component { } }; + handleSwitchLiveMode = event => { + const { changeOutput } = this.props; + if (!this.state.isLiveMode) { + console.log(this.state.translatedOutput); + const tile = { + backgroundColor: 'rgb(255, 241, 118)', + id: shortid.generate(), + image: '', + label: '', + labelKey: '', + type: 'live' + }; + changeOutput([...this.state.translatedOutput, tile]); + } + this.setState({ + isLiveMode: !this.state.isLiveMode + }); + }; + + handleWriteSymbol = index => event => { + const { changeOutput, intl } = this.props; + const output = [...this.props.output]; + const newEl = { + ...output[index], + label: event.target.value + }; + output.splice(index, 1, newEl); + changeOutput(output); + //const translatedOutput = translateOutput(output, intl); + //this.setState({ translatedOutput: translatedOutput }); + }; + render() { const { output, navigationSettings } = this.props; @@ -238,10 +272,13 @@ export class OutputContainer extends Component { onRemoveClick={this.handleRemoveClick} onClick={this.handleOutputClick} onKeyDown={this.handleOutputKeyDown} + onSwitchLiveMode={this.handleSwitchLiveMode} symbols={this.state.translatedOutput} + isLiveMode={this.state.isLiveMode} tabIndex={tabIndex} navigationSettings={navigationSettings} phrase={this.handlePhraseToShare()} + onWriteSymbol={this.handleWriteSymbol} /> ); } diff --git a/src/components/Board/Output/SymbolOutput/SymbolOutput.css b/src/components/Board/Output/SymbolOutput/SymbolOutput.css index 674b64899..71724c503 100644 --- a/src/components/Board/Output/SymbolOutput/SymbolOutput.css +++ b/src/components/Board/Output/SymbolOutput/SymbolOutput.css @@ -27,3 +27,8 @@ top: -10px; right: -10px; } + +.SymbolOutput__right__btns { + display: flex; + flex-direction: column; +} diff --git a/src/components/Board/Output/SymbolOutput/SymbolOutput.js b/src/components/Board/Output/SymbolOutput/SymbolOutput.js index cc613226b..3fb2568ae 100644 --- a/src/components/Board/Output/SymbolOutput/SymbolOutput.js +++ b/src/components/Board/Output/SymbolOutput/SymbolOutput.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import ClearIcon from '@material-ui/icons/Clear'; import IconButton from '@material-ui/core/IconButton'; +import Switch from '@material-ui/core/Switch'; import Symbol from '../../Symbol'; import BackspaceButton from './BackspaceButton'; @@ -60,9 +61,12 @@ class SymbolOutput extends PureComponent { getPhraseToShare, onCopyClick, onRemoveClick, + onSwitchLiveMode, + onWriteSymbol, symbols, navigationSettings, phrase, + isLiveMode, ...other } = this.props; @@ -85,13 +89,15 @@ class SymbolOutput extends PureComponent { return (
- {symbols.map(({ image, label }, index) => ( + {symbols.map(({ image, label, type }, index) => (
); } diff --git a/src/components/Board/Symbol/Symbol.js b/src/components/Board/Symbol/Symbol.js index 7f53d1430..5bd0267eb 100644 --- a/src/components/Board/Symbol/Symbol.js +++ b/src/components/Board/Symbol/Symbol.js @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { isCordova } from '../../../cordova-util'; +import TextField from '@material-ui/core/TextField'; import { LABEL_POSITION_BELOW } from '../../Settings/Display/Display.constants'; import './Symbol.css'; @@ -15,11 +16,13 @@ const propTypes = { * Label to display */ label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired, - labelpos: PropTypes.string + labelpos: PropTypes.string, + type: PropTypes.string, + onWrite: PropTypes.func.isRequired }; function Symbol(props) { - const { className, label, labelpos, ...other } = props; + const { className, label, labelpos, type, onWrite, ...other } = props; // Cordova path cannot be absolute const image = @@ -31,17 +34,33 @@ function Symbol(props) { return (
- {props.labelpos === 'Above' && props.labelpos !== 'Hidden' && ( -
{label}
+ {props.type === 'live' && ( + )} + {props.type !== 'live' && + props.labelpos === 'Above' && + props.labelpos !== 'Hidden' && ( +
{label}
+ )} {image && (
)} - {props.labelpos === 'Below' && props.labelpos !== 'Hidden' && ( -
{label}
- )} + {props.type !== 'live' && + props.labelpos === 'Below' && + props.labelpos !== 'Hidden' && ( +
{label}
+ )}
); } From a2cac7ecfd0c93afe10b29d09a24dc1718e6d9ee Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Fri, 24 Sep 2021 16:29:03 -0300 Subject: [PATCH 2/8] wip --- .../Board/Output/Output.container.js | 77 +++++++++++-------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/src/components/Board/Output/Output.container.js b/src/components/Board/Output/Output.container.js index 298098912..3d7051373 100644 --- a/src/components/Board/Output/Output.container.js +++ b/src/components/Board/Output/Output.container.js @@ -151,25 +151,29 @@ export class OutputContainer extends Component { } } - async play() { - const outputFrames = this.groupOutputByType(); - - await this.asyncForEach(outputFrames, async frame => { - if (!frame[0].sound) { - const text = frame.reduce(this.outputReducer, ''); - await this.speakOutput(text); - } else { - await new Promise(resolve => { - this.asyncForEach(frame, async ({ sound }, index) => { - await this.playAudio(sound); - - if (frame.length - 1 === index) { - resolve(); - } + async play(liveText = '') { + if (liveText) { + await this.speakOutput(liveText); + } else { + const outputFrames = this.groupOutputByType(); + + await this.asyncForEach(outputFrames, async frame => { + if (!frame[0].sound) { + const text = frame.reduce(this.outputReducer, ''); + await this.speakOutput(text); + } else { + await new Promise(resolve => { + this.asyncForEach(frame, async ({ sound }, index) => { + await this.playAudio(sound); + + if (frame.length - 1 === index) { + resolve(); + } + }); }); - }); - } - }); + } + }); + } } handleBackspaceClick = () => { @@ -223,23 +227,32 @@ export class OutputContainer extends Component { handleOutputKeyDown = event => { if (event.keyCode === keycode('enter')) { - this.play(); + const targetEl = event.target; + if (targetEl.tagName.toLowerCase() === 'div') { + this.play(); + } else if (targetEl.tagName.toLowerCase() === 'textarea') { + this.play(event.target.value); + this.addLiveOutputTile(); + } } }; - handleSwitchLiveMode = event => { + addLiveOutputTile() { const { changeOutput } = this.props; + const tile = { + backgroundColor: 'rgb(255, 241, 118)', + id: shortid.generate(), + image: '', + label: '', + labelKey: '', + type: 'live' + }; + changeOutput([...this.state.translatedOutput, tile]); + } + + handleSwitchLiveMode = event => { if (!this.state.isLiveMode) { - console.log(this.state.translatedOutput); - const tile = { - backgroundColor: 'rgb(255, 241, 118)', - id: shortid.generate(), - image: '', - label: '', - labelKey: '', - type: 'live' - }; - changeOutput([...this.state.translatedOutput, tile]); + this.addLiveOutputTile(); } this.setState({ isLiveMode: !this.state.isLiveMode @@ -255,8 +268,8 @@ export class OutputContainer extends Component { }; output.splice(index, 1, newEl); changeOutput(output); - //const translatedOutput = translateOutput(output, intl); - //this.setState({ translatedOutput: translatedOutput }); + const translated = translateOutput(output, intl); + this.setState({ translatedOutput: translated }); }; render() { From 58be7814ab110a7658625d4df3be01cf22fb16aa Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Tue, 28 Sep 2021 09:27:44 -0300 Subject: [PATCH 3/8] wip --- src/components/Board/Board.actions.js | 7 +++++++ src/components/Board/Board.constants.js | 1 + src/components/Board/Board.reducer.js | 9 +++++++- .../Board/Output/Output.container.js | 21 ++++++++++--------- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/components/Board/Board.actions.js b/src/components/Board/Board.actions.js index 59dc11c04..fae699527 100644 --- a/src/components/Board/Board.actions.js +++ b/src/components/Board/Board.actions.js @@ -17,6 +17,7 @@ import { CLICK_SYMBOL, CLICK_OUTPUT, CHANGE_OUTPUT, + CHANGE_LIVE_MODE, REPLACE_BOARD, HISTORY_REMOVE_BOARD, UNMARK_BOARD, @@ -186,6 +187,12 @@ export function changeOutput(output) { }; } +export function changeLiveMode() { + return { + type: CHANGE_LIVE_MODE + }; +} + export function getApiMyBoardsSuccess(boards) { return { type: GET_API_MY_BOARDS_SUCCESS, diff --git a/src/components/Board/Board.constants.js b/src/components/Board/Board.constants.js index 003b2a8b7..6485712d0 100644 --- a/src/components/Board/Board.constants.js +++ b/src/components/Board/Board.constants.js @@ -15,6 +15,7 @@ export const FOCUS_TILE = 'cboard/Board/FOCUS_TILE'; export const CLICK_SYMBOL = 'cboard/Board/CLICK_SYMBOL'; export const CLICK_OUTPUT = 'cboard/Board/CLICK_OUTPUT'; export const CHANGE_OUTPUT = 'cboard/Board/CHANGE_OUTPUT'; +export const CHANGE_LIVE_MODE = 'cboard/Board/CHANGE_LIVE_MODE'; export const HISTORY_REMOVE_BOARD = 'cboard/Board/HISTORY_REMOVE_BOARD'; export const UNMARK_BOARD = 'cboard/Board/UNMARK_BOARD'; export const CREATE_API_BOARD_SUCCESS = 'cboard/Board/CREATE_API_BOARD_SUCCESS'; diff --git a/src/components/Board/Board.reducer.js b/src/components/Board/Board.reducer.js index b2a0b361c..338cee025 100644 --- a/src/components/Board/Board.reducer.js +++ b/src/components/Board/Board.reducer.js @@ -20,6 +20,7 @@ import { REPLACE_BOARD, HISTORY_REMOVE_BOARD, UNMARK_BOARD, + CHANGE_LIVE_MODE, CREATE_API_BOARD_SUCCESS, CREATE_API_BOARD_FAILURE, CREATE_API_BOARD_STARTED, @@ -46,7 +47,8 @@ const initialState = { navHistory: [], isFetching: false, images: [], - isFixed: false + isFixed: false, + isLiveMode: false }; function reconcileBoards(localBoard, remoteBoard) { @@ -286,6 +288,11 @@ function boardReducer(state = initialState, action) { ...state, output: [...action.output] }; + case CHANGE_LIVE_MODE: + return { + ...state, + output: !state.isLiveMode + }; case CREATE_API_BOARD_SUCCESS: const creadBoards = [...state.boards]; for (let i = 0; i < creadBoards.length; i++) { diff --git a/src/components/Board/Output/Output.container.js b/src/components/Board/Output/Output.container.js index 3d7051373..e875ba6de 100644 --- a/src/components/Board/Output/Output.container.js +++ b/src/components/Board/Output/Output.container.js @@ -13,7 +13,7 @@ import { speak } from '../../../providers/SpeechProvider/SpeechProvider.actions'; -import { changeOutput, clickOutput } from '../Board.actions'; +import { changeOutput, clickOutput, changeLiveMode } from '../Board.actions'; import SymbolOutput from './SymbolOutput'; function translateOutput(output, intl) { @@ -61,8 +61,7 @@ export class OutputContainer extends Component { } state = { - translatedOutput: [], - isLiveMode: false + translatedOutput: [] }; outputReducer(accumulator, currentValue) { @@ -251,12 +250,12 @@ export class OutputContainer extends Component { } handleSwitchLiveMode = event => { - if (!this.state.isLiveMode) { + const { changeLiveMode, isLiveMode } = this.props; + + if (!isLiveMode) { this.addLiveOutputTile(); } - this.setState({ - isLiveMode: !this.state.isLiveMode - }); + changeLiveMode(); }; handleWriteSymbol = index => event => { @@ -273,7 +272,7 @@ export class OutputContainer extends Component { }; render() { - const { output, navigationSettings } = this.props; + const { output, navigationSettings, isLiveMode } = this.props; const tabIndex = output.length ? '0' : '-1'; @@ -287,7 +286,7 @@ export class OutputContainer extends Component { onKeyDown={this.handleOutputKeyDown} onSwitchLiveMode={this.handleSwitchLiveMode} symbols={this.state.translatedOutput} - isLiveMode={this.state.isLiveMode} + isLiveMode={isLiveMode} tabIndex={tabIndex} navigationSettings={navigationSettings} phrase={this.handlePhraseToShare()} @@ -300,6 +299,7 @@ export class OutputContainer extends Component { const mapStateToProps = ({ board, app }) => { return { output: board.output, + isLiveMode: board.isLiveMode, navigationSettings: app.navigationSettings }; }; @@ -309,7 +309,8 @@ const mapDispatchToProps = { changeOutput, clickOutput, speak, - showNotification + showNotification, + changeLiveMode }; export default connect( From d740cde8534f7746e0907d7738713d887f983b64 Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Tue, 28 Sep 2021 16:45:52 -0300 Subject: [PATCH 4/8] wip --- src/components/Board/Board.container.js | 21 ++++++++++++++++++--- src/components/Board/Board.reducer.js | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/components/Board/Board.container.js b/src/components/Board/Board.container.js index 99bdc40a5..86c7a4922 100644 --- a/src/components/Board/Board.container.js +++ b/src/components/Board/Board.container.js @@ -170,7 +170,8 @@ export class BoardContainer extends Component { downloadImages: PropTypes.func, lang: PropTypes.string, isRootBoardTourEnabled: PropTypes.bool, - disableTour: PropTypes.func + disableTour: PropTypes.func, + isLiveMode: PropTypes.bool }; state = { @@ -815,7 +816,8 @@ export class BoardContainer extends Component { intl, boards, showNotification, - navigationSettings + navigationSettings, + isLiveMode } = this.props; const hasAction = tile.action && tile.action.startsWith('+'); @@ -846,9 +848,21 @@ export class BoardContainer extends Component { showNotification(intl.formatMessage(messages.boardMissed)); } } else { - changeOutput([...this.props.output, tile]); clickSymbol(tile.label); say(); + if (isLiveMode) { + const liveTile = { + backgroundColor: 'rgb(255, 241, 118)', + id: shortid.generate(), + image: '', + label: '', + labelKey: '', + type: 'live' + }; + changeOutput([...this.props.output, tile, liveTile]); + } else { + changeOutput([...this.props.output, tile]); + } } }; @@ -1493,6 +1507,7 @@ const mapStateToProps = ({ board: board.boards.find(board => board.id === activeBoardId), boards: board.boards, output: board.output, + isLiveMode: board.isLiveMode, scannerSettings: scanner, navHistory: board.navHistory, displaySettings, diff --git a/src/components/Board/Board.reducer.js b/src/components/Board/Board.reducer.js index 338cee025..9a31733b0 100644 --- a/src/components/Board/Board.reducer.js +++ b/src/components/Board/Board.reducer.js @@ -291,7 +291,7 @@ function boardReducer(state = initialState, action) { case CHANGE_LIVE_MODE: return { ...state, - output: !state.isLiveMode + isLiveMode: !state.isLiveMode }; case CREATE_API_BOARD_SUCCESS: const creadBoards = [...state.boards]; From 4d153ab5601561c61ad760893d691ea75376fcc0 Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Fri, 1 Oct 2021 00:23:51 -0300 Subject: [PATCH 5/8] wip --- src/components/Board/Board.messages.js | 4 +++ .../Board/Output/SymbolOutput/SymbolOutput.js | 33 ++++++++++++------- src/components/Board/Symbol/Symbol.js | 1 + 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/components/Board/Board.messages.js b/src/components/Board/Board.messages.js index c47d277e7..3ac3208b8 100644 --- a/src/components/Board/Board.messages.js +++ b/src/components/Board/Board.messages.js @@ -186,5 +186,9 @@ export default defineMessages({ walkthroughNext: { id: 'cboard.components.Board.walkthroughNext', defaultMessage: 'Next' + }, + live: { + id: 'cboard.components.Board.live', + defaultMessage: 'LIVE' } }); diff --git a/src/components/Board/Output/SymbolOutput/SymbolOutput.js b/src/components/Board/Output/SymbolOutput/SymbolOutput.js index 3fb2568ae..e4e070321 100644 --- a/src/components/Board/Output/SymbolOutput/SymbolOutput.js +++ b/src/components/Board/Output/SymbolOutput/SymbolOutput.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import ClearIcon from '@material-ui/icons/Clear'; import IconButton from '@material-ui/core/IconButton'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Switch from '@material-ui/core/Switch'; import Symbol from '../../Symbol'; @@ -127,11 +128,27 @@ class SymbolOutput extends PureComponent { hidden={!symbols.length} /> )} + {!navigationSettings.removeOutputActive && ( +
); diff --git a/src/components/Board/Symbol/Symbol.js b/src/components/Board/Symbol/Symbol.js index 5bd0267eb..64612cf27 100644 --- a/src/components/Board/Symbol/Symbol.js +++ b/src/components/Board/Symbol/Symbol.js @@ -38,6 +38,7 @@ function Symbol(props) { Date: Fri, 8 Oct 2021 12:40:19 -0300 Subject: [PATCH 6/8] wip --- src/components/App/App.reducer.js | 3 +- .../Output/SymbolOutput/SymbolOutput.css | 1 + .../Board/Output/SymbolOutput/SymbolOutput.js | 28 ++++++++++--------- .../Navigation/Navigation.component.js | 24 ++++++++++++++++ .../Navigation/Navigation.messages.js | 9 ++++++ 5 files changed, 51 insertions(+), 14 deletions(-) diff --git a/src/components/App/App.reducer.js b/src/components/App/App.reducer.js index d2db71f0f..8008d03f0 100644 --- a/src/components/App/App.reducer.js +++ b/src/components/App/App.reducer.js @@ -40,7 +40,8 @@ const initialState = { caBackButtonActive: false, quickUnlockActive: false, removeOutputActive: false, - vocalizeFolders: false + vocalizeFolders: false, + liveMode: false }, userData: {} }; diff --git a/src/components/Board/Output/SymbolOutput/SymbolOutput.css b/src/components/Board/Output/SymbolOutput/SymbolOutput.css index 71724c503..fb782a2fb 100644 --- a/src/components/Board/Output/SymbolOutput/SymbolOutput.css +++ b/src/components/Board/Output/SymbolOutput/SymbolOutput.css @@ -31,4 +31,5 @@ .SymbolOutput__right__btns { display: flex; flex-direction: column; + justify-content: center; } diff --git a/src/components/Board/Output/SymbolOutput/SymbolOutput.js b/src/components/Board/Output/SymbolOutput/SymbolOutput.js index e4e070321..cc95a354d 100644 --- a/src/components/Board/Output/SymbolOutput/SymbolOutput.js +++ b/src/components/Board/Output/SymbolOutput/SymbolOutput.js @@ -137,19 +137,21 @@ class SymbolOutput extends PureComponent { /> )}
- - } - label={intl.formatMessage(messages.live)} - labelPlacement="bottom" - /> + {navigationSettings.liveMode && ( + + } + label={intl.formatMessage(messages.live)} + labelPlacement="bottom" + /> + )} { + this.setState({ + liveMode: !this.state.liveMode + }); + }; + onSubmit = () => { this.props.updateNavigationSettings(this.state); }; @@ -168,6 +174,24 @@ class Navigation extends React.Component { + + + } + secondary={ + + } + /> + + + + diff --git a/src/components/Settings/Navigation/Navigation.messages.js b/src/components/Settings/Navigation/Navigation.messages.js index a4faf3394..b4d5c8fda 100644 --- a/src/components/Settings/Navigation/Navigation.messages.js +++ b/src/components/Settings/Navigation/Navigation.messages.js @@ -45,5 +45,14 @@ export default defineMessages({ vocalizeFoldersSecondary: { id: 'cboard.components.Settings.Navigation.vocalizeFoldersSecondary', defaultMessage: "Reads a folder's name out loud when clicked" + }, + showLiveMode: { + id: 'cboard.components.Settings.Navigation.showLiveMode', + defaultMessage: 'Use the Live Mode' + }, + showLiveModeSecondary: { + id: 'cboard.components.Settings.Navigation.showLiveModeSecondary', + defaultMessage: + 'Live mode allows you to write text directly into the output bar and quickly play the sound. It is intended for users that can write.' } }); From c9f595c950a876aa6cbbce9b24c2bdc3fc26e7cb Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Sun, 10 Oct 2021 14:13:30 -0300 Subject: [PATCH 7/8] initial version --- src/components/Board/Output/SymbolOutput/SymbolOutput.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Board/Output/SymbolOutput/SymbolOutput.css b/src/components/Board/Output/SymbolOutput/SymbolOutput.css index fb782a2fb..04eea7d73 100644 --- a/src/components/Board/Output/SymbolOutput/SymbolOutput.css +++ b/src/components/Board/Output/SymbolOutput/SymbolOutput.css @@ -31,5 +31,8 @@ .SymbolOutput__right__btns { display: flex; flex-direction: column; + flex-wrap: wrap-reverse; + height: 100%; + overflow: visible; justify-content: center; } From 696c673f321de16eda387272c45c14d179b6b9e4 Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Tue, 12 Oct 2021 19:39:14 -0300 Subject: [PATCH 8/8] fix tests --- .../App/__tests__/App.reducer.test.js | 2 + .../Output/SymbolOutput/SymbolOutput.test.js | 3 +- .../Board/__tests__/Board.reducer.test.js | 5 +- .../Notifications.component.test.js.snap | 5 -- .../Export/__snapshots__/Export.test.js.snap | 2 + .../Import/__snapshots__/Import.test.js.snap | 6 ++ .../__snapshots__/Navigation.test.js.snap | 78 +++++++++++++++++++ 7 files changed, 93 insertions(+), 8 deletions(-) diff --git a/src/components/App/__tests__/App.reducer.test.js b/src/components/App/__tests__/App.reducer.test.js index 88c0e478e..0b4a4e967 100644 --- a/src/components/App/__tests__/App.reducer.test.js +++ b/src/components/App/__tests__/App.reducer.test.js @@ -37,6 +37,7 @@ describe('reducer', () => { navigationSettings: { active: false, caBackButtonActive: false, + liveMode: false, shareShowActive: false, quickUnlockActive: false, removeOutputActive: false, @@ -58,6 +59,7 @@ describe('reducer', () => { navigationSettings: { active: false, caBackButtonActive: false, + liveMode: false, shareShowActive: false, quickUnlockActive: false, removeOutputActive: false, diff --git a/src/components/Board/Output/SymbolOutput/SymbolOutput.test.js b/src/components/Board/Output/SymbolOutput/SymbolOutput.test.js index d32664e49..bb751cc25 100644 --- a/src/components/Board/Output/SymbolOutput/SymbolOutput.test.js +++ b/src/components/Board/Output/SymbolOutput/SymbolOutput.test.js @@ -15,7 +15,8 @@ const props = { quickUnlockActive: false, removeOutputActive: false }, - onRemoveClick: jest.fn() + onRemoveClick: jest.fn(), + onWriteSymbol: jest.fn() }; describe('SymbolOutput tests', () => { diff --git a/src/components/Board/__tests__/Board.reducer.test.js b/src/components/Board/__tests__/Board.reducer.test.js index 898f5eff4..e706d97e7 100644 --- a/src/components/Board/__tests__/Board.reducer.test.js +++ b/src/components/Board/__tests__/Board.reducer.test.js @@ -51,7 +51,8 @@ const initialState = { navHistory: [], isFetching: false, isFixed: false, - images: [] + images: [], + isLiveMode: false }; describe('reducer', () => { @@ -523,7 +524,7 @@ describe('reducer', () => { boardReducer( { ...initialState, - navHistory: ['123', '456','789'], + navHistory: ['123', '456', '789'], activeBoardId: '789' }, toRootBoard diff --git a/src/components/Notifications/__tests__/__snapshots__/Notifications.component.test.js.snap b/src/components/Notifications/__tests__/__snapshots__/Notifications.component.test.js.snap index 3467624b5..23d7b3acf 100644 --- a/src/components/Notifications/__tests__/__snapshots__/Notifications.component.test.js.snap +++ b/src/components/Notifications/__tests__/__snapshots__/Notifications.component.test.js.snap @@ -8,11 +8,6 @@ exports[`Notifications tests default renderer 1`] = ` "variant": "elevation", } } - TransitionProps={ - Object { - "onExited": [Function], - } - } autoHideDuration={5000} message={ Cboard , "link": OpenBoard diff --git a/src/components/Settings/Import/__snapshots__/Import.test.js.snap b/src/components/Settings/Import/__snapshots__/Import.test.js.snap index 82c80fbce..2a39c7c29 100644 --- a/src/components/Settings/Import/__snapshots__/Import.test.js.snap +++ b/src/components/Settings/Import/__snapshots__/Import.test.js.snap @@ -35,12 +35,14 @@ exports[`Import tests default renderer 1`] = ` Object { "cboardLink": Cboard , "link": OpenBoard @@ -125,12 +127,14 @@ exports[`Import tests loading behavior 1`] = ` Object { "cboardLink": Cboard , "link": OpenBoard @@ -215,12 +219,14 @@ exports[`Import tests loading behavior 2`] = ` Object { "cboardLink": Cboard , "link": OpenBoard diff --git a/src/components/Settings/Navigation/__snapshots__/Navigation.test.js.snap b/src/components/Settings/Navigation/__snapshots__/Navigation.test.js.snap index 55994d5c3..f1d445d10 100644 --- a/src/components/Settings/Navigation/__snapshots__/Navigation.test.js.snap +++ b/src/components/Settings/Navigation/__snapshots__/Navigation.test.js.snap @@ -144,6 +144,32 @@ exports[`Navigation tests default renderer 1`] = ` /> + + + + + + } + secondary={ + + } + /> + + + + @@ -294,6 +320,32 @@ exports[`Navigation tests switchs behavior 1`] = ` /> + + + + + + } + secondary={ + + } + /> + + + + @@ -444,6 +496,32 @@ exports[`Navigation tests switchs behavior 2`] = ` /> + + + + + + } + secondary={ + + } + /> + + + +