Skip to content

Commit

Permalink
Merge branch 'NodeLabelPageTest'
Browse files Browse the repository at this point in the history
  • Loading branch information
gordom6 committed Nov 19, 2020
2 parents 86cad80 + 8c3946d commit 57dc22a
Show file tree
Hide file tree
Showing 19 changed files with 62,159 additions and 62,293 deletions.
2 changes: 1 addition & 1 deletion gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ts-loader": "^8.0.4",
"tsconfig-paths-webpack-plugin": "^3.3.0",
"tslint": "^6.1.3",
"typescript": "^4.0.3",
"typescript": "4.0.5",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
Expand Down
6 changes: 4 additions & 2 deletions gui/src/kg/components/kg/search/KgSearchResultsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ export const KgSearchResultsTable: React.FunctionComponent<{
return sourceIds
? sourceIds
.split("|")
.map((sourceId) => resolveSourceId({allSources, sourceId}))
.map((source, sourceIndex) => (
.map((sourceId: string) =>
resolveSourceId({allSources, sourceId})
)
.map((source: KgSource, sourceIndex: number) => (
<span data-cy={`source-${sourceIndex}`} key={source.id}>
<KgSourcePill
idOnly={true}
Expand Down
2 changes: 1 addition & 1 deletion gui/src/shared/components/kg/node/KgNodeLabelViews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const KgNodeLabelViews: React.FunctionComponent<{
</Grid>
<Grid item container spacing={4}>
<Grid item xs={10}>
<h1 data-cy="node-title">Node label: {nodeLabel.nodeLabel}</h1>
<h1 data-cy="node-label-title">Node label: {nodeLabel.nodeLabel}</h1>
<TabRouteSwitch tabRoutes={Object.values(tabRoutes)} />
</Grid>
<Grid item xs={2}>
Expand Down
4 changes: 2 additions & 2 deletions gui/src/shared/components/kg/node/KgNodeSourcesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export const KgNodeSourcesCard: React.FunctionComponent<{
<Card>
<CardHeader title="Source(s)"></CardHeader>
<CardContent>
<List>
<List data-cy="node-sources">
{nodeSources.map((source) => (
<ListItemText data-cy="node-source" key={source.id}>
<ListItemText data-cy={`node-source-${source.id}`} key={source.id}>
<KgSourcePill
onClick={() => {
history.push(
Expand Down
12 changes: 7 additions & 5 deletions gui/src/shared/components/kg/node/KgNodesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export const KgNodesTable: React.FunctionComponent<{
sort: true,
customBodyRender(labels, tableMeta) {
return (
<List>
{labels.split("|").map((label) => (
<List data-cy="node-labels">
{labels.split("|").map((label: string) => (
<ListItem key={label}>
<ListItemText>
<Link
Expand Down Expand Up @@ -104,8 +104,10 @@ export const KgNodesTable: React.FunctionComponent<{
return sourceIds
? sourceIds
.split("|")
.map((sourceId) => resolveSourceId({allSources, sourceId}))
.map((source, sourceIndex) => (
.map((sourceId: string) =>
resolveSourceId({allSources, sourceId})
)
.map((source: KgSource, sourceIndex: number) => (
<span data-cy={`source-${sourceIndex}`} key={source.id}>
<KgSourcePill
onClick={() => {
Expand Down Expand Up @@ -153,7 +155,7 @@ export const KgNodesTable: React.FunctionComponent<{
search: false,
selectableRows: "none",
setRowProps(_, rowIndex) {
return {"data-cy": "node-" + rowIndex};
return {"data-cy": "node-row-" + rowIndex};
},
}}
title={""}
Expand Down
Loading

0 comments on commit 57dc22a

Please sign in to comment.