Skip to content

Commit bb56c02

Browse files
Merge pull request cylc#1798 from MetRonnie/warnings
Address warnings emitted during unit tests & tidy
2 parents 020eafe + 18f23d4 commit bb56c02

File tree

4 files changed

+9
-23
lines changed

4 files changed

+9
-23
lines changed

src/components/cylc/gantt/GanttChart.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export default {
5959
},
6060
timingOption: {
6161
type: String,
62-
required: true,
6362
default: 'total',
6463
},
6564
tasksPerPage: {

tests/unit/components/cylc/analysis/analysistimeseries.vue.spec.js

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,16 @@ import TimeSeries from '@/components/cylc/analysis/TimeSeries.vue'
2424

2525
const vuetify = createVuetify()
2626
const analysisJobs = analysisJobQuery.data.jobs
27-
const analysisTasks = ['eventually_succeeded', 'succeeded', 'waiting']
2827
const $workflowService = sinon.createStubInstance(WorkflowService)
2928

3029
describe('TimeSeries component', () => {
31-
/**
32-
* @param options
33-
* @returns {Wrapper<Tree>}
34-
*/
35-
const mountFunction = options => {
30+
const mountFunction = (options) => {
3631
return mount(TimeSeries, {
3732
global: {
3833
plugins: [vuetify],
3934
mocks: { $workflowService },
4035
},
36+
shallow: true,
4137
...options
4238
})
4339
}
@@ -46,7 +42,6 @@ describe('TimeSeries component', () => {
4642
const wrapper = mountFunction({
4743
props: {
4844
workflowIDs: ['one'],
49-
tasks: analysisTasks,
5045
platformOption: -1,
5146
timingOption: 'total',
5247
}
@@ -62,7 +57,6 @@ describe('TimeSeries component', () => {
6257
const wrapper = mountFunction({
6358
props: {
6459
workflowIDs: ['one'],
65-
tasks: analysisTasks,
6660
platformOption: -1,
6761
timingOption: 'total',
6862
}
@@ -88,7 +82,6 @@ describe('TimeSeries component', () => {
8882
const wrapper = mountFunction({
8983
props: {
9084
workflowIDs: ['one'],
91-
tasks: analysisTasks,
9285
platformOption: -1,
9386
timingOption: 'total',
9487
}
@@ -99,8 +92,10 @@ describe('TimeSeries component', () => {
9992

10093
// Check the the raw job data doesn't have the cycle points in order
10194
expect(wrapper.vm.jobs.filter(
102-
job => wrapper.vm.displayedTasks.includes(job.name)).map(
103-
job => job.cyclePoint)).to.deep.equal([
95+
job => wrapper.vm.displayedTasks.includes(job.name)
96+
).map(
97+
job => job.cyclePoint
98+
)).to.deep.equal([
10499
'20240101T1200Z',
105100
'20240101T0000Z',
106101
'20240102T0000Z'
@@ -121,7 +116,6 @@ describe('TimeSeries component', () => {
121116
const wrapper = mountFunction({
122117
props: {
123118
workflowIDs: ['one'],
124-
tasks: analysisTasks,
125119
platformOption: -1,
126120
timingOption: 'total',
127121
}
@@ -149,7 +143,6 @@ describe('TimeSeries component', () => {
149143
const wrapper = mountFunction({
150144
props: {
151145
workflowIDs: ['one'],
152-
tasks: analysisTasks,
153146
platformOption: -1,
154147
timingOption: 'total',
155148
}
@@ -166,7 +159,6 @@ describe('TimeSeries component', () => {
166159
const wrapper = mountFunction({
167160
props: {
168161
workflowIDs: ['one'],
169-
tasks: analysisTasks,
170162
platformOption: -1,
171163
timingOption: 'total',
172164
}
@@ -184,7 +176,6 @@ describe('TimeSeries component', () => {
184176
const wrapper = mountFunction({
185177
props: {
186178
workflowIDs: ['one'],
187-
tasks: analysisTasks,
188179
platformOption: -1,
189180
timingOption: 'total',
190181
}
@@ -193,7 +184,6 @@ describe('TimeSeries component', () => {
193184
wrapper.vm.jobs = analysisJobs
194185
wrapper.vm.displayedTasks = ['succeeded']
195186

196-
//
197187
expect(wrapper.vm.series[0].data[0].y).to.equal(60)
198188

199189
await wrapper.setProps({ timingOption: 'run' })

tests/unit/components/cylc/gantt/ganttChart.vue.spec.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,13 @@ const vuetify = createVuetify()
4444
const $workflowService = sinon.createStubInstance(WorkflowService)
4545

4646
describe('GanttChart component', () => {
47-
/**
48-
* @param options
49-
* @returns {Wrapper<Tree>}
50-
*/
51-
const mountFunction = options => {
47+
const mountFunction = (options) => {
5248
return mount(GanttChart, {
5349
global: {
5450
plugins: [vuetify],
5551
mocks: { $workflowService },
5652
},
53+
shallow: true,
5754
...options
5855
})
5956
}

tests/unit/components/cylc/workflow/toolbar.vue.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('Workspace toolbar component', () => {
4141
mocks: { $workflowService },
4242
},
4343
props: {
44-
views: [],
44+
views: new Map(),
4545
workflowName: 'strewth',
4646
},
4747
})

0 commit comments

Comments
 (0)