Skip to content

Commit 3333ac7

Browse files
committed
Fix unit test data
1 parent 2e0dc87 commit 3333ac7

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

tests/unit/components/cylc/table/table.data.js

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,29 @@ import TaskState from '@/model/TaskState.model'
1818
import JobState from '@/model/JobState.model'
1919
import { Tokens } from '@/utils/uid'
2020

21-
const BASE_TOKENS = new Tokens('~cylc/workflow//1')
21+
const tk = {
22+
taskA: new Tokens('~cylc/workflow//20000101T0000Z/taskA'),
23+
taskB: new Tokens('~cylc/workflow//20000102T0000Z/taskB'),
24+
taskC: new Tokens('~cylc/workflow//20000103T0000Z/taskC')
25+
}
2226

2327
const simpleTableTasks = [
2428
{
2529
task: {
26-
id: BASE_TOKENS.clone({ task: 'taskA' }).id,
30+
id: tk.taskA.id,
2731
name: 'taskA',
28-
tokens: { task: 'taskA', cycle: '20000101T0000Z' },
32+
tokens: tk.taskA,
2933
node: {
30-
id: BASE_TOKENS.clone({ task: 'taskA' }).id,
34+
id: tk.taskA.id,
3135
state: TaskState.RUNNING.name,
3236
name: 'taskA',
3337
meanElapsedTime: 2000
3438
},
3539
children: [
3640
{
37-
id: BASE_TOKENS.clone({ task: 'taskA', job: '01' }).id,
41+
id: tk.taskA.clone({ job: '01' }).id,
3842
name: '01',
39-
tokens: { task: 'taskA', cycle: '20000101T0000Z' },
43+
tokens: tk.taskA.clone({ job: '01' }),
4044
node: {
4145
platform: 'localhost',
4246
jobRunnerName: 'background',
@@ -51,9 +55,9 @@ const simpleTableTasks = [
5155
]
5256
},
5357
latestJob: {
54-
id: BASE_TOKENS.clone({ task: 'taskA', job: '01' }).id,
58+
id: tk.taskA.clone({ job: '01' }).id,
5559
name: '01',
56-
tokens: { task: 'taskA', cycle: '20000101T0000Z' },
60+
tokens: tk.taskA.clone({ job: '01' }),
5761
node: {
5862
platform: 'localhost',
5963
jobRunnerName: 'background',
@@ -69,11 +73,11 @@ const simpleTableTasks = [
6973
},
7074
{
7175
task: {
72-
id: BASE_TOKENS.clone({ task: 'taskB' }).id,
76+
id: tk.taskB.id,
7377
name: 'taskB',
74-
tokens: { task: 'taskB', cycle: '20000102T0000Z' },
78+
tokens: tk.taskB,
7579
node: {
76-
id: BASE_TOKENS.clone({ task: 'taskB' }).id,
80+
id: tk.taskB.id,
7781
state: TaskState.WAITING.name,
7882
name: 'taskB',
7983
cyclePoint: '20000102T0000Z'
@@ -85,11 +89,11 @@ const simpleTableTasks = [
8589
},
8690
{
8791
task: {
88-
id: BASE_TOKENS.clone({ task: 'taskC' }).id,
92+
id: tk.taskC.id,
8993
name: 'taskC',
90-
tokens: { task: 'taskC', cycle: '20000103T0000Z' },
94+
tokens: tk.taskC,
9195
node: {
92-
id: BASE_TOKENS.clone({ task: 'taskC' }).id,
96+
id: tk.taskC.id,
9397
state: TaskState.SUBMITTED.name,
9498
name: 'taskC',
9599
cyclePoint: '20000103T0000Z'

0 commit comments

Comments
 (0)