Skip to content

Commit 411d877

Browse files
committed
[grid] Fixing warnings for UI tests
1 parent 6c2e844 commit 411d877

File tree

6 files changed

+34
-16
lines changed

6 files changed

+34
-16
lines changed

‎javascript/grid-ui/src/components/Node/Node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Node extends React.Component<NodeProps, {}> {
7070
<CardContent className={classes.paddingContent}>
7171
<Grid
7272
container
73-
justify='space-between'
73+
justifyContent="space-between"
7474
spacing={1}
7575
>
7676
<Grid item xs={10}>

‎javascript/grid-ui/src/components/Node/NodeLoad.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
import {
19-
Box,
20-
Grid,
21-
Typography
22-
} from '@material-ui/core'
18+
import { Box, Grid, Typography } from '@material-ui/core'
2319
import React, { ReactNode } from 'react'
2420
import NodeInfo from '../../models/node-info'
2521
import LinearProgress, { LinearProgressProps } from '@material-ui/core/LinearProgress'
@@ -51,7 +47,7 @@ class NodeLoad extends React.Component<{ node: NodeInfo }, {}> {
5147
<Grid item xs={12}>
5248
<Grid
5349
container
54-
justify='space-between'
50+
justifyContent="space-between"
5551
spacing={2}
5652
>
5753
<Grid item xs={3}>

‎javascript/grid-ui/src/components/Node/Stereotypes.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class Stereotypes extends React.Component<StereotypesProps, {}> {
5757
return (
5858
<Grid item key={index}>
5959
<Grid container alignItems="center" spacing={1}>
60-
<Tooltip title={JSON.stringify(slotStereotype.rawData.stereotype)}>
60+
<Tooltip
61+
title={JSON.stringify(slotStereotype.rawData.stereotype) ?? ''}>
6162
<Badge badgeContent={slotStereotype.slotCount} color={'primary'}
6263
className={classes.boxStyle}>
6364
<Grid item className={classes.browserVersion}>

‎javascript/grid-ui/src/components/RunningSessions/RunningSessions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ function EnhancedTableHead (props: EnhancedTableProps): JSX.Element {
182182
{headCells.map((headCell) => (
183183
<TableCell
184184
key={headCell.id}
185-
align='left'
186-
padding='default'
185+
align="left"
186+
padding="normal"
187187
sortDirection={orderBy === headCell.id ? order : false}
188188
>
189189
<TableSortLabel

‎javascript/grid-ui/src/tests/components/NavBar.test.tsx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ it('renders menu options names', () => {
2525
const history = createMemoryHistory()
2626
render(
2727
<Router history={history}>
28-
<NavBar />
28+
<NavBar open={true}
29+
maxSession={10}
30+
sessionCount={0}
31+
nodeCount={1}
32+
sessionQueueSize={0}/>
2933
</Router>
3034
)
3135
expect(screen.getByText('Sessions')).toBeInTheDocument()
@@ -39,7 +43,11 @@ it('overall concurrency is not rendered on root path with a single node',
3943
history.push('/')
4044
render(
4145
<Router history={history}>
42-
<NavBar open maxSession={0} sessionCount={0} nodeCount={1} />
46+
<NavBar open={true}
47+
maxSession={0}
48+
sessionCount={0}
49+
nodeCount={1}
50+
sessionQueueSize={0}/>
4351
</Router>
4452
)
4553
expect(screen.queryByTestId('overall-concurrency')).not.toBeInTheDocument()
@@ -51,7 +59,11 @@ it('overall concurrency is rendered on root path with more than one node',
5159
history.push('/')
5260
render(
5361
<Router history={history}>
54-
<NavBar open maxSession={0} sessionCount={0} nodeCount={2} />
62+
<NavBar open={true}
63+
maxSession={0}
64+
sessionCount={0}
65+
nodeCount={2}
66+
sessionQueueSize={0}/>
5567
</Router>
5668
)
5769
expect(screen.getByTestId('overall-concurrency')).toBeInTheDocument()
@@ -63,7 +75,11 @@ it('overall concurrency is rendered on root path with more than one node',
6375
history.push('/')
6476
render(
6577
<Router history={history}>
66-
<NavBar open maxSession={0} sessionCount={0} nodeCount={2} />
78+
<NavBar open={true}
79+
maxSession={0}
80+
sessionCount={0}
81+
nodeCount={2}
82+
sessionQueueSize={0}/>
6783
</Router>
6884
)
6985
expect(screen.getByTestId('overall-concurrency')).toBeInTheDocument()
@@ -75,7 +91,11 @@ it('overall concurrency is rendered on a path different than and one node',
7591
history.push('/sessions')
7692
render(
7793
<Router history={history}>
78-
<NavBar open maxSession={0} sessionCount={0} nodeCount={1} />
94+
<NavBar open={true}
95+
maxSession={0}
96+
sessionCount={0}
97+
nodeCount={1}
98+
sessionQueueSize={0}/>
7999
</Router>
80100
)
81101
expect(screen.getByTestId('overall-concurrency')).toBeInTheDocument()

‎javascript/grid-ui/src/tests/components/Node.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ const slotStereotype: StereotypeInfo = {
3333
browserName: 'chrome',
3434
browserVersion: 'v. 88',
3535
slotCount: 12,
36-
rawData: []
36+
rawData: ['stereotype: {"browserName": "chrome"}'],
37+
platformName: 'macos'
3738
}
3839

3940
const node: NodeInfo = {

0 commit comments

Comments
 (0)