Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const wargamesReducer = (state = initialState, action: WargameActionTypes
switch (action.type) {
case ActionConstant.ALL_WARGAME_NAMES_SAVED:
const originalList = action.payload || []
const anyList = originalList as any[] || []
const anyList = originalList as any[]
// NOTE: we don't know why, but some SQLite files
// can get corrupted, and are empty. Filter them
// out, since they're of no values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ SchemaEditor.prototype.updateSchema = function (schema) {
var minMaxConsistenceValidator = function (schema, value, path) {
var errors = []
if (value !== null && (value.type === 'integer' || value.type === 'number')) {
if (typeof value.minimum !== 'undefined' && typeof value.minimum !== 'undefined' && value.minimum > value.maximum) {
if (typeof value.minimum !== 'undefined' && typeof value.maximum !== 'undefined' && value.minimum > value.maximum) {
errors.push({
path: path,
property: 'maximum',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MetaSchema extends Component {
this.setEditorValue(JSON.stringify(this.props.value, null, 2))
}

componentWillRecivedProps ({ value }) {
componentWillReceiveProps ({ value }) {
this.setEditorValue(JSON.stringify(value, null, 2))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as messageTypesApi from '../../../api/messageTypes_api'
import { messageTypesReducer } from '../../../ActionsAndReducers/dbMessageTypes/messageTypes_Reducer'
import machineryFailure from '../../../Schemas/machinery_failure.json'
import * as ActionConstant from '@serge/config'
import { ADMIN_ROUTE, MESSAGE_TEMPLATE_ROUTE } from '../../../consts'
import { MESSAGE_TEMPLATE_ROUTE } from '../../../consts'

const mockStore = configureStore([thunk])

Expand Down
3 changes: 2 additions & 1 deletion packages/client/src/Views/ExportPrint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { setCurrentViewFromURI } from '../ActionsAndReducers/setCurrentViewFromU
const ExportPrint = ({ exportItem, notFound }) => {
if (!exportItem) {
notFound()
return
}

return (
Expand All @@ -16,7 +17,7 @@ const ExportPrint = ({ exportItem, notFound }) => {
<h4>Wargame: {exportItem.wargame}</h4>
<h4>Type: {exportItem.type}</h4>
</section>
{exportItem.data.map((data, pageIndex) => (
{ exportItem.data.map((data, pageIndex) => (
<section key={pageIndex}>
<h2>{exportItem.wargame}</h2>
<h4>{data.title}</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Modal from 'react-modal'
import localStyles from './styles.module.scss'
import { Props } from './types/props'

/* Render component */
/* Render component (dummy change) */
export const CustomDialog: React.FC<Props> = (props) => {
const {
isOpen,
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/local/hex-grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ export const HexGrid: React.FC<{}> = () => {

return <>
{ /* - show number of visible cells */}
{ viewport &&
{/* { viewport &&
<Marker
key={'num_vis_cells'}
position={viewport.getCenter()}
Expand All @@ -774,7 +774,7 @@ export const HexGrid: React.FC<{}> = () => {
iconSize: [30, 20]
})}
/>
}
} */}

{ /* POLY BINS */}
{ /* <LayerGroup key={'poly_bounds'} >{viewport && polyBins3 && polyBins3.map((bin: PolyBin3, index: number) => (
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/local/mapping/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const Mapping: React.FC<PropTypes> = ({
const [atlanticCells, setAtlanticCells] = useState<GeoJSON.FeatureCollection>()
const [lastAtlanticCells, setLastAtlanticCells] = useState<GeoJSON.FeatureCollection>()
const [polygonAreas, setPolygonAreas] = useState<FeatureCollection<Geometry, GeoJsonProperties> | undefined>(undefined)
const [cellLabelStyle, setCellLabelStyle] = useState<CellLabelStyle>(CellLabelStyle.H3_LABELS)
const [cellLabelStyle, setCellLabelStyle] = useState<CellLabelStyle>(CellLabelStyle.CTR_LABELS)
const [mappingConstraintState, setMappingConstraintState] = useState<MappingConstraints>(mappingConstraints)
const [viewAsUmpire, setViewAsUmpire] = useState<boolean>(isUmpire)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ const deconstructArr = (pair: Array<any>): React.ReactFragment => {
<p className={styles['detail-rows']}>
{pair[1].map((item: Record<any, any>, key: number) => {
return (
<p key={key} className={styles['detail-row']}>
<span key={key} className={styles['detail-row']}>
{deconstructObj(item)}
</p>
</span>
)
})}
</p>
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/temp/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"preset": "jest-puppeteer"
module.exports = {
"preset" : "jest-puppeteer"
}
7 changes: 0 additions & 7 deletions packages/e2e/temp/playerUi.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import puppeteer from 'puppeteer'
import { DEFAULT_SERVER } from '../consts'

let browser
let page
Expand All @@ -11,12 +10,6 @@ let pageRedRecon
let pageBlueCo
let pageBlueArtillery

const backspace = async (qty) => {
for (let i = 0; i < qty; i++) {
await page.keyboard.press('Backspace')
}
}

beforeAll(async () => {
// launch browser
browser = await puppeteer.launch({
Expand Down
6 changes: 0 additions & 6 deletions packages/e2e/temp/welcomeScreen.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ import { DEFAULT_SERVER } from '../consts'
let browser
let page

const backspace = async (qty) => {
for (let i = 0; i < qty; i++) {
await page.keyboard.press('Backspace')
}
}

beforeAll(async () => {
// launch browser
browser = await puppeteer.launch({
Expand Down