diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 064665526..f9fd8ab9e 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -15,6 +15,14 @@
* along with this program. If not, see .
*/
+const commaDangle = {
+ arrays: 'always-multiline',
+ objects: 'always-multiline',
+ imports: 'always-multiline',
+ exports: 'always-multiline',
+ functions: 'only-multiline',
+}
+
module.exports = {
root: true,
parserOptions: {
@@ -32,40 +40,45 @@ module.exports = {
rules: {
'comma-dangle': [
'error',
+ commaDangle,
+ ],
+ 'vue/comma-dangle': [
+ 'error',
+ commaDangle,
+ ],
+ 'vue/html-indent': [
+ 'error',
+ 2,
{
- arrays: 'only-multiline',
- objects: 'only-multiline',
- imports: 'only-multiline',
- exports: 'only-multiline',
- functions: 'only-multiline',
+ alignAttributesVertically: false,
},
],
'no-console': [
'error',
{
- allow: ['warn', 'error']
- }
+ allow: ['warn', 'error'],
+ },
],
'template-curly-spacing': [
- 'off'
+ 'off',
],
'vue/multi-word-component-names': [
- 'off'
+ 'off',
],
'vue/valid-v-slot': [
'error',
{
- allowModifiers: true
- }
+ allowModifiers: true,
+ },
],
'promise/param-names': [
- 'error'
+ 'error',
],
'promise/no-return-wrap': [
- 'error'
+ 'error',
],
'cypress/unsafe-to-chain-command': [
- 'off'
+ 'off',
],
},
}
diff --git a/cypress.config.cjs b/cypress.config.cjs
index 26285f80a..f40fc3836 100644
--- a/cypress.config.cjs
+++ b/cypress.config.cjs
@@ -36,13 +36,13 @@ module.exports = defineConfig({
return config
},
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',
- supportFile: 'tests/e2e/support/index.js'
+ supportFile: 'tests/e2e/support/index.js',
},
component: {
devServer: {
framework: 'vue',
- bundler: 'vite'
+ bundler: 'vite',
},
setupNodeEvents (on, config) {
// For test coverage
@@ -51,12 +51,12 @@ module.exports = defineConfig({
},
specPattern: 'tests/component/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'tests/component/support/index.js',
- indexHtmlFile: 'tests/component/support/component-index.html'
+ indexHtmlFile: 'tests/component/support/component-index.html',
},
env: {
// eslint-disable-next-line no-unneeded-ternary
- coverage: process.env.COVERAGE ? true : false
+ coverage: process.env.COVERAGE ? true : false,
},
morgan: false, // Disable XHR logging as it's very noisy
diff --git a/scripts/concurrently.cjs b/scripts/concurrently.cjs
index 2a5f9bda2..9e2634673 100644
--- a/scripts/concurrently.cjs
+++ b/scripts/concurrently.cjs
@@ -8,28 +8,28 @@ const allCommands = {
'serve:jupyterhub': {
command: 'yarn run serve:jupyterhub',
name: 'SERVER',
- prefixColor: 'yellow'
+ prefixColor: 'yellow',
},
'serve:vue': {
command: `yarn run serve:vue ${VITE_OPTIONS ?? ''}`,
name: 'VITE',
- prefixColor: 'blue'
+ prefixColor: 'blue',
},
preview: {
command: `yarn run -B vite preview --mode offline ${VITE_OPTIONS ?? ''}`,
name: 'VITE',
- prefixColor: 'blue'
+ prefixColor: 'blue',
},
'e2e:open': {
command: 'yarn run -B cypress open --e2e',
name: 'TESTS',
- prefixColor: 'magenta'
+ prefixColor: 'magenta',
},
'cy:run': {
command: 'yarn run -B cypress run',
name: 'TESTS',
- prefixColor: 'cyan'
- }
+ prefixColor: 'cyan',
+ },
}
concurrently(
diff --git a/src/components/Markdown.vue b/src/components/Markdown.vue
index 87799da48..4a233e313 100644
--- a/src/components/Markdown.vue
+++ b/src/components/Markdown.vue
@@ -34,14 +34,14 @@ export default {
props: {
markdown: {
type: String,
- required: true
- }
+ required: true,
+ },
},
computed: {
html () {
return md.render(this.markdown)
- }
- }
+ },
+ },
}
diff --git a/src/components/core/Alert.vue b/src/components/core/Alert.vue
index 064eac3b9..715456ff3 100644
--- a/src/components/core/Alert.vue
+++ b/src/components/core/Alert.vue
@@ -46,7 +46,7 @@ export default {
name: 'Alert',
computed: {
- ...mapState(['alert'])
+ ...mapState(['alert']),
},
methods: {
@@ -56,11 +56,11 @@ export default {
*/
closeAlert () {
this.setAlert(null)
- }
+ },
},
icons: {
- mdiClose
- }
+ mdiClose,
+ },
}
diff --git a/src/components/cylc/ConnectionStatus.vue b/src/components/cylc/ConnectionStatus.vue
index 60f7f1b50..705597f64 100644
--- a/src/components/cylc/ConnectionStatus.vue
+++ b/src/components/cylc/ConnectionStatus.vue
@@ -46,8 +46,8 @@ export default {
*/
isOffline: {
type: Boolean,
- required: true
- }
+ required: true,
+ },
},
icons: {
diff --git a/src/components/cylc/Drawer.vue b/src/components/cylc/Drawer.vue
index 29a08f18c..844b6ce7a 100644
--- a/src/components/cylc/Drawer.vue
+++ b/src/components/cylc/Drawer.vue
@@ -60,7 +60,7 @@ along with this program. If not, see .
+ >
import.meta.env.MODE === 'production'
? {
text: `Cylc ${cylcVersionInfo.value?.['cylc-flow'] ?? ''}`,
- variant: 'text'
+ variant: 'text',
}
: {
text: import.meta.env.MODE.toUpperCase(),
diff --git a/src/components/cylc/GraphNode.vue b/src/components/cylc/GraphNode.vue
index 1d51a0956..25dafeae0 100644
--- a/src/components/cylc/GraphNode.vue
+++ b/src/components/cylc/GraphNode.vue
@@ -95,30 +95,30 @@ export default {
name: 'GraphNode',
components: {
SVGTask,
- Job
+ Job,
},
props: {
task: {
type: Object,
- required: true
+ required: true,
},
jobs: {
type: Array,
- required: true
+ required: true,
},
maxJobs: {
// maximum number of jobs to display before using an overflow indicator
default: 6,
- required: false
+ required: false,
},
mostRecentJobScale: {
// the size of the most recent job icon relative to any previos jobs
default: 1.2,
- required: false
+ required: false,
},
jobTheme: {
- required: true
- }
+ required: true,
+ },
},
computed: {
nodeID () {
@@ -150,7 +150,7 @@ export default {
// the most recent job is larger so all subsequent jobs need to be bumped
// along a bit further to account for this
return (this.mostRecentJobScale * 100) - 100 // y offset in px
- }
- }
+ },
+ },
}
diff --git a/src/components/cylc/GraphSubgraph.vue b/src/components/cylc/GraphSubgraph.vue
index c81a04cf6..860f6259f 100644
--- a/src/components/cylc/GraphSubgraph.vue
+++ b/src/components/cylc/GraphSubgraph.vue
@@ -31,7 +31,7 @@ along with this program. If not, see .
stroke-width="8px"
stroke="grey"
stroke-dasharray="50 50"
- />
+ />
diff --git a/src/components/cylc/Header.vue b/src/components/cylc/Header.vue
index acddfa1ae..b54555b8d 100644
--- a/src/components/cylc/Header.vue
+++ b/src/components/cylc/Header.vue
@@ -45,7 +45,7 @@ along with this program. If not, see .
VCombobox: {
bgColor: 'white',
rules: [(val) => Boolean(val) || 'Required'],
- }
+ },
}">
diff --git a/src/components/cylc/Job.vue b/src/components/cylc/Job.vue
index 2362adbe4..d8a4889a1 100644
--- a/src/components/cylc/Job.vue
+++ b/src/components/cylc/Job.vue
@@ -43,7 +43,7 @@ const Job = (props, context) => {
height: width,
rx: '15',
ry: '15',
- 'stroke-width': '10'
+ 'stroke-width': '10',
}
)
// the job icon SVG
@@ -63,7 +63,7 @@ const Job = (props, context) => {
rx: '15',
ry: '15',
opacity: '50%',
- 'stroke-width': '10'
+ 'stroke-width': '10',
}
)
jobIconChildren.splice(0, 0, previousStateIconSvg)
@@ -73,7 +73,7 @@ const Job = (props, context) => {
'g',
{ class: cJobClass },
[
- h('g', { class: 'job' }, jobIconChildren)
+ h('g', { class: 'job' }, jobIconChildren),
]
)
}
@@ -81,7 +81,7 @@ const Job = (props, context) => {
'svg',
{
class: 'job',
- viewBox: '0 0 100 100'
+ viewBox: '0 0 100 100',
},
jobIconChildren
)
@@ -99,13 +99,13 @@ Job.props = {
},
previousState: {
type: String,
- required: false
+ required: false,
},
svg: {
type: Boolean,
required: false,
- default: false
- }
+ default: false,
+ },
}
export default Job
diff --git a/src/components/cylc/Mutation.vue b/src/components/cylc/Mutation.vue
index 75397f321..44d4c2510 100644
--- a/src/components/cylc/Mutation.vue
+++ b/src/components/cylc/Mutation.vue
@@ -22,7 +22,7 @@ along with this program. If not, see .
- {{ mutation._title }}
+ {{ mutation._title }}
@@ -37,8 +37,8 @@ along with this program. If not, see .
v-bind="extendedDescription ? {} : {
expandIcon: null,
style: {
- cursor: 'default'
- }
+ cursor: 'default',
+ },
}"
>
@@ -53,7 +53,7 @@ along with this program. If not, see .
v-if="mutation.name === 'editRuntime'"
v-bind="{
cylcObject,
- types
+ types,
}"
ref="form"
v-model="isValid"
@@ -63,7 +63,7 @@ along with this program. If not, see .
v-bind="{
mutation,
types,
- initialData
+ initialData,
}"
ref="form"
v-model="isValid"
@@ -134,7 +134,7 @@ import Markdown from '@/components/Markdown.vue'
import {
getMutationShortDesc,
getMutationExtendedDesc,
- mutationStatus
+ mutationStatus,
} from '@/utils/aotf'
import { mdiClose } from '@mdi/js'
import { useDynamicVuetifyDefaults } from '@/plugins/vuetify'
@@ -146,7 +146,7 @@ export default {
components: {
EditRuntimeForm,
FormGenerator,
- Markdown
+ Markdown,
},
emits: [
@@ -158,22 +158,22 @@ export default {
mutation: {
// graphql mutation object as returned by introspection query
type: Object,
- required: true
+ required: true,
},
cylcObject: {
// data store node
type: Object,
- required: true
+ required: true,
},
types: {
// list of all graphql types as returned by introspection query
// (required for resolving InputType objects
- type: Array
+ type: Array,
},
initialData: {
type: Object,
required: false,
- default: () => {}
+ default: () => {},
},
},
@@ -188,7 +188,7 @@ export default {
data: () => ({
isValid: false,
submitting: false,
- warningMsg: null
+ warningMsg: null,
}),
computed: {
@@ -206,8 +206,8 @@ export default {
},
set (val) {
if (!val) this.warningMsg = null
- }
- }
+ },
+ },
},
methods: {
@@ -234,8 +234,8 @@ export default {
// Misc options
icons: {
- close: mdiClose
- }
+ close: mdiClose,
+ },
}
diff --git a/src/components/cylc/SVGTask.vue b/src/components/cylc/SVGTask.vue
index 9ee798a08..ca9ade4d9 100644
--- a/src/components/cylc/SVGTask.vue
+++ b/src/components/cylc/SVGTask.vue
@@ -252,7 +252,7 @@ import TaskState from '@/model/TaskState.model'
const props = defineProps({
task: {
- required: true
+ required: true,
},
startTime: {
// The start time as an ISO8601 date-time string in expanded format
@@ -260,12 +260,12 @@ const props = defineProps({
// TODO: aim to remove this in due course
// (we should be able to obtain this directly from the task)
type: String,
- required: false
+ required: false,
},
modifierSize: {
// Scale the size of the task state modifier
type: Number,
- default: 0.7
+ default: 0.7,
},
})
diff --git a/src/components/cylc/Task.vue b/src/components/cylc/Task.vue
index 527040465..25428dd20 100644
--- a/src/components/cylc/Task.vue
+++ b/src/components/cylc/Task.vue
@@ -39,20 +39,20 @@ export default {
name: 'Task',
props: {
task: {
- required: true
+ required: true,
},
startTime: {
- required: false
+ required: false,
},
modifierSize: {
// Scale the size of the task state modifier
type: Number,
- default: 0.7
- }
+ default: 0.7,
+ },
},
components: {
- SVGTask
- }
+ SVGTask,
+ },
}
diff --git a/src/components/cylc/TaskFilter.vue b/src/components/cylc/TaskFilter.vue
index 87e9d49e7..64336d48a 100644
--- a/src/components/cylc/TaskFilter.vue
+++ b/src/components/cylc/TaskFilter.vue
@@ -56,14 +56,14 @@ export default {
name: 'TaskFilter',
components: {
- TaskFilterSelect
+ TaskFilterSelect,
},
props: {
modelValue: {
type: Object,
- required: true
- } // { id, states }
+ required: true,
+ }, // { id, states }
},
computed: {
@@ -74,8 +74,8 @@ export default {
set (value) {
// Update 'modelValue' prop by notifying parent component's v-model for this component
this.$emit('update:modelValue', value)
- }
- }
+ },
+ },
},
allStates: TaskStateNames,
}
diff --git a/src/components/cylc/TaskFilterSelect.vue b/src/components/cylc/TaskFilterSelect.vue
index ec71e0457..eb5cf243d 100644
--- a/src/components/cylc/TaskFilterSelect.vue
+++ b/src/components/cylc/TaskFilterSelect.vue
@@ -91,7 +91,7 @@ const localValue = computed({
},
set (val) {
emit('update:modelValue', val)
- }
+ },
})
const maxVisibleStates = 4
diff --git a/src/components/cylc/Toolbar.vue b/src/components/cylc/Toolbar.vue
index 92e79d127..5ff01b8bb 100644
--- a/src/components/cylc/Toolbar.vue
+++ b/src/components/cylc/Toolbar.vue
@@ -47,7 +47,7 @@ component. Note: this is not used for the workflow view, see
import { mapState } from 'vuex'
import { useDrawer, toolbarHeight } from '@/utils/toolbar'
import {
- mdiViewList
+ mdiViewList,
} from '@mdi/js'
export default {
@@ -57,7 +57,7 @@ export default {
},
computed: {
- ...mapState('app', ['title'])
+ ...mapState('app', ['title']),
},
icons: {
diff --git a/src/components/cylc/ViewToolbar.vue b/src/components/cylc/ViewToolbar.vue
index 399ed54e7..60f53ad4a 100644
--- a/src/components/cylc/ViewToolbar.vue
+++ b/src/components/cylc/ViewToolbar.vue
@@ -51,13 +51,13 @@ export default {
name: 'ViewToolbar',
emits: [
- 'setOption'
+ 'setOption',
],
props: {
groups: {
required: true,
- type: Array
+ type: Array,
/*
groups: [
{
@@ -97,7 +97,7 @@ export default {
size: {
type: String,
default: 'default',
- }
+ },
},
computed: {
@@ -114,7 +114,7 @@ export default {
for (const group of this.groups) {
iGroup = {
...group,
- iControls: []
+ iControls: [],
}
for (const control of group.controls) {
color = null
@@ -152,7 +152,7 @@ export default {
...control,
color,
callback,
- disabled
+ disabled,
}
iGroup.iControls.push(iControl)
}
@@ -162,7 +162,7 @@ export default {
},
btnProps () {
return btnProps(this.size)
- }
+ },
},
methods: {
@@ -190,7 +190,7 @@ export default {
}
return vars
},
- }
+ },
}
diff --git a/src/components/cylc/WarningIcon.vue b/src/components/cylc/WarningIcon.vue
index 004460a32..4728d2070 100644
--- a/src/components/cylc/WarningIcon.vue
+++ b/src/components/cylc/WarningIcon.vue
@@ -68,7 +68,7 @@ const PATH = pathJoin([
['L', x2 - sw, y1 + hsw],
['L', ((x2 - x1) / 2) + x1, y2 - sw],
['L', x1 + sw, y1 + hsw],
- ['Z', '', '']
+ ['Z', '', ''],
])
function nodeJoin (item) {
@@ -88,18 +88,18 @@ export default {
name: 'Warning',
data: function () {
return {
- active: this.startActive
+ active: this.startActive,
}
},
props: {
message: {
type: String,
- required: false
+ required: false,
},
startActive: {
type: Boolean,
- required: false
- }
+ required: false,
+ },
},
methods: {
path () {
@@ -112,7 +112,7 @@ export default {
deactivate () {
this.active = false
- }
- }
+ },
+ },
}
diff --git a/src/components/cylc/analysis/AnalysisTable.vue b/src/components/cylc/analysis/AnalysisTable.vue
index d122f3ccd..0de2e6cd1 100644
--- a/src/components/cylc/analysis/AnalysisTable.vue
+++ b/src/components/cylc/analysis/AnalysisTable.vue
@@ -60,7 +60,7 @@ import { formatDuration } from '@/utils/tasks'
import {
initialOptions,
updateInitialOptionsEvent,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
export default {
@@ -71,11 +71,11 @@ export default {
props: {
tasks: {
type: Array,
- required: true
+ required: true,
},
timingOption: {
type: String,
- required: true
+ required: true,
},
initialOptions,
},
@@ -102,7 +102,7 @@ export default {
return {
itemsPerPage,
sortBy,
- page
+ page,
}
},
@@ -111,17 +111,17 @@ export default {
headers: [
{
title: 'Task',
- key: 'name'
+ key: 'name',
},
{
title: 'Platform',
- key: 'platform'
+ key: 'platform',
},
{
title: 'Count',
- key: 'count'
- }
- ]
+ key: 'count',
+ },
+ ],
}
},
@@ -133,47 +133,47 @@ export default {
title: `Mean T-${times}`,
key: `mean${times}Time`,
formatter: formatDuration,
- allowZeros: false
+ allowZeros: false,
},
{
title: `Std Dev T-${times}`,
key: `stdDev${times}Time`,
formatter: formatDuration,
- allowZeros: true
+ allowZeros: true,
},
{
title: `Min T-${times}`,
key: `min${times}Time`,
formatter: formatDuration,
- allowZeros: false
+ allowZeros: false,
},
{
title: `Q1 T-${times}`,
key: `${times.toLowerCase()}Quartiles.0`,
formatter: formatDuration,
- allowZeros: false
+ allowZeros: false,
},
{
title: `Median T-${times}`,
key: `${times.toLowerCase()}Quartiles.1`,
formatter: formatDuration,
- allowZeros: false
+ allowZeros: false,
},
{
title: `Q3 T-${times}`,
key: `${times.toLowerCase()}Quartiles.2`,
formatter: formatDuration,
- allowZeros: false
+ allowZeros: false,
},
{
title: `Max T-${times}`,
key: `max${times}Time`,
formatter: formatDuration,
- allowZeros: false
- }
+ allowZeros: false,
+ },
]
return this.headers.concat(timingHeaders)
- }
+ },
},
methods: {
@@ -189,7 +189,7 @@ export default {
return header.formatter(value, header.allowZeros)
}
return value
- }
+ },
},
itemsPerPageOptions: [
@@ -198,7 +198,7 @@ export default {
{ value: 50, title: '50' },
{ value: 100, title: '100' },
{ value: 200, title: '200' },
- { value: -1, title: 'All' }
+ { value: -1, title: 'All' },
],
}
diff --git a/src/components/cylc/analysis/BoxPlot.vue b/src/components/cylc/analysis/BoxPlot.vue
index 755fc3202..1a28bfcff 100644
--- a/src/components/cylc/analysis/BoxPlot.vue
+++ b/src/components/cylc/analysis/BoxPlot.vue
@@ -70,7 +70,7 @@ import { useReducedAnimation } from '@/composables/localStorage'
import {
initialOptions,
updateInitialOptionsEvent,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
export default {
@@ -138,10 +138,10 @@ export default {
toolbar: {
exportToSVG: 'Download SVG',
exportToPNG: 'Download PNG',
- menu: 'Download'
- }
- }
- }
+ menu: 'Download',
+ },
+ },
+ },
],
animations: {
enabled: reducedAnimation.value ? false : props.animate,
@@ -197,7 +197,7 @@ export default {
text: `${upperFirst(props.timingOption)} time`,
},
labels: {
- formatter: (value) => formatDuration(value, true)
+ formatter: (value) => formatDuration(value, true),
},
},
}))
@@ -253,7 +253,7 @@ export default {
numPages () {
// Clamp page number
this.page = Math.min(this.numPages, this.page)
- }
+ },
},
methods: {
diff --git a/src/components/cylc/analysis/TimeSeries.vue b/src/components/cylc/analysis/TimeSeries.vue
index 7b13cf0c9..326248b0d 100644
--- a/src/components/cylc/analysis/TimeSeries.vue
+++ b/src/components/cylc/analysis/TimeSeries.vue
@@ -71,7 +71,7 @@ along with this program. If not, see .
:height="450"
width="95%"
class="d-flex justify-center"
- />
+ />
.
class="d-flex justify-center"
/>
-
+
diff --git a/src/components/cylc/commandMenu/plugin.js b/src/components/cylc/commandMenu/plugin.js
index 778fa01aa..eb12e716e 100644
--- a/src/components/cylc/commandMenu/plugin.js
+++ b/src/components/cylc/commandMenu/plugin.js
@@ -63,7 +63,7 @@ export default {
app.directive('command-menu', {
beforeMount: bind,
unmounted: unbind,
- updated
+ updated,
})
- }
+ },
}
diff --git a/src/components/cylc/gantt/GanttChart.vue b/src/components/cylc/gantt/GanttChart.vue
index 6c20e1cf1..2f2132b9a 100644
--- a/src/components/cylc/gantt/GanttChart.vue
+++ b/src/components/cylc/gantt/GanttChart.vue
@@ -140,7 +140,7 @@ export default {
x: job.name,
y: [
new Date(job[start]).getTime(),
- new Date(job[end]).getTime()
+ new Date(job[end]).getTime(),
],
fillColor,
}
@@ -176,10 +176,10 @@ export default {
zoomIn: 'Zoom In',
zoomOut: 'Zoom Out',
pan: 'Panning',
- reset: 'Reset Zoom'
- }
- }
- }
+ reset: 'Reset Zoom',
+ },
+ },
+ },
],
animations: {
enabled: this.animate && !this.reducedAnimation,
@@ -203,7 +203,7 @@ export default {
zoomin: true,
zoomout: true,
pan: true,
- reset: true
+ reset: true,
},
},
},
@@ -235,7 +235,7 @@ export default {
labels: {
formatter: function (value, timestamp, opts) {
return new Date(value).toUTCString().slice(17, -3)
- }
+ },
},
title: {
text: 'Time (UTC)',
diff --git a/src/components/cylc/gantt/filter.js b/src/components/cylc/gantt/filter.js
index 9bee2e821..5f497df0f 100644
--- a/src/components/cylc/gantt/filter.js
+++ b/src/components/cylc/gantt/filter.js
@@ -54,7 +54,7 @@ export function platformOptions (tasks) {
platforms.push(jobs[i].platform)
platformOptions.push({
value: jobs[i].platform,
- title: jobs[i].platform
+ title: jobs[i].platform,
})
}
}
diff --git a/src/components/cylc/gscan/GScan.vue b/src/components/cylc/gscan/GScan.vue
index 74cbb1446..1849945a7 100644
--- a/src/components/cylc/gscan/GScan.vue
+++ b/src/components/cylc/gscan/GScan.vue
@@ -130,18 +130,18 @@ export default {
components: {
Tree,
- TaskFilterSelect
+ TaskFilterSelect,
},
props: {
workflowTree: {
type: Object,
- required: true
+ required: true,
},
isLoading: {
type: Boolean,
- required: true
- }
+ required: true,
+ },
},
data: () => ({
@@ -156,7 +156,7 @@ export default {
*/
filters: {
'workflow state': [],
- 'task state': []
+ 'task state': [],
// 'workflow host': [], // TODO: will it be in state totals?
// 'cylc version': [] // TODO: will it be in state totals?
},
@@ -220,7 +220,7 @@ export default {
// Misc options
icons: {
mdiFilter,
- mdiFolderRefresh
+ mdiFolderRefresh,
},
/**
* Lists of all the possible workflow and task states
diff --git a/src/components/cylc/gscan/WorkflowIcon.vue b/src/components/cylc/gscan/WorkflowIcon.vue
index c8c1dbdfd..ff2dbf992 100644
--- a/src/components/cylc/gscan/WorkflowIcon.vue
+++ b/src/components/cylc/gscan/WorkflowIcon.vue
@@ -34,8 +34,8 @@ export default {
props: {
status: {
required: true,
- type: String
- }
+ type: String,
+ },
},
methods: {
@@ -47,7 +47,7 @@ export default {
getIcon () {
const state = WorkflowState.enumValues.find(({ name }) => name === this.status)
return state?.icon || mdiHelpCircle
- }
- }
+ },
+ },
}
diff --git a/src/components/cylc/gscan/sort.js b/src/components/cylc/gscan/sort.js
index 3e57daf73..a87888165 100644
--- a/src/components/cylc/gscan/sort.js
+++ b/src/components/cylc/gscan/sort.js
@@ -16,7 +16,7 @@
*/
import {
- sortedIndexBy
+ sortedIndexBy,
} from '@/components/cylc/common/sort'
import { WorkflowState, WorkflowStateOrder } from '@/model/WorkflowState.model'
@@ -108,7 +108,7 @@ export function flattenWorkflowParts (node) {
} else if (node.children.length > 1) {
return {
...node,
- children: node.children.map((n) => flattenWorkflowParts(n))
+ children: node.children.map((n) => flattenWorkflowParts(n)),
}
}
}
diff --git a/src/components/cylc/log/Log.vue b/src/components/cylc/log/Log.vue
index a99b927d1..832dacea2 100644
--- a/src/components/cylc/log/Log.vue
+++ b/src/components/cylc/log/Log.vue
@@ -44,7 +44,7 @@ import { useTemplateRef, watch, onBeforeUnmount, nextTick } from 'vue'
import { useScroll, useVModel, whenever } from '@vueuse/core'
import { when } from '@/utils'
import {
- mdiMouseMoveUp
+ mdiMouseMoveUp,
} from '@mdi/js'
export default {
@@ -53,31 +53,31 @@ export default {
props: {
placeholder: {
type: String,
- required: false
+ required: false,
},
timestamps: {
type: Boolean,
required: false,
- default: true
+ default: true,
},
logs: {
type: Array,
- required: true
+ required: true,
},
wordWrap: {
type: Boolean,
required: false,
- default: false
+ default: false,
},
autoScroll: {
type: Boolean,
required: false,
- default: false
- }
+ default: false,
+ },
},
emits: [
- 'update:autoScroll'
+ 'update:autoScroll',
],
setup (props, { emit }) {
@@ -133,7 +133,7 @@ export default {
})
return {
- scrollToTop
+ scrollToTop,
}
},
@@ -161,13 +161,13 @@ export default {
stripTimestamp (logLine) {
const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|[+-][\d:]+)?\s(.*\s*)/
return logLine.match(regex)?.[1] ?? logLine
- }
+ },
},
// Misc options
icons: {
- mdiMouseMoveUp
- }
+ mdiMouseMoveUp,
+ },
}
diff --git a/src/components/cylc/table/Table.vue b/src/components/cylc/table/Table.vue
index fd2c6413b..34833562c 100644
--- a/src/components/cylc/table/Table.vue
+++ b/src/components/cylc/table/Table.vue
@@ -66,7 +66,7 @@ along with this program. If not, see .
size="small"
:style="{
visibility: (item.task.children || []).length ? null : 'hidden',
- transform: isExpanded(internalItem) ? 'rotate(180deg)' : null
+ transform: isExpanded(internalItem) ? 'rotate(180deg)' : null,
}"
>
.
import { getIndent } from '@/components/cylc/tree/util'
import {
formatDuration,
- jobMessageOutputs
+ jobMessageOutputs,
} from '@/utils/tasks'
export default {
@@ -79,7 +79,7 @@ export default {
},
meanElapsedTime: {
- }
+ },
},
computed: {
diff --git a/src/components/cylc/tree/Tree.vue b/src/components/cylc/tree/Tree.vue
index 1b47f5920..4a52eed76 100644
--- a/src/components/cylc/tree/Tree.vue
+++ b/src/components/cylc/tree/Tree.vue
@@ -43,7 +43,7 @@ export default {
props: {
workflows: {
type: Array,
- required: true
+ required: true,
},
treeItemComponent: {
type: String,
@@ -69,7 +69,7 @@ export default {
/** List of node types to manually expand. */
expandAll: {
type: Array,
- default: null
+ default: null,
},
autoStripTypes: {
// If there is only one child of the root node and its type is listed in
@@ -80,13 +80,13 @@ export default {
// root nodes.
type: Array,
required: false,
- default: () => []
+ default: () => [],
},
flat: {
type: Boolean,
required: false,
default: true,
- }
+ },
},
components: {
diff --git a/src/components/cylc/tree/TreeItem.vue b/src/components/cylc/tree/TreeItem.vue
index aef856dfa..2b4e38104 100644
--- a/src/components/cylc/tree/TreeItem.vue
+++ b/src/components/cylc/tree/TreeItem.vue
@@ -54,7 +54,7 @@ along with this program. If not, see .
v-if="node.familyTree?.length"
:key="node.id"
:task="node.familyTree[0].node"
- />
+ />
{{ node.name }}
@@ -107,7 +107,7 @@ along with this program. If not, see .
>
['workflow', 'cycle', 'family']
+ default: () => ['workflow', 'cycle', 'family'],
},
/** When this changes, will expand if node is one of these types, otherwise collapse. */
expandAll: {
@@ -269,13 +269,13 @@ export default {
},
nodeStyle () {
return {
- 'padding-left': getIndent(this.depth)
+ 'padding-left': getIndent(this.depth),
}
},
nodeClass () {
return {
'node--hoverable': this.hoverable,
- expanded: this.isExpanded
+ expanded: this.isExpanded,
}
},
nodeDataClass () {
@@ -284,7 +284,7 @@ export default {
expandCollapseBtnStyle () {
return {
// set visibility 'hidden' to ensure element takes up space
- visibility: this.hasChildren ? null : 'hidden'
+ visibility: this.hasChildren ? null : 'hidden',
}
},
jobMessageOutputs () {
@@ -299,7 +299,7 @@ export default {
} else if (nodeTypes?.length === 0) {
this.isExpanded = false // manually collapsed
}
- }
+ },
},
icons: {
diff --git a/src/components/cylc/workspace/Lumino.vue b/src/components/cylc/workspace/Lumino.vue
index 34f809823..d0e54770f 100644
--- a/src/components/cylc/workspace/Lumino.vue
+++ b/src/components/cylc/workspace/Lumino.vue
@@ -72,7 +72,7 @@ const $store = useStore()
const props = defineProps({
workflowName: {
type: String,
- required: true
+ required: true,
},
/**
* All possible view component classes that can be rendered
@@ -81,12 +81,12 @@ const props = defineProps({
*/
allViews: {
type: Map,
- required: true
+ required: true,
},
})
const emit = defineEmits([
- 'emptied'
+ 'emptied',
])
/**
diff --git a/src/components/cylc/workspace/Toolbar.vue b/src/components/cylc/workspace/Toolbar.vue
index f7f7204c4..a6b27da3f 100644
--- a/src/components/cylc/workspace/Toolbar.vue
+++ b/src/components/cylc/workspace/Toolbar.vue
@@ -207,7 +207,7 @@ import {
mdiPlusBoxMultiple,
mdiStop,
mdiViewList,
- mdiAccount
+ mdiAccount,
} from '@mdi/js'
import { startCase } from 'lodash'
import { until } from '@/utils'
@@ -215,7 +215,7 @@ import { useDrawer, useNavBtn, toolbarHeight } from '@/utils/toolbar'
import WorkflowState from '@/model/WorkflowState.model'
import graphql from '@/mixins/graphql'
import {
- mutationStatus
+ mutationStatus,
} from '@/utils/aotf'
import subscriptionComponentMixin from '@/mixins/subscriptionComponent'
import SubscriptionQuery from '@/model/SubscriptionQuery.model'
@@ -271,13 +271,13 @@ export default {
eventBus,
showNavBtn,
toggleDrawer,
- toolbarHeight
+ toolbarHeight,
}
},
mixins: [
graphql,
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
props: {
@@ -288,8 +288,8 @@ export default {
*/
views: {
type: Map,
- required: true
- }
+ required: true,
+ },
},
data: () => ({
@@ -297,7 +297,7 @@ export default {
// store state from mutations in order to compute the "enabled" attrs
play: null,
paused: null,
- stop: null
+ stop: null,
},
changingNWindow: false,
}),
@@ -374,7 +374,7 @@ export default {
this.expecting.stop === null ||
this.expecting.stop === this.isStopped
)
- )
+ ),
}
},
nWindow: {
@@ -391,7 +391,7 @@ export default {
}
this.changingNWindow = false
},
- }
+ },
},
watch: {
@@ -456,7 +456,7 @@ export default {
run: mdiPlay,
stop: mdiStop,
mdiCog,
- mdiAccount
+ mdiAccount,
},
}
diff --git a/src/components/graphqlFormGenerator/EditRuntimeForm.vue b/src/components/graphqlFormGenerator/EditRuntimeForm.vue
index 39668880f..b776ecb01 100644
--- a/src/components/graphqlFormGenerator/EditRuntimeForm.vue
+++ b/src/components/graphqlFormGenerator/EditRuntimeForm.vue
@@ -65,7 +65,7 @@ const NamedTypes = {
is: VTextarea,
rows: '1',
autoGrow: true,
- style: 'font-family: monospace;'
+ style: 'font-family: monospace;',
},
TaskRunMode: {
is: GEnum,
@@ -81,18 +81,18 @@ export default {
modelValue: {
// validity of form
type: Boolean,
- default: () => false
+ default: () => false,
},
cylcObject: {
// data store node
type: Object,
- required: true
+ required: true,
},
types: {
// introspection types
type: Array,
- required: true
- }
+ required: true,
+ },
},
emits: ['update:modelValue'],
@@ -122,8 +122,8 @@ export default {
set (value) {
// Update 'value' prop by notifying parent component's v-model for this component
this.$emit('update:modelValue', value)
- }
- }
+ },
+ },
},
methods: {
@@ -164,7 +164,7 @@ export default {
if (!settings.length) {
return {
message: 'No changes were made',
- status: mutationStatus.WARN
+ status: mutationStatus.WARN,
}
}
const args = {
@@ -173,7 +173,7 @@ export default {
mode: 'Set',
namespaces: [this.tokens.task],
settings,
- workflows: [this.tokens.workflowID]
+ workflows: [this.tokens.workflowID],
}
const mutation = await this.$workflowService.getMutation('broadcast')
return await mutate(
@@ -207,7 +207,7 @@ export default {
)) {
// Convert { key: x, value: y } to { x: y }
ret.push({
- [field]: { [obj.key]: obj.value }
+ [field]: { [obj.key]: obj.value },
})
}
}
@@ -230,11 +230,11 @@ export default {
const gqlType = findByName(this.type.fields, fieldName).type
return {
gqlType,
- ...getComponentProps(gqlType, NamedTypes, VuetifyConfig.kinds)
+ ...getComponentProps(gqlType, NamedTypes, VuetifyConfig.kinds),
}
},
- startCase
- }
+ startCase,
+ },
}
diff --git a/src/components/graphqlFormGenerator/FormGenerator.vue b/src/components/graphqlFormGenerator/FormGenerator.vue
index 396546d7d..f17bdb459 100644
--- a/src/components/graphqlFormGenerator/FormGenerator.vue
+++ b/src/components/graphqlFormGenerator/FormGenerator.vue
@@ -26,29 +26,29 @@ along with this program. If not, see .
v-for="input in inputs"
v-bind:key="input.label"
>
-
-
- {{ upperFirst(lowerCase(input.label)) }}
-
-
-
-
- {{ $options.icons.mdiHelpCircleOutline }}
-
-
-
-
-
-
+
+
+ {{ upperFirst(lowerCase(input.label)) }}
+
+
+
+
+ {{ $options.icons.mdiHelpCircleOutline }}
+
+
+
+
+
+
@@ -67,7 +67,7 @@ export default {
components: {
Markdown,
- FormInput
+ FormInput,
},
props: {
@@ -75,19 +75,19 @@ export default {
// validity of form
type: Boolean,
required: false,
- default: () => false
+ default: () => false,
},
mutation: {
type: Object,
- required: true
+ required: true,
},
types: {
type: Array,
- default: () => []
+ default: () => [],
},
initialData: {
- type: Object
- }
+ type: Object,
+ },
},
emits: ['update:modelValue'],
@@ -108,7 +108,7 @@ export default {
ret.push({
gqlType: arg.type,
label: arg.name,
- description: arg.description
+ description: arg.description,
})
}
return ret
@@ -120,8 +120,8 @@ export default {
set (value) {
// Update 'value' prop by notifying parent component's v-model for this component
this.$emit('update:modelValue', value)
- }
- }
+ },
+ },
},
methods: {
diff --git a/src/components/graphqlFormGenerator/FormInput.vue b/src/components/graphqlFormGenerator/FormInput.vue
index f01d0f86c..0e64238a1 100644
--- a/src/components/graphqlFormGenerator/FormInput.vue
+++ b/src/components/graphqlFormGenerator/FormInput.vue
@@ -45,12 +45,12 @@ export const renderHelpIcon = (helpText) => h(
{
...props,
style: {
- cursor: 'default'
- }
+ cursor: 'default',
+ },
},
() => mdiHelpCircleOutline
),
- default: () => h(Markdown, { markdown: helpText })
+ default: () => h(Markdown, { markdown: helpText }),
}
)
@@ -64,7 +64,7 @@ export default {
mixins: [formElement],
components: {
- Markdown
+ Markdown,
},
directives: {
@@ -74,15 +74,15 @@ export default {
if (binding.value) {
mask(el, binding)
}
- }
+ },
},
props: {
// dictionary of props for overriding default values
propOverrides: {
type: Object,
- default: () => { Object() }
- }
+ default: () => { Object() },
+ },
},
beforeCreate () {
@@ -97,7 +97,7 @@ export default {
// merge this in with default and override props
const propGroups = [
componentProps,
- this.propOverrides || {}
+ this.propOverrides || {},
]
// rules is a list so needs special treatment
const rules = propGroups.flatMap(({ rules }) => rules ?? [])
@@ -118,15 +118,15 @@ export default {
this.model = value
},
gqlType: this.gqlType,
- types: this.types
+ types: this.types,
},
{
'append-inner': this.help ? () => renderHelpIcon(this.help) : null,
// pass the "append" slot onto the child component
- append: (slotProps) => this.$slots.append?.(slotProps)
+ append: (slotProps) => this.$slots.append?.(slotProps),
}
)
- }
+ },
}
diff --git a/src/components/graphqlFormGenerator/components/BroadcastSetting.vue b/src/components/graphqlFormGenerator/components/BroadcastSetting.vue
index b0c861605..5a45feee8 100644
--- a/src/components/graphqlFormGenerator/components/BroadcastSetting.vue
+++ b/src/components/graphqlFormGenerator/components/BroadcastSetting.vue
@@ -30,7 +30,7 @@ export default {
inheritAttrs: false,
data: () => ({
- localValue: null
+ localValue: null,
}),
methods: {
@@ -108,7 +108,7 @@ export default {
return nonNullOutcome === true
? (this.modelValue != null) || 'Invalid'
: nonNullOutcome
- }
+ },
},
render () {
@@ -121,14 +121,14 @@ export default {
this.localValue = val
this.$emit('update:modelValue', this.fromString(val))
},
- rules: [this.isValid]
+ rules: [this.isValid],
},
{
'append-inner': () => renderHelpIcon(this.help),
// pass the "append" slot onto the VTextField component
- append: (slotProps) => this.$slots.append?.(slotProps)
+ append: (slotProps) => this.$slots.append?.(slotProps),
}
)
- }
+ },
}
diff --git a/src/components/graphqlFormGenerator/components/Enum.vue b/src/components/graphqlFormGenerator/components/Enum.vue
index 304b2addb..43ca28c39 100644
--- a/src/components/graphqlFormGenerator/components/Enum.vue
+++ b/src/components/graphqlFormGenerator/components/Enum.vue
@@ -57,6 +57,6 @@ export default {
({ name }) => name === this.modelValue
)?.description ?? ''
},
- }
+ },
}
diff --git a/src/components/graphqlFormGenerator/components/List.vue b/src/components/graphqlFormGenerator/components/List.vue
index 8167ee359..594496c8f 100644
--- a/src/components/graphqlFormGenerator/components/List.vue
+++ b/src/components/graphqlFormGenerator/components/List.vue
@@ -66,14 +66,14 @@ export default {
name: 'g-list',
mixins: [
- formElement
+ formElement,
],
props: {
addAtStart: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
inheritAttrs: false,
@@ -102,7 +102,7 @@ export default {
/** Remove the item at `index` from the list. */
remove (index) {
this.modelValue.splice(index, 1)
- }
+ },
},
icons: {
diff --git a/src/components/graphqlFormGenerator/components/MapItem.vue b/src/components/graphqlFormGenerator/components/MapItem.vue
index ccd12a442..2deb9f0af 100644
--- a/src/components/graphqlFormGenerator/components/MapItem.vue
+++ b/src/components/graphqlFormGenerator/components/MapItem.vue
@@ -66,7 +66,7 @@ export default {
name: 'g-map-item',
mixins: [
- formElement
+ formElement,
],
inheritAttrs: false,
@@ -76,13 +76,13 @@ export default {
return {
location: 'top',
disabled: !this.modelValue.frozenKey,
- openDelay: 400
+ openDelay: 400,
}
- }
+ },
},
textFieldProps: {
- hideDetails: true
- }
+ hideDetails: true,
+ },
}
diff --git a/src/components/graphqlFormGenerator/components/NonNull.vue b/src/components/graphqlFormGenerator/components/NonNull.vue
index a087389be..205989d38 100644
--- a/src/components/graphqlFormGenerator/components/NonNull.vue
+++ b/src/components/graphqlFormGenerator/components/NonNull.vue
@@ -40,6 +40,6 @@ export default {
mixins: [formElement],
- nonNullRule
+ nonNullRule,
}
diff --git a/src/components/graphqlFormGenerator/components/Object.vue b/src/components/graphqlFormGenerator/components/Object.vue
index ce56f040c..6bc408840 100644
--- a/src/components/graphqlFormGenerator/components/Object.vue
+++ b/src/components/graphqlFormGenerator/components/Object.vue
@@ -19,11 +19,11 @@ along with this program. If not, see .
@@ -45,9 +45,9 @@ export default {
inputs () {
return this.type.fields.map(field => ({
gqlType: field.type,
- label: field.name
+ label: field.name,
}))
- }
- }
+ },
+ },
}
diff --git a/src/components/graphqlFormGenerator/components/vuetify.js b/src/components/graphqlFormGenerator/components/vuetify.js
index c1c009322..57a9ebb4f 100644
--- a/src/components/graphqlFormGenerator/components/vuetify.js
+++ b/src/components/graphqlFormGenerator/components/vuetify.js
@@ -30,12 +30,12 @@ const NumberFieldProps = {
is: VTextField,
type: 'number',
modelModifiers: {
- number: true
- }
+ number: true,
+ },
}
const RE = {
- cyclePoint: '\\d+(T\\d+(Z|[+-]\\d+)?)?'
+ cyclePoint: '\\d+(T\\d+(Z|[+-]\\d+)?)?',
}
export const RULES = {
@@ -51,7 +51,7 @@ export const RULES = {
taskID:
(x) => Boolean(!x || x.match(/^(.){1,}\/(.){1,}$/)) || 'Invalid',
flow:
- (x) => Boolean(!x || x.match(/(^\d+$|^(all|new|none)$)/)) || 'Invalid'
+ (x) => Boolean(!x || x.match(/(^\d+$|^(all|new|none)$)/)) || 'Invalid',
}
export const RUNTIME_SETTING = 'RuntimeSetting'
@@ -63,7 +63,7 @@ export const inputDefaults = Object.fromEntries(
{
variant: 'filled',
hideDetails: false,
- }
+ },
])
)
@@ -74,21 +74,21 @@ export default {
//
// * GraphQL types *
String: {
- is: VTextField
+ is: VTextField,
},
Int: {
...NumberFieldProps,
rules: [
- RULES.integer
- ]
+ RULES.integer,
+ ],
},
Float: {
- ...NumberFieldProps
+ ...NumberFieldProps,
},
Boolean: {
is: VSwitch,
color: 'primary',
- class: 'mx-3'
+ class: 'mx-3',
},
// * Cylc types *
@@ -96,113 +96,113 @@ export default {
WorkflowID: {
is: VTextField,
rules: [
- RULES.noSpaces
- ]
+ RULES.noSpaces,
+ ],
},
User: {
is: VTextField,
rules: [
- RULES.noSpaces
- ]
+ RULES.noSpaces,
+ ],
},
CyclePoint: {
is: VTextField,
rules: [
RULES.noSpaces,
// character whitelist
- x => Boolean(!x || x.match(`^${RE.cyclePoint}$`)) || 'Invalid Cycle Point'
- ]
+ x => Boolean(!x || x.match(`^${RE.cyclePoint}$`)) || 'Invalid Cycle Point',
+ ],
},
CyclePointGlob: {
is: VTextField,
rules: [
RULES.noSpaces,
// character whitelist
- x => Boolean(!x || x.match(/^[\dT*]+$/)) || 'Invalid Cycle Point Glob'
- ]
+ x => Boolean(!x || x.match(/^[\dT*]+$/)) || 'Invalid Cycle Point Glob',
+ ],
},
BroadcastSetting: {
- is: GBroadcastSetting
+ is: GBroadcastSetting,
},
BroadcastCyclePoint: {
is: VTextField,
rules: [
- x => Boolean(!x || x.match(`^(${RE.cyclePoint}|\\*)$`)) || 'Must be "*" or a valid cycle point'
- ]
+ x => Boolean(!x || x.match(`^(${RE.cyclePoint}|\\*)$`)) || 'Must be "*" or a valid cycle point',
+ ],
},
// TaskStatus
// TaskState
TaskName: {
is: VTextField,
rules: [
- RULES.noSpaces
- ]
+ RULES.noSpaces,
+ ],
},
TaskID: {
is: VTextField,
placeholder: 'cycle/task',
rules: [
RULES.noSpaces,
- RULES.taskID
- ]
+ RULES.taskID,
+ ],
},
NamespaceName: {
is: VTextField,
rules: [
- RULES.noSpaces
- ]
+ RULES.noSpaces,
+ ],
},
NamespaceIDGlob: {
is: VTextField,
placeholder: 'cycle[/task][:status]',
rules: [
- RULES.noSpaces
- ]
+ RULES.noSpaces,
+ ],
},
TimePoint: {
is: VTextField,
placeholder: 'yyyy-mm-ddThh:mm:ss',
mask: '####-##-##T##:##:##',
rules: [
- x => Boolean(!x || x.match(/^\d{4}(-\d{2}(-\d{2}(T\d{2}(:\d{2}(:\d{2})?)?)?)?)?$/)) || 'Invalid'
- ]
+ x => Boolean(!x || x.match(/^\d{4}(-\d{2}(-\d{2}(T\d{2}(:\d{2}(:\d{2})?)?)?)?)?$/)) || 'Invalid',
+ ],
},
RuntimeConfiguration: {
is: VTextField,
placeholder: '[section]setting',
rules: [
- RULES.cylcConfigItem
- ]
+ RULES.cylcConfigItem,
+ ],
},
Flow: {
is: VTextField,
placeholder: 'flow number',
rules: [
- RULES.flow
- ]
+ RULES.flow,
+ ],
},
[RUNTIME_SETTING]: {
- is: GMapItem
- }
+ is: GMapItem,
+ },
},
kinds: {
// registry of GraphQL "kinds" (e.g. LIST)
// { kind: (ofType) => ({ is: ComponentClass, prop1: value, ... }) }
ENUM: (ofType) => ({
- is: GEnum
+ is: GEnum,
}),
NON_NULL: (ofType) => ({
- is: GNonNull
+ is: GNonNull,
}),
LIST: (ofType) => ({
is: GList,
- addAtStart: ofType?.name === RUNTIME_SETTING
+ addAtStart: ofType?.name === RUNTIME_SETTING,
}),
OBJECT: (ofType) => ({
- is: GObject // happy naming coincidence
- })
- }
+ is: GObject, // happy naming coincidence
+ }),
+ },
}
export function getComponentProps (gqlType, namedTypes, kinds) {
diff --git a/src/components/graphqlFormGenerator/mixins.js b/src/components/graphqlFormGenerator/mixins.js
index 1249aae07..3cf908b6d 100644
--- a/src/components/graphqlFormGenerator/mixins.js
+++ b/src/components/graphqlFormGenerator/mixins.js
@@ -24,17 +24,17 @@ export const formElement = {
// the GraphQL type this input represents
gqlType: {
type: Object,
- required: true
+ required: true,
},
// array of all GraphQL types in the schema
types: {
type: Array,
- default: () => []
+ default: () => [],
},
// the value (v-model is actually syntactic sugar for this)
modelValue: {
- required: true
- }
+ required: true,
+ },
},
emits: ['update:modelValue'],
@@ -62,7 +62,7 @@ export const formElement = {
},
set (val) {
this.$emit('update:modelValue', val)
- }
+ },
},
type () {
@@ -80,6 +80,6 @@ export const formElement = {
return this.type.description.trim()
}
return null
- }
- }
+ },
+ },
}
diff --git a/src/graphql/graphiql.js b/src/graphql/graphiql.js
index 26916c0a0..90f72e166 100644
--- a/src/graphql/graphiql.js
+++ b/src/graphql/graphiql.js
@@ -76,7 +76,7 @@ const graphQLFetcher = function (subscriptionsClient, fallbackFetcher, component
observer.next('Your subscription data will appear here after server publication!')
const subscription = subscriptionsClient.request({
query: graphQLParams.query,
- variables: graphQLParams.variables
+ variables: graphQLParams.variables,
}, function (error, result) {
if (error) {
observer.error(error)
@@ -92,7 +92,7 @@ const graphQLFetcher = function (subscriptionsClient, fallbackFetcher, component
}
})
return component.subscription
- }
+ },
}
} else {
return fallbackFetcher(graphQLParams)
@@ -115,10 +115,10 @@ function fallbackGraphQLFetcher (graphQLParams) {
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
- ...getXSRFHeaders()
+ ...getXSRFHeaders(),
},
body: JSON.stringify(graphQLParams),
- credentials: 'include'
+ credentials: 'include',
}
).then(function (response) {
return response.json().catch(function () {
@@ -129,5 +129,5 @@ function fallbackGraphQLFetcher (graphQLParams) {
export {
graphQLFetcher,
- fallbackGraphQLFetcher
+ fallbackGraphQLFetcher,
}
diff --git a/src/graphql/index.js b/src/graphql/index.js
index bd11c8551..7da93a391 100644
--- a/src/graphql/index.js
+++ b/src/graphql/index.js
@@ -21,7 +21,7 @@ import {
ApolloLink,
HttpLink,
InMemoryCache,
- split
+ split,
} from '@apollo/client/core'
import { getMainDefinition } from '@apollo/client/utilities'
import { WebSocketLink } from '@apollo/client/link/ws'
@@ -42,7 +42,7 @@ export function createGraphQLUrls () {
const wsUrl = createUrl('subscriptions', true)
return {
httpUrl,
- wsUrl
+ wsUrl,
}
}
@@ -112,7 +112,7 @@ export function createSubscriptionClient (wsUrl, options = {}, wsImpl = null) {
*/
export function createApolloClient (httpUrl, subscriptionClient) {
const httpLink = new HttpLink({
- uri: httpUrl
+ uri: httpUrl,
})
const wsLink = subscriptionClient !== null
@@ -133,8 +133,8 @@ export function createApolloClient (httpUrl, subscriptionClient) {
return {
headers: {
...headers,
- ...getXSRFHeaders()
- }
+ ...getXSRFHeaders(),
+ },
}
})
@@ -144,13 +144,13 @@ export function createApolloClient (httpUrl, subscriptionClient) {
defaultOptions: {
query: {
fetchPolicy: 'no-cache',
- errorPolicy: 'all'
+ errorPolicy: 'all',
},
watchQuery: {
fetchPolicy: 'no-cache',
- errorPolicy: 'all'
- }
+ errorPolicy: 'all',
+ },
},
- connectToDevTools: import.meta.env.MODE !== 'production'
+ connectToDevTools: import.meta.env.MODE !== 'production',
})
}
diff --git a/src/graphql/merge.js b/src/graphql/merge.js
index 016242333..9ebda6e65 100644
--- a/src/graphql/merge.js
+++ b/src/graphql/merge.js
@@ -68,7 +68,7 @@ function mergeQueries (queryA, queryB) {
// Finally return the merged definitions and fragments (loc in the AST nodes is not important).
queryA.definitions = [
definition,
- ...fragments
+ ...fragments,
]
return queryA
}
diff --git a/src/i18n/index.js b/src/i18n/index.js
index fa493e950..150a2c3c1 100644
--- a/src/i18n/index.js
+++ b/src/i18n/index.js
@@ -30,5 +30,5 @@ export const i18n = createI18n({
legacy: false,
locale: 'en-GB',
fallbackLocale: 'en-GB',
- messages
+ messages,
})
diff --git a/src/layouts/Default.vue b/src/layouts/Default.vue
index 533be965e..08ad01c2d 100644
--- a/src/layouts/Default.vue
+++ b/src/layouts/Default.vue
@@ -88,19 +88,19 @@ export default {
CommandMenu,
Alert,
Drawer,
- Toolbar
+ Toolbar,
},
props: {
showSidebar: {
type: Boolean,
required: false,
- default: true
- }
+ default: true,
+ },
},
computed: {
- ...mapState(['offline'])
+ ...mapState(['offline']),
},
errorCaptured (error, vm, info) {
@@ -109,6 +109,6 @@ export default {
}
// Stop error propagating further:
return false
- }
+ },
}
diff --git a/src/layouts/Empty.vue b/src/layouts/Empty.vue
index 64f2dee0d..f53a1a49f 100644
--- a/src/layouts/Empty.vue
+++ b/src/layouts/Empty.vue
@@ -23,7 +23,7 @@ along with this program. If not, see .
diff --git a/src/mixins/graphql.js b/src/mixins/graphql.js
index 26d208000..7be8b24e7 100644
--- a/src/mixins/graphql.js
+++ b/src/mixins/graphql.js
@@ -29,8 +29,8 @@ export default {
/** This is set by vue-router */
workflowName: {
type: String,
- required: true
- }
+ required: true,
+ },
},
computed: {
/**
@@ -57,8 +57,8 @@ export default {
*/
variables () {
return {
- workflowId: this.workflowId
+ workflowId: this.workflowId,
}
- }
- }
+ },
+ },
}
diff --git a/src/mixins/subscription.js b/src/mixins/subscription.js
index 15a8872bc..7ca8451a5 100644
--- a/src/mixins/subscription.js
+++ b/src/mixins/subscription.js
@@ -31,7 +31,7 @@ import { mapActions } from 'vuex'
export default {
data () {
return {
- viewState: ViewState.NO_STATE
+ viewState: ViewState.NO_STATE,
}
},
computed: {
@@ -39,9 +39,9 @@ export default {
// Note: this.viewState is Proxy object so comparison
// doesn't work without toRaw()
return toRaw(this.viewState) === ViewState.LOADING
- }
+ },
},
methods: {
- ...mapActions(['setAlert'])
- }
+ ...mapActions(['setAlert']),
+ },
}
diff --git a/src/mixins/subscriptionComponent.js b/src/mixins/subscriptionComponent.js
index 409449b87..cc1b0fd8b 100644
--- a/src/mixins/subscriptionComponent.js
+++ b/src/mixins/subscriptionComponent.js
@@ -32,7 +32,7 @@ import { uniqueId } from 'lodash'
*/
export default {
mixins: [
- subscriptionMixin
+ subscriptionMixin,
],
beforeCreate () {
// Uniquely identify this component/view so we can keep track of which
@@ -61,12 +61,12 @@ export default {
this.$workflowService.subscribe(this)
this.$workflowService.startSubscriptions()
}
- }
+ },
},
watch: {
query (newVal, oldVal) {
// if the query changes, unsubscribe & re-subscribe
this._updateQuery(newVal, oldVal)
- }
- }
+ },
+ },
}
diff --git a/src/model/TaskOutput.model.js b/src/model/TaskOutput.model.js
index e6fe99c7c..631cf5b02 100644
--- a/src/model/TaskOutput.model.js
+++ b/src/model/TaskOutput.model.js
@@ -48,7 +48,7 @@ export const TASK_OUTPUT_NAMES = [
TaskOutput.SUCCEEDED.name,
TaskOutput.SUBMIT_FAILED.name,
TaskOutput.FAILED.name,
- TaskOutput.EXPIRED.name
+ TaskOutput.EXPIRED.name,
]
export default TaskOutput
diff --git a/src/model/TaskState.model.js b/src/model/TaskState.model.js
index 63501409a..e3be17dcc 100644
--- a/src/model/TaskState.model.js
+++ b/src/model/TaskState.model.js
@@ -52,7 +52,7 @@ export const TaskStateUserOrder = [
TaskState.SUCCEEDED,
TaskState.SUBMIT_FAILED,
TaskState.FAILED,
- TaskState.EXPIRED
+ TaskState.EXPIRED,
]
export const TaskStateNames = TaskStateUserOrder.map(({ name }) => name)
diff --git a/src/model/WorkflowState.model.js b/src/model/WorkflowState.model.js
index daa22eb7b..68b11bbc9 100644
--- a/src/model/WorkflowState.model.js
+++ b/src/model/WorkflowState.model.js
@@ -21,7 +21,7 @@ import {
mdiPauseCircle,
mdiPlayCircle,
mdiSkipNextCircle,
- mdiStopCircle
+ mdiStopCircle,
} from '@mdi/js'
/**
@@ -56,7 +56,7 @@ export const WorkflowStateOrder = new Map([
[WorkflowState.PAUSED.name, 1],
[WorkflowState.STOPPING.name, 1],
[WorkflowState.STOPPED.name, 2],
- [undefined, 9]
+ [undefined, 9],
])
/** @type {string[]} */
diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js
index 19b147213..b066b5781 100644
--- a/src/plugins/vuetify.js
+++ b/src/plugins/vuetify.js
@@ -43,7 +43,7 @@ const inputDefaults = Object.fromEntries(
variant: 'outlined',
clearIcon: mdiClose,
hideDetails: 'auto',
- }
+ },
])
)
@@ -60,27 +60,27 @@ export const vuetifyOptions = {
primary: colors.lightBlue.accent4,
'primary-darken-1': colors.lightBlue.darken4,
secondary: colors.teal.accent4,
- 'secondary-darken-1': colors.teal.darken3
- }
- }
- }
+ 'secondary-darken-1': colors.teal.darken3,
+ },
+ },
+ },
},
display: {
- mobileBreakpoint: 991
+ mobileBreakpoint: 991,
},
icons: {
defaultSet: 'mdi',
aliases,
sets: {
- mdi
- }
+ mdi,
+ },
},
defaults: {
VTooltip: {
activator: 'parent',
location: 'bottom',
},
- ...inputDefaults
+ ...inputDefaults,
},
}
diff --git a/src/router/index.js b/src/router/index.js
index 8381a14cf..69e751b20 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -40,7 +40,7 @@ function getRoute (path) {
return {
...path,
name: path.name || path.view,
- component: () => import(`@/views/${path.view}.vue`)
+ component: () => import(`@/views/${path.view}.vue`),
}
}
@@ -67,7 +67,7 @@ const router = createRouter({
return { selector: to.hash }
}
return { left: 0, top: 0 }
- }
+ },
})
router.beforeEach(async (to, from) => {
diff --git a/src/router/paths.js b/src/router/paths.js
index 8b70e8a83..f0a9a470a 100644
--- a/src/router/paths.js
+++ b/src/router/paths.js
@@ -33,16 +33,16 @@ export default [
view: 'Dashboard',
meta: {
title: i18n.global.t('App.dashboard'),
- layout: 'default'
- }
+ layout: 'default',
+ },
},
{
path: '/workflow-table',
view: 'WorkflowsTable',
meta: {
title: 'Workflow Table',
- layout: 'default'
- }
+ layout: 'default',
+ },
},
{
path: '/workspace/:workflowName(.*)',
@@ -50,41 +50,41 @@ export default [
meta: {
getTitle: workflowTitle,
layout: 'default',
- toolbar: true
+ toolbar: true,
},
- props: true
+ props: true,
},
{
path: '/user-profile',
view: 'UserProfile',
meta: {
title: i18n.global.t('App.userProfile'),
- layout: 'default'
- }
+ layout: 'default',
+ },
},
{
path: '/guide',
view: 'Guide',
meta: {
title: i18n.global.t('App.guide'),
- layout: 'default'
- }
+ layout: 'default',
+ },
},
{
path: '/graphiql',
view: 'GraphiQL',
meta: {
title: 'GraphiQL',
- layout: 'empty'
- }
+ layout: 'empty',
+ },
},
{
path: '/:catchAll(.*)',
view: 'NotFound',
meta: {
title: i18n.global.t('App.notFound'),
- layout: 'empty'
- }
+ layout: 'empty',
+ },
},
// the standalone views
@@ -95,8 +95,8 @@ export default [
title: i18n.global.t('App.workflows'),
layout: 'default',
toolbar: false,
- showSidebar: false
- }
+ showSidebar: false,
+ },
},
{
path: '/tree/:workflowName(.*)',
@@ -105,9 +105,9 @@ export default [
getTitle: workflowTitle,
layout: 'default',
toolbar: true,
- showSidebar: false
+ showSidebar: false,
},
- props: true
+ props: true,
},
{
path: '/table/:workflowName(.*)',
@@ -116,9 +116,9 @@ export default [
getTitle: workflowTitle,
layout: 'default',
toolbar: true,
- showSidebar: false
+ showSidebar: false,
},
- props: true
+ props: true,
},
{
path: '/graph/:workflowName(.*)',
@@ -127,9 +127,9 @@ export default [
getTitle: workflowTitle,
layout: 'default',
toolbar: true,
- showSidebar: false
+ showSidebar: false,
},
- props: true
+ props: true,
},
{
path: '/log/:workflowName(.*)',
@@ -138,9 +138,9 @@ export default [
getTitle: workflowTitle,
layout: 'default',
toolbar: true,
- showSidebar: false
+ showSidebar: false,
},
- props: true
+ props: true,
},
{
path: '/analysis/:workflowName(.*)',
@@ -149,9 +149,9 @@ export default [
getTitle: workflowTitle,
layout: 'default',
toolbar: true,
- showSidebar: false
+ showSidebar: false,
},
- props: true
+ props: true,
},
{
path: '/gantt/:workflowName(.*)',
@@ -160,9 +160,9 @@ export default [
getTitle: workflowTitle,
layout: 'default',
toolbar: true,
- showSidebar: false
+ showSidebar: false,
},
- props: true
+ props: true,
},
{
path: '/noAuth',
diff --git a/src/services/mock/.eslintrc.cjs b/src/services/mock/.eslintrc.cjs
index a40aaa8ca..0c567a861 100644
--- a/src/services/mock/.eslintrc.cjs
+++ b/src/services/mock/.eslintrc.cjs
@@ -1,5 +1,5 @@
module.exports = {
rules: {
- 'no-console': 'off'
- }
+ 'no-console': 'off',
+ },
}
diff --git a/src/services/mock/graphql.cjs b/src/services/mock/graphql.cjs
index 17fc59797..f3a97f091 100644
--- a/src/services/mock/graphql.cjs
+++ b/src/services/mock/graphql.cjs
@@ -90,5 +90,5 @@ async function handleGraphQLRequest (request) {
module.exports = {
getOperationName,
getGraphQLQueryResponse,
- handleGraphQLRequest
+ handleGraphQLRequest,
}
diff --git a/src/services/mock/json-server.cjs b/src/services/mock/json-server.cjs
index 26ad862df..0bbcae4c2 100644
--- a/src/services/mock/json-server.cjs
+++ b/src/services/mock/json-server.cjs
@@ -36,8 +36,8 @@ const middlewares = [
...jsonServer.defaults({ logger: false }),
// Customize logger to hide successful XHR requests:
logger('dev', {
- skip: (req, res) => res.statusCode < 400
- })
+ skip: (req, res) => res.statusCode < 400,
+ }),
]
server.use(middlewares)
diff --git a/src/services/mock/json/index.cjs b/src/services/mock/json/index.cjs
index 451a024ce..55b7c7757 100644
--- a/src/services/mock/json/index.cjs
+++ b/src/services/mock/json/index.cjs
@@ -39,5 +39,5 @@ module.exports = {
analysisJobQuery: analysisQuery.jobQuery,
analysisQuery,
ganttQuery,
- InfoViewSubscription
+ InfoViewSubscription,
}
diff --git a/src/services/mock/json/logData.cjs b/src/services/mock/json/logData.cjs
index e94fd5ebc..068eb3e98 100644
--- a/src/services/mock/json/logData.cjs
+++ b/src/services/mock/json/logData.cjs
@@ -25,7 +25,7 @@ const jobLogLines = [
'two\n',
'three\n',
'four\n',
- 'five\n'
+ 'five\n',
]
const workflowLogLines = [
@@ -57,7 +57,7 @@ const LogData = async ({ id, file }) => {
: undefined,
path: `my-host:${path}`,
lines: isJob ? jobLogLines : workflowLogLines,
- }
+ },
}
}
diff --git a/src/services/mock/json/logFiles.cjs b/src/services/mock/json/logFiles.cjs
index 84fc3861f..f0b9add41 100644
--- a/src/services/mock/json/logFiles.cjs
+++ b/src/services/mock/json/logFiles.cjs
@@ -44,9 +44,9 @@ const LogFiles = async ({ id }) => {
logFiles: {
files: id == null
? []
- : id.includes('//') ? jobLogFiles : workflowLogFiles
- }
- }
+ : id.includes('//') ? jobLogFiles : workflowLogFiles,
+ },
+ },
}
}
@@ -69,8 +69,8 @@ const JobState = async ({ id, workflowId }) => {
await simulatedDelay(500)
return {
data: {
- jobs: state ? [{ id, state }] : []
- }
+ jobs: state ? [{ id, state }] : [],
+ },
}
}
diff --git a/src/services/mock/websockets.cjs b/src/services/mock/websockets.cjs
index 1334d9b0d..2750b3542 100644
--- a/src/services/mock/websockets.cjs
+++ b/src/services/mock/websockets.cjs
@@ -29,12 +29,12 @@ const graphql = require('./graphql.cjs')
function wsResponse (id, type, data = null) {
const response = {
id,
- type
+ type,
}
// connection ack does not include a payload
if (data) {
response.payload = {
- data
+ data,
}
}
return JSON.stringify(response)
diff --git a/src/services/workflow.service.js b/src/services/workflow.service.js
index 2f8314f96..a90b772d4 100644
--- a/src/services/workflow.service.js
+++ b/src/services/workflow.service.js
@@ -30,7 +30,7 @@ import {
primaryMutations,
processMutations,
query,
- tokenise
+ tokenise,
} from '@/utils/aotf'
import { store } from '@/store/index'
import { createApolloClient } from '@/graphql/index'
@@ -118,7 +118,7 @@ class WorkflowService {
mutation,
tokenise(id),
),
- ...args
+ ...args,
},
this.apolloClient
)
@@ -146,7 +146,7 @@ class WorkflowService {
const response = await this.apolloClient.query({
query,
variables,
- fetchPolicy: 'no-cache'
+ fetchPolicy: 'no-cache',
})
return response
}
@@ -163,7 +163,7 @@ class WorkflowService {
try {
response = await this.apolloClient.query({
query: getIntrospectionQuery(),
- fetchPolicy: 'no-cache'
+ fetchPolicy: 'no-cache',
})
} catch (err) {
console.error(err)
@@ -208,7 +208,7 @@ class WorkflowService {
return {
name: queryName,
args: queryObj.args.filter(({ name }) => argNames.includes(name)),
- fields: extractFields(type, fields, types)
+ fields: extractFields(type, fields, types),
}
}
@@ -306,7 +306,7 @@ class WorkflowService {
},
error: function error (err) {
subscription.handleViewState(ViewState.ERROR, err)
- }
+ },
}
)
this.subscriptions[subscription.query.name] = subscription
@@ -363,7 +363,7 @@ class WorkflowService {
},
error: function error (err) {
subscription.handleViewState(ViewState.ERROR, err)
- }
+ },
}
)
this.subscriptions[subscription.query.name] = subscription
@@ -402,14 +402,14 @@ class WorkflowService {
return this.apolloClient.subscribe({
query,
variables,
- fetchPolicy: 'no-cache'
+ fetchPolicy: 'no-cache',
}).subscribe({
next (value) {
subscriptionOptions.next(value)
},
error (errorValue) {
subscriptionOptions.error(errorValue)
- }
+ },
})
}
diff --git a/src/store/app.module.js b/src/store/app.module.js
index 2fe718eac..206555e78 100644
--- a/src/store/app.module.js
+++ b/src/store/app.module.js
@@ -37,11 +37,11 @@ const mutations = {
const firstKey = workspaceLayouts.keys().next().value
workspaceLayouts.delete(firstKey)
}
- }
+ },
}
export const app = {
namespaced: true,
state,
- mutations
+ mutations,
}
diff --git a/src/store/options.js b/src/store/options.js
index b66e703b4..47428da0f 100644
--- a/src/store/options.js
+++ b/src/store/options.js
@@ -34,7 +34,7 @@ const state = () => ({
* Number of references that have set the loading state.
* TODO: we can probably remove it and use a different approach for alerts (see bootstrap toast).
*/
- refCount: 0
+ refCount: 0,
})
// Actions
@@ -53,7 +53,7 @@ const actions = {
console.log(alert.err)
}
commit('SET_ALERT', alert)
- }
+ },
}
// Mutations
@@ -63,7 +63,7 @@ const mutations = {
},
SET_OFFLINE (state, offline) {
state.offline = offline
- }
+ },
}
// Create a new store
@@ -71,9 +71,9 @@ export default {
modules: {
app,
workflows,
- user
+ user,
},
actions,
mutations,
- state
+ state,
}
diff --git a/src/store/user.module.js b/src/store/user.module.js
index 2a6a8bf3c..f3510a033 100644
--- a/src/store/user.module.js
+++ b/src/store/user.module.js
@@ -22,7 +22,7 @@ export const state = () => ({
export const mutations = {
SET_USER (state, user) {
state.user = user
- }
+ },
}
export const user = {
diff --git a/src/store/workflows.module.js b/src/store/workflows.module.js
index 7fcd95797..6c7b09881 100644
--- a/src/store/workflows.module.js
+++ b/src/store/workflows.module.js
@@ -25,13 +25,13 @@ const NODE_TYPES = [
'workflow',
'cycle',
'task',
- 'job'
+ 'job',
]
const state = () => ({
cylcTree: {
$index: {},
- children: []
+ children: [],
},
})
@@ -73,7 +73,7 @@ const getters = {
}
}
return ret
- }
+ },
}
/* Initialise the data store. */
@@ -193,11 +193,11 @@ function removeTree (state, node, removeParent = true) {
let pointer
const stack = [
...node.children || [],
- ...node.familyTree || []
+ ...node.familyTree || [],
]
const removeIndicies = [
...node.$namespaces || [],
- ...node.$edges || []
+ ...node.$edges || [],
]
const removeNodes = []
while (stack.length) {
@@ -323,7 +323,7 @@ function getFamilyTree (tokens, node) {
ret.push([
'family',
ancestor.name,
- lastTokens.clone({ task: ancestor.name })
+ lastTokens.clone({ task: ancestor.name }),
])
}
@@ -331,7 +331,7 @@ function getFamilyTree (tokens, node) {
ret.push([
'family',
tokens[tokens.lowestToken()],
- tokens
+ tokens,
])
return ret
@@ -385,7 +385,7 @@ function createTreeNode (state, id, tokens, node) {
// create a blank node with just the ID in it
// when this item is added to the store later this node will be
// updated in place
- id: partTokens.id
+ id: partTokens.id,
},
parent: pointer.id,
tokens: partTokens,
@@ -508,7 +508,7 @@ const mutations = {
}
// console.log('@@')
},
- CLEAR: clearTree
+ CLEAR: clearTree,
}
// NOTE: deltas are applied in the order listed here
@@ -528,5 +528,5 @@ export const workflows = {
state,
getters,
mutations,
- actions
+ actions,
}
diff --git a/src/utils/aotf.js b/src/utils/aotf.js
index 01fdcd084..e5f4f7e35 100644
--- a/src/utils/aotf.js
+++ b/src/utils/aotf.js
@@ -25,7 +25,7 @@ import dedent from 'dedent'
import gql from 'graphql-tag'
import {
getIntrospectionQuery as getGraphQLIntrospectionQuery,
- print
+ print,
} from 'graphql'
import {
mdiBullhorn,
@@ -162,7 +162,7 @@ export const cylcObjects = Object.freeze({
CyclePoint: 'cycle',
Namespace: 'task',
// Task: 'task',
- Job: 'job'
+ Job: 'job',
})
/**
@@ -176,13 +176,13 @@ export const primaryMutations = {
'stop',
'reload',
'clean',
- 'log'
+ 'log',
],
[cylcObjects.CyclePoint]: [
'hold',
'release',
'trigger',
- 'kill'
+ 'kill',
],
[cylcObjects.Namespace]: [
'hold',
@@ -191,8 +191,8 @@ export const primaryMutations = {
'kill',
'log',
'info',
- 'set'
- ]
+ 'set',
+ ],
}
// handle families the same as tasks
@@ -209,7 +209,7 @@ const identifierOrder = [
cylcObjects.CyclePoint,
cylcObjects.Namespace,
// cylcObjects.Task,
- cylcObjects.Job
+ cylcObjects.Job,
]
/**
@@ -225,22 +225,22 @@ const identifierOrder = [
export const mutationMapping = {
[cylcObjects.User]: [],
[cylcObjects.Workflow]: [
- ['WorkflowID', false]
+ ['WorkflowID', false],
],
[cylcObjects.CyclePoint]: [
['CyclePoint', false],
- ['CyclePointGlob', true]
+ ['CyclePointGlob', true],
],
[cylcObjects.Namespace]: [
['NamespaceName', false],
- ['NamespaceIDGlob', true]
+ ['NamespaceIDGlob', true],
],
// [cylcObjects.Task]: [
// ['TaskID', false]
// ],
[cylcObjects.Job]: [
- ['JobID', false]
- ]
+ ['JobID', false],
+ ],
}
/**
@@ -266,7 +266,7 @@ export const compoundFields = {
(tokens[cylcObjects.CyclePoint] || '*') +
'/' +
tokens[cylcObjects.Namespace]
- )
+ ),
}
/**
@@ -277,7 +277,7 @@ export const compoundFields = {
*/
export const alternateFields = {
// cycle points can be used as namespace identifiers
- NamespaceIDGlob: cylcObjects.CyclePoint
+ NamespaceIDGlob: cylcObjects.CyclePoint,
}
/**
@@ -288,7 +288,7 @@ export const alternateFields = {
export const mutationStatus = Object.freeze({
FAILED: 'FAILED',
SUCCEEDED: 'SUCCEEDED',
- WARN: 'WARN'
+ WARN: 'WARN',
})
/**
@@ -322,7 +322,7 @@ export const dummyMutations = [
description: 'View task information.',
args: [],
_appliesTo: [cylcObjects.Namespace],
- _requiresInfo: false
+ _requiresInfo: false,
},
]
@@ -333,7 +333,7 @@ export const dummyMutations = [
*/
const dummyMutationsPermissionsMap = Object.freeze({
broadcast: Object.freeze(['editRuntime']),
- read: Object.freeze(['log', 'info'])
+ read: Object.freeze(['log', 'info']),
})
/**
@@ -422,7 +422,7 @@ export function extractFields (type, fields, types) {
const fieldType = findByName(types, getBaseType(gqlField.type).name)
return {
name: field.name,
- fields: extractFields(fieldType, field.fields, types)
+ fields: extractFields(fieldType, field.fields, types),
}
})
}
@@ -833,7 +833,7 @@ export function constructQueryStr (query) {
` ${query.name}(${argNames.join(', ')}) {`,
constructFieldsStr(query.fields, 2),
' }',
- '}'
+ '}',
].join('\n').trim()
}
@@ -892,7 +892,7 @@ export function getMutationArgsFromTokens (mutation, tokens) {
function _mutateSuccess (message) {
return {
status: mutationStatus.SUCCEEDED,
- message
+ message,
}
}
@@ -941,14 +941,14 @@ export async function mutate (mutation, variables, apolloClient, cylcID) {
console.debug([
`mutation(${mutation.name})`,
mutationStr,
- variables
+ variables,
])
try {
// call the mutation
response = await apolloClient.mutate({
mutation: gql(mutationStr),
- variables
+ variables,
})
} catch (err) {
// mutation failed (client-server error e.g. variable format, syntax error)
@@ -993,12 +993,12 @@ export async function query (query, variables, apolloClient) {
console.debug([
`query(${query.name})`,
queryStr,
- variables
+ variables,
])
const response = await apolloClient.query({
query: gql(queryStr),
- variables
+ variables,
})
return response.data
}
diff --git a/src/utils/initialOptions.js b/src/utils/initialOptions.js
index 0d76ba72d..5d33dd0b7 100644
--- a/src/utils/initialOptions.js
+++ b/src/utils/initialOptions.js
@@ -31,7 +31,7 @@ import { ref, watch } from 'vue'
export const initialOptions = {
type: Object,
required: false,
- default: () => ({})
+ default: () => ({}),
}
export const updateInitialOptionsEvent = 'update:initialOptions'
diff --git a/src/utils/tasks.js b/src/utils/tasks.js
index bf6cd4734..6364657ca 100644
--- a/src/utils/tasks.js
+++ b/src/utils/tasks.js
@@ -30,7 +30,7 @@ const isStoppedOrderedStates = [
TaskState.EXPIRED,
TaskState.PREPARING,
TaskState.SUCCEEDED,
- TaskState.WAITING
+ TaskState.WAITING,
]
/**
diff --git a/src/utils/uid.js b/src/utils/uid.js
index 9f730a27d..091015031 100644
--- a/src/utils/uid.js
+++ b/src/utils/uid.js
@@ -317,7 +317,7 @@ export class Tokens {
// wipe the relative tokens in-case they were set
cycle: undefined,
task: undefined,
- job: undefined
+ job: undefined,
})
tokensList.push([part, tokens])
}
diff --git a/src/utils/viewToolbar.js b/src/utils/viewToolbar.js
index 54626a56b..4f8545203 100644
--- a/src/utils/viewToolbar.js
+++ b/src/utils/viewToolbar.js
@@ -36,6 +36,6 @@ export const btnProps = (size) => ({
variant: 'text',
size,
style: {
- fontSize: btnIconFontSize(size)
+ fontSize: btnIconFontSize(size),
},
})
diff --git a/src/views/Analysis.vue b/src/views/Analysis.vue
index 4b9d46923..70deb6f61 100644
--- a/src/views/Analysis.vue
+++ b/src/views/Analysis.vue
@@ -147,7 +147,7 @@ import graphqlMixin from '@/mixins/graphql'
import {
initialOptions,
updateInitialOptionsEvent,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
import DeltasCallback from '@/services/callbacks'
import AnalysisTable from '@/components/cylc/analysis/AnalysisTable.vue'
@@ -155,7 +155,7 @@ import BoxPlot from '@/components/cylc/analysis/BoxPlot.vue'
import TimeSeries from '@/components/cylc/analysis/TimeSeries.vue'
import {
matchTask,
- platformOptions
+ platformOptions,
} from '@/components/cylc/analysis/filter'
import {
mdiChartTimeline,
@@ -183,7 +183,7 @@ const taskFields = [
'stdDevQueueTime',
'minQueueTime',
'queueQuartiles',
- 'maxQueueTime'
+ 'maxQueueTime',
]
/** The one-off query which retrieves historical task timing statistics */
@@ -237,13 +237,13 @@ export default {
name: 'Analysis',
mixins: [
- graphqlMixin
+ graphqlMixin,
],
components: {
AnalysisTable,
BoxPlot,
- TimeSeries
+ TimeSeries,
},
beforeMount () {
@@ -324,7 +324,7 @@ export default {
timingOption () {
return this.tasksFilter.timingOption.replace(/Times/, '')
- }
+ },
},
methods: {
@@ -343,7 +343,7 @@ export default {
this.callback.onAdded(ret.data)
},
200 // only re-run this once every 0.2 seconds
- )
+ ),
},
icons: {
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
index f1d6bbd3f..b2214fcce 100644
--- a/src/views/Dashboard.vue
+++ b/src/views/Dashboard.vue
@@ -160,7 +160,7 @@ along with this program. If not, see .
{{ $options.icons.mdiGraphql }}
- GraphiQL
+ GraphiQL
Explore the Cylc GraphQL API
@@ -230,7 +230,7 @@ export default {
name: 'Dashboard',
mixins: [
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
data () {
@@ -265,23 +265,23 @@ export default {
.map(state => {
return {
text: state.name.charAt(0).toUpperCase() + state.name.slice(1),
- count: count[state.name] || 0
+ count: count[state.name] || 0,
}
})
},
multiUserMode () {
return this.user.mode !== 'single user'
- }
+ },
},
workflowsHeader: [
{ value: 'count' },
- { value: 'text' }
+ { value: 'text' },
],
eventsHeader: [
{ value: 'id' },
- { value: 'text' }
+ { value: 'text' },
],
hubUrl: createUrl('/hub/home', false, true),
diff --git a/src/views/Gantt.vue b/src/views/Gantt.vue
index e7d79b2c5..0f6e4894f 100644
--- a/src/views/Gantt.vue
+++ b/src/views/Gantt.vue
@@ -92,19 +92,19 @@ along with this program. If not, see .
diff --git a/src/views/Graph.vue b/src/views/Graph.vue
index 6b19689c5..635816534 100644
--- a/src/views/Graph.vue
+++ b/src/views/Graph.vue
@@ -107,7 +107,7 @@ import graphqlMixin from '@/mixins/graphql'
import subscriptionComponentMixin from '@/mixins/subscriptionComponent'
import {
initialOptions,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
import SubscriptionQuery from '@/model/SubscriptionQuery.model'
// import CylcTreeCallback from '@/services/treeCallback'
@@ -116,7 +116,7 @@ import GraphSubgraph from '@/components/cylc/GraphSubgraph.vue'
import ViewToolbar from '@/components/cylc/ViewToolbar.vue'
import {
posToPath,
- nonCryptoHash
+ nonCryptoHash,
} from '@/utils/graph-utils'
import { Graphviz } from '@hpcc-js/wasm/graphviz'
import svgPanZoom from 'svg-pan-zoom'
@@ -127,7 +127,7 @@ import {
mdiArrowExpand,
mdiRefresh,
mdiFileRotateRight,
- mdiVectorSelection
+ mdiVectorSelection,
} from '@mdi/js'
import { isFlowNone } from '@/utils/tasks'
@@ -224,13 +224,13 @@ export default {
mixins: [
graphqlMixin,
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
components: {
GraphNode,
GraphSubgraph,
- ViewToolbar
+ ViewToolbar,
},
props: { initialOptions },
@@ -343,51 +343,51 @@ export default {
icon: mdiRefresh,
action: 'callback',
callback: this.refresh,
- disableIf: ['autoRefresh']
+ disableIf: ['autoRefresh'],
},
{
title: 'Auto Refresh',
icon: mdiTimer,
action: 'toggle',
value: this.autoRefresh,
- key: 'autoRefresh'
+ key: 'autoRefresh',
},
{
title: 'Transpose',
icon: mdiFileRotateRight,
action: 'toggle',
value: this.transpose,
- key: 'transpose'
+ key: 'transpose',
},
{
title: 'Centre',
icon: mdiImageFilterCenterFocus,
action: 'callback',
- callback: this.reset
+ callback: this.reset,
},
{
title: 'Increase Spacing',
icon: mdiArrowExpand,
action: 'callback',
- callback: this.increaseSpacing
+ callback: this.increaseSpacing,
},
{
title: 'Decrease Spacing',
icon: mdiArrowCollapse,
action: 'callback',
- callback: this.decreaseSpacing
+ callback: this.decreaseSpacing,
},
{
title: 'Group by cycle point',
icon: mdiVectorSelection,
action: 'toggle',
value: this.groupCycle,
- key: 'groupCycle'
- }
- ]
- }
+ key: 'groupCycle',
+ },
+ ],
+ },
]
- }
+ },
},
methods: {
@@ -433,7 +433,7 @@ export default {
fit: false,
contain: false,
center: true,
- refreshRate: 'auto'
+ refreshRate: 'auto',
}
)
@@ -628,7 +628,7 @@ export default {
// pan to center
this.panZoomWidget.pan({
x: -realZoom * (bbox.x - width / (realZoom * 2) + bbox.width / 2),
- y: -realZoom * (bbox.y - height / (realZoom * 2) + bbox.height / 2)
+ y: -realZoom * (bbox.y - height / (realZoom * 2) + bbox.height / 2),
})
// zoom to fit
@@ -767,7 +767,7 @@ export default {
y: -top,
width: right - left,
height: top - bottom,
- label: obj.label
+ label: obj.label,
}
}
} else {
@@ -791,7 +791,7 @@ export default {
// mount the svgPanZoom widget on first load
this.mountSVGPanZoom()
}
- }
+ },
},
watch: {
@@ -820,8 +820,8 @@ export default {
// refresh the graph when group by cycle point option is changed
this.graphID = null
this.refresh()
- }
- }
+ },
+ },
}
diff --git a/src/views/GraphiQL.vue b/src/views/GraphiQL.vue
index 2ec02cb97..52a0282db 100644
--- a/src/views/GraphiQL.vue
+++ b/src/views/GraphiQL.vue
@@ -30,7 +30,7 @@ export default {
data () {
return {
fetcher: null,
- subscription: null
+ subscription: null,
}
},
mounted () {
@@ -38,7 +38,7 @@ export default {
render(
createElement(GraphiQL, {
fetcher: this.fetcher,
- defaultVariableEditorOpen: false
+ defaultVariableEditorOpen: false,
}),
this.$refs.graphiql
)
@@ -57,8 +57,8 @@ export default {
return subscriptionClient !== null
? graphQLFetcher(subscriptionClient, fallbackGraphQLFetcher, this)
: fallbackGraphQLFetcher
- }
- }
+ },
+ },
}
diff --git a/src/views/Guide.vue b/src/views/Guide.vue
index 46d6af493..f0482728a 100644
--- a/src/views/Guide.vue
+++ b/src/views/Guide.vue
@@ -47,35 +47,35 @@ along with this program. If not, see .
One task can have multiple jobs, by automatic retry or manual
triggering.
-
-
-
- Task |
- |
- Job |
-
-
-
-
-
- |
-
- {{ state.name }}
- |
-
-
- |
-
-
+
+
+
+ Task |
+ |
+ Job |
+
+
+
+
+
+ |
+
+ {{ state.name }}
+ |
+
+
+ |
+
+
A waiting task with failed jobs will
@@ -97,7 +97,7 @@ along with this program. If not, see .
Why has my task not started to run yet?
-
@@ -167,14 +167,14 @@ along with this program. If not, see .
- Note: tasks downstream of queued (or runahead limited) tasks
- are not themselves shown as queued (or runahead limited)
- because they are not otherwise ready to run yet.
-
+ Note: tasks downstream of queued (or runahead limited) tasks
+ are not themselves shown as queued (or runahead limited)
+ because they are not otherwise ready to run yet.
+
Note: external triggers (e.g. clock triggers) are not yet
- exposed in the UI.
-
+ exposed in the UI.
+
@@ -192,13 +192,13 @@ export default {
name: 'Guide',
components: {
task: Task,
- job: Job
+ job: Job,
},
// TODO: extract task states and descriptions from the GraphQL API
// once this is an enumeration.
data: () => ({
- states: TaskStateUserOrder
- })
+ states: TaskStateUserOrder,
+ }),
}
diff --git a/src/views/Info.vue b/src/views/Info.vue
index 3b60bfa5e..019ff5d4a 100644
--- a/src/views/Info.vue
+++ b/src/views/Info.vue
@@ -33,7 +33,7 @@ import SubscriptionQuery from '@/model/SubscriptionQuery.model'
import DeltasCallback from '@/services/callbacks'
import {
initialOptions,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
import { Tokens } from '@/utils/uid'
@@ -187,7 +187,7 @@ export default {
mixins: [
graphqlMixin,
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
components: {
@@ -197,7 +197,7 @@ export default {
head () {
return {
// This sets the page title.
- title: getPageTitle('App.workflow', { name: this.workflowName })
+ title: getPageTitle('App.workflow', { name: this.workflowName }),
}
},
@@ -238,7 +238,7 @@ export default {
{ ...this.variables, taskID: this.requestedTokens?.relativeID },
`info-query-${this._uid}`,
[
- new InfoCallback(this.task, this.taskNode)
+ new InfoCallback(this.task, this.taskNode),
],
/* isDelta */ true,
/* isGlobalCallback */ false
@@ -249,7 +249,7 @@ export default {
methods: {
updatePanelExpansion (value) {
this.panelExpansion = value
- }
- }
+ },
+ },
}
diff --git a/src/views/Log.vue b/src/views/Log.vue
index 6852d448d..5a52efc91 100644
--- a/src/views/Log.vue
+++ b/src/views/Log.vue
@@ -119,7 +119,7 @@ along with this program. If not, see .
} : {
color: 'error',
prependIcon: $options.icons.mdiPowerPlugOff,
- onClick: updateQuery
+ onClick: updateQuery,
}"
>
{{ results.connected ? 'Connected' : 'Reconnect' }}
@@ -188,7 +188,7 @@ import subscriptionComponentMixin from '@/mixins/subscriptionComponent'
import {
initialOptions,
updateInitialOptionsEvent,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
import LogComponent from '@/components/cylc/log/Log.vue'
import SubscriptionQuery from '@/model/SubscriptionQuery.model'
@@ -299,7 +299,7 @@ export default {
mixins: [
graphqlMixin,
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
components: {
@@ -333,7 +333,7 @@ export default {
const inputID = refWithControl(relativeID.value, {
onChanged: debounce((value) => {
relativeID.value = value
- }, 500)
+ }, 500),
})
function validateInputID (id) {
@@ -422,7 +422,7 @@ export default {
this.$watch(
() => ({
id: this.id ?? undefined, // (do not trigger the callback on null ⇄ undefined)
- file: this.file ?? undefined
+ file: this.file ?? undefined,
}),
async ({ id }, old) => {
// update the query when the id or file change
@@ -459,7 +459,7 @@ export default {
icon: mdiClockOutline,
action: 'toggle',
value: this.timestamps,
- key: 'timestamps'
+ key: 'timestamps',
},
{
title: 'Word wrap',
@@ -475,10 +475,10 @@ export default {
value: this.autoScroll,
key: 'autoScroll',
},
- ]
- }
+ ],
+ },
]
- }
+ },
},
methods: {
@@ -501,7 +501,7 @@ export default {
{ id: this.id, file: this.file },
`log-query-${this._uid}`,
[
- new LogsCallback(this.results)
+ new LogsCallback(this.results),
],
/* isDelta */ false,
/* isGlobalCallback */ false
@@ -521,7 +521,7 @@ export default {
JOB_QUERY,
{
id: this.relativeTokens.id,
- workflowId: this.workflowTokens.workflow
+ workflowId: this.workflowTokens.workflow,
}
)
}
@@ -555,7 +555,7 @@ export default {
// get the list of available log files
result = await this.$workflowService.apolloClient.query({
query: LOG_FILE_QUERY,
- variables: { id: this.id }
+ variables: { id: this.id },
})
} catch (err) {
// the query failed
@@ -618,7 +618,7 @@ export default {
this.file = null
// go back to last chosen job if we are switching back to job logs
this.relativeID = val ? this.previousRelativeID : null
- }
+ },
},
// Misc options
@@ -626,7 +626,7 @@ export default {
mdiFolderRefresh,
mdiPowerPlug,
mdiPowerPlugOff,
- mdiFileAlertOutline
- }
+ mdiFileAlertOutline,
+ },
}
diff --git a/src/views/SimpleTree.vue b/src/views/SimpleTree.vue
index ca2565a58..988edc739 100644
--- a/src/views/SimpleTree.vue
+++ b/src/views/SimpleTree.vue
@@ -189,7 +189,7 @@ export default {
// These mixins enable various functionalities.
mixins: [
graphqlMixin,
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
computed: {
@@ -219,8 +219,8 @@ export default {
// in the store and to keep it up to date.
query () {
return new SubscriptionQuery(QUERY, this.variables, 'workflow', [])
- }
- }
+ },
+ },
}
diff --git a/src/views/Table.vue b/src/views/Table.vue
index d798c8f44..1ce669f13 100644
--- a/src/views/Table.vue
+++ b/src/views/Table.vue
@@ -61,7 +61,7 @@ import subscriptionComponentMixin from '@/mixins/subscriptionComponent'
import {
initialOptions,
updateInitialOptionsEvent,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
import { matchNode } from '@/components/cylc/common/filter'
import TableComponent from '@/components/cylc/table/Table.vue'
@@ -155,12 +155,12 @@ export default {
mixins: [
graphqlMixin,
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
components: {
TableComponent,
- TaskFilter
+ TaskFilter,
},
emits: [updateInitialOptionsEvent],
@@ -228,7 +228,7 @@ export default {
filteredTasks () {
return this.tasks.filter(({ task }) => matchNode(task, this.tasksFilter.id, this.tasksFilter.states))
- }
- }
+ },
+ },
}
diff --git a/src/views/Tree.vue b/src/views/Tree.vue
index 83dbb964d..1817363e1 100644
--- a/src/views/Tree.vue
+++ b/src/views/Tree.vue
@@ -104,7 +104,7 @@ import graphqlMixin from '@/mixins/graphql'
import subscriptionComponentMixin from '@/mixins/subscriptionComponent'
import {
initialOptions,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
import SubscriptionQuery from '@/model/SubscriptionQuery.model'
import TaskFilter from '@/components/cylc/TaskFilter.vue'
@@ -221,12 +221,12 @@ export default {
mixins: [
graphqlMixin,
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
components: {
TaskFilter,
- TreeComponent
+ TreeComponent,
},
props: { initialOptions },
@@ -277,7 +277,7 @@ export default {
return (this.tasksFilter.id?.trim() || this.tasksFilter.states?.length)
? this.tasksFilter
: null
- }
+ },
},
methods: {
diff --git a/src/views/UserProfile.vue b/src/views/UserProfile.vue
index 6ca252e3d..1913daaa2 100644
--- a/src/views/UserProfile.vue
+++ b/src/views/UserProfile.vue
@@ -234,7 +234,7 @@ export default {
name: 'UserProfile',
components: {
- Job
+ Job,
},
setup () {
@@ -270,7 +270,7 @@ export default {
jobThemes: [
'default',
'greyscale',
- 'colour_blind'
+ 'colour_blind',
],
icons: {
diff --git a/src/views/Workflows.vue b/src/views/Workflows.vue
index 4bf32f11e..26ca44f02 100644
--- a/src/views/Workflows.vue
+++ b/src/views/Workflows.vue
@@ -75,11 +75,11 @@ export default {
name: 'Workflows',
mixins: [
- subscriptionComponentMixin
+ subscriptionComponentMixin,
],
components: {
- GScan
+ GScan,
},
data () {
@@ -89,12 +89,12 @@ export default {
{},
'root',
[]
- )
+ ),
}
},
computed: {
- ...mapState('workflows', ['cylcTree'])
- }
+ ...mapState('workflows', ['cylcTree']),
+ },
}
diff --git a/src/views/WorkflowsTable.vue b/src/views/WorkflowsTable.vue
index 6cb651a43..05559d233 100644
--- a/src/views/WorkflowsTable.vue
+++ b/src/views/WorkflowsTable.vue
@@ -121,7 +121,7 @@ export default {
],
components: {
- WorkflowIcon
+ WorkflowIcon,
},
data: () => ({
@@ -143,50 +143,50 @@ export default {
},
workflowsTable () {
return Object.values(this.workflows)
- }
+ },
},
methods: {
viewWorkflow (workflow) {
this.$router.push({ path: `/workspace/${workflow.tokens.workflow}` })
- }
+ },
},
headers: [
{
sortable: false,
title: '',
- key: 'icon'
+ key: 'icon',
},
{
sortable: true,
title: i18n.global.t('Workflows.tableColumnName'),
- key: 'tokens.workflow'
+ key: 'tokens.workflow',
},
{
sortable: true,
title: 'Status',
- key: 'node.status'
+ key: 'node.status',
},
{
sortable: true,
title: 'Cylc Version',
- key: 'node.cylcVersion'
+ key: 'node.cylcVersion',
},
{
sortable: true,
title: i18n.global.t('Workflows.tableColumnOwner'),
- key: 'node.owner'
+ key: 'node.owner',
},
{
sortable: true,
title: i18n.global.t('Workflows.tableColumnHost'),
- key: 'node.host'
+ key: 'node.host',
},
{
sortable: false,
title: i18n.global.t('Workflows.tableColumnPort'),
- key: 'node.port'
+ key: 'node.port',
},
],
diff --git a/src/views/Workspace.vue b/src/views/Workspace.vue
index dac5efbf1..90922f615 100644
--- a/src/views/Workspace.vue
+++ b/src/views/Workspace.vue
@@ -51,12 +51,12 @@ export default {
mixins: [
graphqlMixin,
- subscriptionMixin
+ subscriptionMixin,
],
components: {
Lumino,
- Toolbar
+ Toolbar,
},
setup () {
@@ -80,7 +80,7 @@ export default {
// but back to beginning. When a widget is added, if it uses a query, then the mixins will
// take care to set the state to LOADING and then COMPLETE (and hopefully not ERROR).
this.viewState = ViewState.NO_STATE
- }
+ },
},
panelStyle: {
diff --git a/tests/.eslintrc.cjs b/tests/.eslintrc.cjs
index c535b4bfe..dac36db23 100644
--- a/tests/.eslintrc.cjs
+++ b/tests/.eslintrc.cjs
@@ -17,10 +17,10 @@
module.exports = {
env: {
- mocha: true
+ mocha: true,
},
plugins: [
- 'no-only-tests'
+ 'no-only-tests',
],
rules: {
'no-console': 'off',
@@ -31,8 +31,8 @@ module.exports = {
files: ['*.spec.js', '*.cy.js'],
rules: {
// Don't complain about certain chai assertions:
- 'no-unused-expressions': 'off'
- }
- }
- ]
+ 'no-unused-expressions': 'off',
+ },
+ },
+ ],
}
diff --git a/tests/component/.eslintrc.cjs b/tests/component/.eslintrc.cjs
index 0667e7b35..65d06fbfd 100644
--- a/tests/component/.eslintrc.cjs
+++ b/tests/component/.eslintrc.cjs
@@ -17,9 +17,9 @@
module.exports = {
plugins: [
- 'cypress'
+ 'cypress',
],
env: {
- 'cypress/globals': true
+ 'cypress/globals': true,
},
}
diff --git a/tests/component/specs/boxPlot.cy.js b/tests/component/specs/boxPlot.cy.js
index 2b770d6e8..454634120 100644
--- a/tests/component/specs/boxPlot.cy.js
+++ b/tests/component/specs/boxPlot.cy.js
@@ -74,7 +74,7 @@ const mountOpts = {
props: {
timingOption: 'total',
animate: false,
- }
+ },
}
describe('BoxPlot', () => {
@@ -99,7 +99,7 @@ describe('BoxPlot', () => {
props: {
tasks: Array.from(Array(7).keys(), (i) => ({
...task1,
- name: `task_${i}`
+ name: `task_${i}`,
})),
itemsPerPage: 4,
},
diff --git a/tests/component/specs/cylc-graph-node.cy.js b/tests/component/specs/cylc-graph-node.cy.js
index dc4520661..6975ccf34 100644
--- a/tests/component/specs/cylc-graph-node.cy.js
+++ b/tests/component/specs/cylc-graph-node.cy.js
@@ -22,7 +22,7 @@ import GraphNode from '@/components/cylc/GraphNode.vue'
import { Tokens } from '@/utils/uid'
import {
MEAN_ELAPSED_TIME,
- getStartTime
+ getStartTime,
} from './utils/task'
function makeTaskNode (id, state, jobStates) {
@@ -36,8 +36,8 @@ function makeTaskNode (id, state, jobStates) {
id: jobTokens.id,
name: jobTokens.job,
node: {
- state: jobState
- }
+ state: jobState,
+ },
}
if (jobState === 'running') { // TODO constant
job.node.startedTime = getStartTime(50)
@@ -55,9 +55,9 @@ function makeTaskNode (id, state, jobStates) {
isHeld: false,
state,
task: {
- meanElapsedTime: MEAN_ELAPSED_TIME
- }
- }
+ meanElapsedTime: MEAN_ELAPSED_TIME,
+ },
+ },
}
return [task, jobs]
@@ -73,13 +73,13 @@ const GraphNodeSVG = defineComponent({
width: '100%',
height: '100%',
// the "-40" bit is to account for the task modifiers
- viewBox: '-40,-40,450,150'
+ viewBox: '-40,-40,450,150',
},
[
- h(GraphNode, this.$attrs)
+ h(GraphNode, this.$attrs),
]
)
- }
+ },
})
describe('graph node component', () => {
@@ -92,7 +92,7 @@ describe('graph node component', () => {
cy.mount(
GraphNodeSVG,
{
- props: { task, jobs }
+ props: { task, jobs },
}
)
// there should be 4 jobs
@@ -117,7 +117,7 @@ describe('graph node component', () => {
cy.mount(
GraphNodeSVG,
{
- props: { task, jobs, maxJobs: 4 }
+ props: { task, jobs, maxJobs: 4 },
}
)
// there should be jobs
diff --git a/tests/component/specs/cylc-icons.cy.js b/tests/component/specs/cylc-icons.cy.js
index c83af5c06..0802f968f 100644
--- a/tests/component/specs/cylc-icons.cy.js
+++ b/tests/component/specs/cylc-icons.cy.js
@@ -21,7 +21,7 @@ import Task from '@/components/cylc/Task.vue'
import Job from '@/components/cylc/Job.vue'
import {
MEAN_ELAPSED_TIME,
- getStartTime
+ getStartTime,
} from './utils/task'
import { defineComponent, h } from 'vue'
@@ -33,10 +33,10 @@ const JobComponent = defineComponent({
'span',
{ style: 'font-size: 200px;', id: 'app', class: 'job_theme--default' },
[
- h(Job, this.$attrs)
+ h(Job, this.$attrs),
]
)
- }
+ },
})
// wrap the Task component to allow us to bump up the font-size for a
@@ -47,10 +47,10 @@ const TaskComponent = defineComponent({
'span',
{ style: 'font-size: 200px; margin: 100px;' },
[
- h(Task, this.$attrs)
+ h(Task, this.$attrs),
]
)
- }
+ },
})
function makeTask (
@@ -65,8 +65,8 @@ function makeTask (
isQueued,
isRunahead,
task: {
- meanElapsedTime: MEAN_ELAPSED_TIME // NOTE time in seconds
- }
+ meanElapsedTime: MEAN_ELAPSED_TIME, // NOTE time in seconds
+ },
}
}
@@ -89,8 +89,8 @@ describe('Task component', () => {
{
props: {
task,
- startTime: getStartTime(percent)
- }
+ startTime: getStartTime(percent),
+ },
}
)
cy.get('.c8-task').last().parent().screenshot(
@@ -126,7 +126,7 @@ describe('Task component', () => {
{
overwrite: true,
disableTimersAndAnimations: false,
- padding: [10, 5, 5, 10]
+ padding: [10, 5, 5, 10],
}
)
}
@@ -141,7 +141,7 @@ describe('Task component', () => {
{
overwrite: true,
disableTimersAndAnimations: false,
- padding: [10, 5, 5, 10]
+ padding: [10, 5, 5, 10],
}
)
}
diff --git a/tests/component/specs/ganttchart.cy.js b/tests/component/specs/ganttchart.cy.js
index 822470005..b2b9fb702 100644
--- a/tests/component/specs/ganttchart.cy.js
+++ b/tests/component/specs/ganttchart.cy.js
@@ -29,7 +29,7 @@ const jobs = {
submittedTime: '2023-02-23T11:10:09Z',
startedTime: '2023-02-23T11:10:13Z',
finishedTime: '2023-02-23T11:10:20Z',
- platform: 'localhost'
+ platform: 'localhost',
}],
yet_another_test_job: [{
name: 'yet_another_test_job',
@@ -37,8 +37,8 @@ const jobs = {
submittedTime: '2023-02-23T11:10:21Z',
startedTime: '2023-02-23T11:10:24Z',
finishedTime: '2023-02-23T11:10:26Z',
- platform: 'localhost'
- }]
+ platform: 'localhost',
+ }],
}
const mountOpts = {
@@ -50,15 +50,15 @@ const mountOpts = {
},
props: {
timingOption: 'total',
- animate: false
- }
+ animate: false,
+ },
}
describe('GanttChart correctly', () => {
it('renders', () => {
// see: https://on.cypress.io/mounting-vue
cy.mount(GanttChart, merge(mountOpts, {
props: {
- jobs
+ jobs,
},
}))
cy.get('.vue-apexcharts')
@@ -80,7 +80,7 @@ describe('GanttChart correctly', () => {
cy.mount(GanttChart, merge(mountOpts, {
props: {
tasksPerPage: 1,
- jobs
+ jobs,
},
}))
cy.get('[data-test="v-pagination-item"]')
diff --git a/tests/component/specs/info.cy.js b/tests/component/specs/info.cy.js
index a95fbaf89..565548bfa 100644
--- a/tests/component/specs/info.cy.js
+++ b/tests/component/specs/info.cy.js
@@ -37,8 +37,8 @@ const TASK = {
customMeta: {
answer: '42',
question: 'mutually exclusive',
- }
- }
+ },
+ },
},
prerequisites: [
{
@@ -102,11 +102,11 @@ const TASK = {
label: 'x',
message: 'xxx',
satisfied: true,
- }
+ },
],
runtime: {
- completion: '(succeeded and x) or failed'
- }
+ completion: '(succeeded and x) or failed',
+ },
},
children: [
{
@@ -114,16 +114,16 @@ const TASK = {
tokens: TOKENS.clone({ job: '02' }),
name: '02',
node: {
- state: 'succeeded'
- }
+ state: 'succeeded',
+ },
},
{
id: TOKENS.clone({ job: '01' }).id,
tokens: TOKENS.clone({ job: '01' }),
name: '01',
node: {
- state: 'failed'
- }
+ state: 'failed',
+ },
},
],
}
@@ -136,7 +136,7 @@ describe('Info component', () => {
class: 'job_theme--default',
// NOTE: expand all sections by default
panelExpansion: [0, 1, 2, 3],
- }
+ },
})
// there should be a task icon (running)
@@ -225,11 +225,11 @@ describe('Info component', () => {
cy.vmount(InfoComponent, {
props: {
task: TASK,
- class: 'job_theme--default'
+ class: 'job_theme--default',
},
listeners: {
'update:panelExpansion': spy,
- }
+ },
}).as('wrapper')
// ONLY the metadata panel should be expanded by default
@@ -261,8 +261,8 @@ describe('Info component', () => {
node: {
task: {
meta: {
- customMeta: {}
- }
+ customMeta: {},
+ },
},
prerequisites: [],
outputs: [],
@@ -276,7 +276,7 @@ describe('Info component', () => {
class: 'job_theme--default',
// NOTE: expand all sections by default
panelExpansion: [0, 1, 2],
- }
+ },
})
})
})
diff --git a/tests/component/specs/log.cy.js b/tests/component/specs/log.cy.js
index cbef683d3..f3699dfb6 100644
--- a/tests/component/specs/log.cy.js
+++ b/tests/component/specs/log.cy.js
@@ -29,7 +29,7 @@ const mountOpts = {
createVuetify(vuetifyOptions),
],
},
- props: {}
+ props: {},
}
function logLines (length) {
@@ -66,7 +66,7 @@ describe('Log Component', () => {
// turn autoscroll on
cy.get('@component').then(({ wrapper }) => {
wrapper.setProps({
- autoScroll: true
+ autoScroll: true,
})
})
cy.get('span').contains('Line 30')
@@ -75,7 +75,7 @@ describe('Log Component', () => {
// update the log
cy.get('@component').then(({ wrapper }) => {
wrapper.setProps({
- logs: logLines(50)
+ logs: logLines(50),
})
})
// log file should now have scrolled to the bottom
diff --git a/tests/component/specs/treeItem.cy.js b/tests/component/specs/treeItem.cy.js
index 4302d0539..34db2a952 100644
--- a/tests/component/specs/treeItem.cy.js
+++ b/tests/component/specs/treeItem.cy.js
@@ -49,14 +49,14 @@ describe('TreeItem component', () => {
.should('deep.equal', {
// Auto expand everything down to task nodes by default
all: ['cycle', 'task'],
- visible: ['cycle', 'task']
+ visible: ['cycle', 'task'],
})
cy.toggleNode('task')
cy.getNodeTypes()
.should('deep.equal', {
all: ['cycle', 'task', 'job', 'job'],
- visible: ['cycle', 'task', 'job', 'job']
+ visible: ['cycle', 'task', 'job', 'job'],
})
cy.toggleNode('cycle')
@@ -64,7 +64,7 @@ describe('TreeItem component', () => {
.should('deep.equal', {
// All previously expanded nodes under cycle should be hidden but remain rendered
all: ['cycle', 'task', 'job', 'job'],
- visible: ['cycle']
+ visible: ['cycle'],
})
cy.toggleNode('cycle')
@@ -73,7 +73,7 @@ describe('TreeItem component', () => {
.should('deep.equal', {
// Job node does not use a child TreeItem
all: ['cycle', 'task', 'job', 'job'],
- visible: ['cycle', 'task', 'job', 'job']
+ visible: ['cycle', 'task', 'job', 'job'],
})
})
})
diff --git a/tests/component/specs/viewToolbar.cy.js b/tests/component/specs/viewToolbar.cy.js
index ffc34c405..01a34fe6a 100644
--- a/tests/component/specs/viewToolbar.cy.js
+++ b/tests/component/specs/viewToolbar.cy.js
@@ -18,7 +18,7 @@
import {
mdiCog,
mdiGestureTap,
- mdiToggleSwitch
+ mdiToggleSwitch,
} from '@mdi/js'
import ViewToolbar from '@/components/cylc/ViewToolbar.vue'
@@ -27,7 +27,7 @@ describe('View Toolbar Component', () => {
cy.vmount(
ViewToolbar,
{
- props: { groups }
+ props: { groups },
}
).as('wrapper')
// add the classes Vuetify requires
@@ -51,17 +51,17 @@ describe('View Toolbar Component', () => {
icon: mdiToggleSwitch,
action: 'toggle',
value: true,
- key: 'toggle'
+ key: 'toggle',
},
{
title: 'Callback',
icon: mdiGestureTap,
action: 'callback',
callback: myCallback,
- key: 'callback'
- }
- ]
- }
+ key: 'callback',
+ },
+ ],
+ },
])
// test all controls rendered
@@ -125,24 +125,24 @@ describe('View Toolbar Component', () => {
value: true,
key: 'foo',
enableIf: ['bar'],
- disableIf: ['baz']
+ disableIf: ['baz'],
},
{
title: 'Bar',
icon: mdiCog,
action: 'toggle',
value: true,
- key: 'bar'
+ key: 'bar',
},
{
title: 'Baz',
icon: mdiCog,
action: 'toggle',
value: false,
- key: 'baz'
- }
- ]
- }
+ key: 'baz',
+ },
+ ],
+ },
])
cy
@@ -187,16 +187,16 @@ describe('View Toolbar Component', () => {
icon: mdiCog,
action: 'toggle',
value: true,
- key: 'foo'
+ key: 'foo',
},
{
title: 'Bar',
icon: mdiCog,
action: 'toggle',
value: false,
- key: 'bar'
- }
- ]
+ key: 'bar',
+ },
+ ],
},
{
title: 'Group 2',
@@ -206,17 +206,17 @@ describe('View Toolbar Component', () => {
icon: mdiCog,
action: 'toggle',
value: true,
- key: 'baz'
+ key: 'baz',
},
{
title: 'Pub',
icon: mdiCog,
action: 'toggle',
value: false,
- key: 'pub'
- }
- ]
- }
+ key: 'pub',
+ },
+ ],
+ },
])
// TODO: visual regression test
// https://github.com/cylc/cylc-ui/issues/178
diff --git a/tests/component/support/index.js b/tests/component/support/index.js
index 990aeadb4..aea41c6aa 100644
--- a/tests/component/support/index.js
+++ b/tests/component/support/index.js
@@ -36,9 +36,9 @@ Cypress.Commands.add('vmount', (component, options = {}) => {
component,
{
global: {
- plugins: [createVuetify(vuetifyOptions)]
+ plugins: [createVuetify(vuetifyOptions)],
},
- ...options
+ ...options,
}
)
})
diff --git a/tests/e2e/.eslintrc.cjs b/tests/e2e/.eslintrc.cjs
index 0667e7b35..65d06fbfd 100644
--- a/tests/e2e/.eslintrc.cjs
+++ b/tests/e2e/.eslintrc.cjs
@@ -17,9 +17,9 @@
module.exports = {
plugins: [
- 'cypress'
+ 'cypress',
],
env: {
- 'cypress/globals': true
+ 'cypress/globals': true,
},
}
diff --git a/tests/e2e/specs/aotf.cy.js b/tests/e2e/specs/aotf.cy.js
index adbad4c9c..00798bd86 100644
--- a/tests/e2e/specs/aotf.cy.js
+++ b/tests/e2e/specs/aotf.cy.js
@@ -17,7 +17,7 @@
import {
mutationStatus,
- processMutations
+ processMutations,
} from '@/utils/aotf'
import {
MUTATIONS,
@@ -36,9 +36,9 @@ function mockApolloClient () {
return {
data: {
[args.mutation.definitions[0].name.value]: {
- result: []
- }
- }
+ result: [],
+ },
+ },
}
}
})
@@ -76,10 +76,10 @@ describe('Api On The Fly', () => {
service.introspection = Promise.resolve({
mutations,
types: [],
- queries: []
+ queries: [],
})
service.primaryMutations = {
- workflow: ['workflowMutation']
+ workflow: ['workflowMutation'],
}
})
})
@@ -98,32 +98,32 @@ describe('Api On The Fly', () => {
{
selector: '.node-data-cycle .c-task:first',
mutationTitle: 'Cycle Mutation',
- mutationText: 'cycle'
+ mutationText: 'cycle',
},
// family
{
selector: '.node-data-family .c-task:first',
mutationTitle: 'Namespace Mutation',
- mutationText: 'namespace'
+ mutationText: 'namespace',
},
// task
{
selector: '.node-data-task .c-task:first',
mutationTitle: 'Namespace Mutation',
- mutationText: 'namespace'
+ mutationText: 'namespace',
},
// job (in task summary)
{
selector: '.node-data-task .node-summary .c-job:first',
mutationTitle: 'Job Mutation',
- mutationText: 'job'
+ mutationText: 'job',
},
// job (expanded)
{
selector: '.node-data-job:visible .c-job',
mutationTitle: 'Job Mutation',
- mutationText: 'job'
- }
+ mutationText: 'job',
+ },
]
for (const test of tests) {
diff --git a/tests/e2e/specs/editRuntimeForm.cy.js b/tests/e2e/specs/editRuntimeForm.cy.js
index 3580df33e..a6df1ef3a 100644
--- a/tests/e2e/specs/editRuntimeForm.cy.js
+++ b/tests/e2e/specs/editRuntimeForm.cy.js
@@ -32,9 +32,9 @@ describe('Edit Runtime form', () => {
data: {
[body.operationName]: {
result: [true, {}],
- __typename: upperFirst(body.operationName)
- }
- }
+ __typename: upperFirst(body.operationName),
+ },
+ },
})
}
})
@@ -124,8 +124,8 @@ describe('Edit Runtime form', () => {
settings: [
{ init_script: 'echo Kalgan' },
{ environment: { HORSE: 'Dorothy' } },
- { environment: { FACTION: '2nd Foundation' } }
- ]
+ { environment: { FACTION: '2nd Foundation' } },
+ ],
})
})
// Form should close
diff --git a/tests/e2e/specs/header.cy.js b/tests/e2e/specs/header.cy.js
index 7e4841144..981a93900 100644
--- a/tests/e2e/specs/header.cy.js
+++ b/tests/e2e/specs/header.cy.js
@@ -35,8 +35,8 @@ describe('Header Component multiuser', () => {
'read',
],
mode: 'multi user',
- owner: 'userTest'
- }
+ owner: 'userTest',
+ },
}).as('test-data-server-owner-input')
cy.visit('/#/')
})
diff --git a/tests/e2e/specs/mutation.cy.js b/tests/e2e/specs/mutation.cy.js
index 7cd4503d0..0666616b0 100644
--- a/tests/e2e/specs/mutation.cy.js
+++ b/tests/e2e/specs/mutation.cy.js
@@ -59,10 +59,10 @@ describe('Mutations component', () => {
service.introspection = Promise.resolve({
mutations,
types: [],
- queries: []
+ queries: [],
})
service.primaryMutations = {
- workflow: ['workflowMutation']
+ workflow: ['workflowMutation'],
}
})
}
@@ -79,9 +79,9 @@ describe('Mutations component', () => {
data: {
[req.body.operationName]: {
result: [true, {}],
- __typename: upperFirst(req.body.operationName)
- }
- }
+ __typename: upperFirst(req.body.operationName),
+ },
+ },
})
}
})
diff --git a/tests/e2e/specs/toolbar.cy.js b/tests/e2e/specs/toolbar.cy.js
index 74e324b1f..f64cd9598 100644
--- a/tests/e2e/specs/toolbar.cy.js
+++ b/tests/e2e/specs/toolbar.cy.js
@@ -51,10 +51,10 @@ describe('Toolbar Component authenticated user', () => {
owner: 'user',
permissions: [
'read',
- 'write'
+ 'write',
],
- mode: 'single user'
- }
+ mode: 'single user',
+ },
}).as('test-data-server-owner-input')
cy.visit('/#/workspace/one')
})
diff --git a/tests/e2e/specs/tree.cy.js b/tests/e2e/specs/tree.cy.js
index 71838d275..f649755e5 100644
--- a/tests/e2e/specs/tree.cy.js
+++ b/tests/e2e/specs/tree.cy.js
@@ -78,7 +78,7 @@ describe('Tree view', () => {
/Finished\s*\d{4}-\d{2}-\d{2}T.+/,
/Mean run time\s*\d{2}:\d{2}:\d{2}/,
/Platform\s*\w+/,
- /foo\s*foo message/
+ /foo\s*foo message/,
]
for (const pattern of patterns) {
cy.get('.leaf:visible:first .leaf-entry')
diff --git a/tests/e2e/specs/url.cy.js b/tests/e2e/specs/url.cy.js
index 44885017c..e91b9f1e0 100644
--- a/tests/e2e/specs/url.cy.js
+++ b/tests/e2e/specs/url.cy.js
@@ -42,8 +42,8 @@ describe('URL handling', () => {
username: 'user',
permissions: [],
mode: 'single user',
- owner: 'user'
- }
+ owner: 'user',
+ },
})
cy.visit('/#').get('#app')
cy.url().should('contain', 'noAuth')
diff --git a/tests/e2e/support/graphql.js b/tests/e2e/support/graphql.js
index 7f1e55c00..f97ecceba 100644
--- a/tests/e2e/support/graphql.js
+++ b/tests/e2e/support/graphql.js
@@ -28,7 +28,7 @@ export function patchUserprofile () {
'jobMutation',
'namespaceMutation',
],
- }
+ },
})
}
@@ -50,10 +50,10 @@ export const MUTATIONS = [
name: 'workflow',
type: {
name: 'WorkflowID',
- kind: null
- }
- }
- ]
+ kind: null,
+ },
+ },
+ ],
},
{
name: 'unauthorisedMutation',
@@ -66,10 +66,10 @@ export const MUTATIONS = [
name: 'workflow',
type: {
name: 'WorkflowID',
- kind: null
- }
- }
- ]
+ kind: null,
+ },
+ },
+ ],
},
{
name: 'cycleMutation',
@@ -79,17 +79,17 @@ export const MUTATIONS = [
name: 'workflow',
type: {
name: 'WorkflowID',
- kind: null
- }
+ kind: null,
+ },
},
{
name: 'cycle',
type: {
name: 'CyclePoint',
- kind: null
- }
- }
- ]
+ kind: null,
+ },
+ },
+ ],
},
{
name: 'namespaceMutation',
@@ -99,17 +99,17 @@ export const MUTATIONS = [
name: 'workflow',
type: {
name: 'WorkflowID',
- kind: null
- }
+ kind: null,
+ },
},
{
name: 'namespace',
type: {
name: 'NamespaceName',
- kind: null
- }
- }
- ]
+ kind: null,
+ },
+ },
+ ],
},
{
name: 'jobMutation',
@@ -119,16 +119,16 @@ export const MUTATIONS = [
name: 'workflow',
type: {
name: 'WorkflowID',
- kind: null
- }
+ kind: null,
+ },
},
{
name: 'job',
type: {
name: 'JobID',
- kind: null
- }
- }
- ]
- }
+ kind: null,
+ },
+ },
+ ],
+ },
]
diff --git a/tests/unit/components/app.vue.spec.js b/tests/unit/components/app.vue.spec.js
index 3472fa337..6ffe25138 100644
--- a/tests/unit/components/app.vue.spec.js
+++ b/tests/unit/components/app.vue.spec.js
@@ -28,9 +28,9 @@ vi.mock('vue-router', () => ({
useRoute: () => ({
name: 'app',
meta: {
- layout: 'empty'
- }
- })
+ layout: 'empty',
+ },
+ }),
}))
describe('App', () => {
@@ -42,10 +42,10 @@ describe('App', () => {
createStore(storeOptions),
],
components: {
- 'empty-layout': Empty
+ 'empty-layout': Empty,
},
stubs: ['router-view'],
- }
+ },
})
}
@@ -65,18 +65,18 @@ describe('App', () => {
value: true,
expected: {
transition: 'no',
- ripple: false
- }
+ ripple: false,
+ },
},
{
value: false,
- expected: {}
+ expected: {},
},
])('applies reduced animation = $value from localStorage', ({ value, expected }) => {
localStorage.setItem('reducedAnimation', value)
const wrapper = mountFunction()
expect(wrapper.vm.vuetifyDefaults).toMatchObject({
- global: expected
+ global: expected,
})
})
})
diff --git a/tests/unit/components/cylc/analysis/analysistable.vue.spec.js b/tests/unit/components/cylc/analysis/analysistable.vue.spec.js
index 65b91b0a9..3fb6a7623 100644
--- a/tests/unit/components/cylc/analysis/analysistable.vue.spec.js
+++ b/tests/unit/components/cylc/analysis/analysistable.vue.spec.js
@@ -37,7 +37,7 @@ describe('AnalysisTable component', () => {
plugins: [vuetify],
mocks: { $workflowService },
},
- ...options
+ ...options,
})
}
@@ -45,15 +45,15 @@ describe('AnalysisTable component', () => {
const wrapper = mountFunction({
props: {
tasks: analysisTasks,
- timingOption: 'total'
- }
+ timingOption: 'total',
+ },
})
// check the the raw task data doesn't have the names in order
expect(wrapper.vm.tasks.map((task) => task.name)).to.deep.equal([
'succeeded',
'eventually_succeeded',
- 'waiting'
+ 'waiting',
])
// check that the html have the names in alphabetical order
@@ -67,8 +67,8 @@ describe('AnalysisTable component', () => {
const wrapper = mountFunction({
props: {
tasks: analysisTasks,
- timingOption: 'total'
- }
+ timingOption: 'total',
+ },
})
expect(wrapper.props().tasks[0].name).to.equal('succeeded')
expect(wrapper.find('div')).to.not.equal(null)
@@ -79,8 +79,8 @@ describe('AnalysisTable component', () => {
const wrapper = mountFunction({
props: {
tasks: analysisTasks,
- timingOption: 'total'
- }
+ timingOption: 'total',
+ },
})
expect(wrapper.vm.timingOption).to.equal('total')
expect(wrapper.vm.tasks.length).to.equal(3)
@@ -95,8 +95,8 @@ describe('AnalysisTable component', () => {
const wrapper = mountFunction({
props: {
tasks: analysisTasks,
- timingOption: 'run'
- }
+ timingOption: 'run',
+ },
})
expect(wrapper.vm.timingOption).to.equal('run')
expect(wrapper.vm.tasks.length).to.equal(3)
@@ -111,8 +111,8 @@ describe('AnalysisTable component', () => {
const wrapper = mountFunction({
props: {
tasks: analysisTasks,
- timingOption: 'queue'
- }
+ timingOption: 'queue',
+ },
})
expect(wrapper.vm.timingOption).to.equal('queue')
expect(wrapper.vm.tasks.length).to.equal(3)
diff --git a/tests/unit/components/cylc/analysis/analysistimeseries.vue.spec.js b/tests/unit/components/cylc/analysis/analysistimeseries.vue.spec.js
index a4df9265e..9b6c10620 100644
--- a/tests/unit/components/cylc/analysis/analysistimeseries.vue.spec.js
+++ b/tests/unit/components/cylc/analysis/analysistimeseries.vue.spec.js
@@ -34,7 +34,7 @@ describe('TimeSeries component', () => {
mocks: { $workflowService },
},
shallow: true,
- ...options
+ ...options,
})
}
@@ -44,7 +44,7 @@ describe('TimeSeries component', () => {
workflowIDs: ['one'],
platformOption: -1,
timingOption: 'total',
- }
+ },
})
expect(wrapper.vm.jobs).to.deep.equal([])
@@ -59,7 +59,7 @@ describe('TimeSeries component', () => {
workflowIDs: ['one'],
platformOption: -1,
timingOption: 'total',
- }
+ },
})
// Retrieve job data and check that nothing is displayed
@@ -84,7 +84,7 @@ describe('TimeSeries component', () => {
workflowIDs: ['one'],
platformOption: -1,
timingOption: 'total',
- }
+ },
})
wrapper.vm.jobs = analysisJobs
@@ -98,14 +98,14 @@ describe('TimeSeries component', () => {
)).to.deep.equal([
'20240101T1200Z',
'20240101T0000Z',
- '20240102T0000Z'
+ '20240102T0000Z',
])
// Check that cyclePoints is in order
expect(wrapper.vm.cyclePoints).to.deep.equal([
'20240101T0000Z',
'20240101T1200Z',
- '20240102T0000Z'
+ '20240102T0000Z',
])
expect(wrapper.vm.series[0].data[0].x).to.equal('20240101T0000Z')
expect(wrapper.vm.series[0].data[1].x).to.equal('20240101T1200Z')
@@ -118,7 +118,7 @@ describe('TimeSeries component', () => {
workflowIDs: ['one'],
platformOption: -1,
timingOption: 'total',
- }
+ },
})
wrapper.vm.jobs = analysisJobs
@@ -128,14 +128,14 @@ describe('TimeSeries component', () => {
expect(wrapper.vm.cyclePoints).to.deep.equal([
'20240101T0000Z',
'20240101T1200Z',
- '20240102T0000Z'
+ '20240102T0000Z',
])
// waiting only has data on two of the cycle points
wrapper.vm.displayedTasks = ['waiting']
expect(wrapper.vm.cyclePoints).to.deep.equal([
'20240101T0000Z',
- '20240102T0000Z'
+ '20240102T0000Z',
])
})
@@ -145,7 +145,7 @@ describe('TimeSeries component', () => {
workflowIDs: ['one'],
platformOption: -1,
timingOption: 'total',
- }
+ },
})
wrapper.vm.jobs = analysisJobs
@@ -161,7 +161,7 @@ describe('TimeSeries component', () => {
workflowIDs: ['one'],
platformOption: -1,
timingOption: 'total',
- }
+ },
})
wrapper.vm.jobs = analysisJobs
@@ -178,7 +178,7 @@ describe('TimeSeries component', () => {
workflowIDs: ['one'],
platformOption: -1,
timingOption: 'total',
- }
+ },
})
wrapper.vm.jobs = analysisJobs
diff --git a/tests/unit/components/cylc/analysis/filter.spec.js b/tests/unit/components/cylc/analysis/filter.spec.js
index c7e229b7b..31d42bba8 100644
--- a/tests/unit/components/cylc/analysis/filter.spec.js
+++ b/tests/unit/components/cylc/analysis/filter.spec.js
@@ -17,13 +17,13 @@
import {
matchTask,
- platformOptions
+ platformOptions,
} from '@/components/cylc/analysis/filter'
describe('matchTask', () => {
const task = {
name: 'task_name',
- platform: 'task_platform'
+ platform: 'task_platform',
}
it('should match with default or matching filter values', () => {
@@ -31,7 +31,7 @@ describe('matchTask', () => {
{ name: '', platformOption: -1 },
{ name: 'task_name', platformOption: -1 },
{ name: '', platformOption: 'task_platform' },
- { name: 'task_name', platformOption: 'task_platform' }
+ { name: 'task_name', platformOption: 'task_platform' },
]
filters.forEach(filter => {
expect(matchTask(task, filter)).to.equal(true)
@@ -42,7 +42,7 @@ describe('matchTask', () => {
const filters = [
{ name: 'task_name', platformOption: 'wrong_platform' },
{ name: 'wrong_task', platformOption: 'task_platform' },
- { name: 'wrong_task', platformOption: 'wrong_platform' }
+ { name: 'wrong_task', platformOption: 'wrong_platform' },
]
filters.forEach(filter => {
expect(matchTask(task, filter)).to.equal(false)
@@ -53,12 +53,12 @@ describe('matchTask', () => {
const filterNames = [
{ name: 'task_', platformOption: -1 },
{ name: '_name', platformOption: -1 },
- { name: 'sk_na', platformOption: -1 }
+ { name: 'sk_na', platformOption: -1 },
]
const filterPlatforms = [
{ name: '', platformOption: 'platform' },
{ name: '', platformOption: 'form_1' },
- { name: '', platformOption: 'form' }
+ { name: '', platformOption: 'form' },
]
filterNames.forEach(filter => {
expect(matchTask(task, filter)).to.equal(true)
@@ -74,12 +74,12 @@ describe('platformOptions', () => {
const tasks = [
{ platform: 'platform_1' },
{ platform: 'platform_1' },
- { platform: 'platform_2' }
+ { platform: 'platform_2' },
]
const expected = [
{ title: 'All', value: -1 },
{ title: 'platform_1', value: 'platform_1' },
- { title: 'platform_2', value: 'platform_2' }
+ { title: 'platform_2', value: 'platform_2' },
]
expect(platformOptions([])).to.deep.equal([{ title: 'All', value: -1 }])
expect(platformOptions(tasks)).to.deep.equal(expected)
diff --git a/tests/unit/components/cylc/commandMenu/menu.vue.spec.js b/tests/unit/components/cylc/commandMenu/menu.vue.spec.js
index b7a164b82..ab4b1416d 100644
--- a/tests/unit/components/cylc/commandMenu/menu.vue.spec.js
+++ b/tests/unit/components/cylc/commandMenu/menu.vue.spec.js
@@ -31,7 +31,7 @@ describe('Command menu', () => {
const id = '~neil.armstrong/apollo//11/eagle'
wrapper.vm.node = {
id,
- tokens: new Tokens(id)
+ tokens: new Tokens(id),
}
expect(wrapper.vm.title).toEqual('apollo//11/eagle')
})
@@ -51,8 +51,8 @@ describe('Command menu', () => {
{
testID: 'workflow node',
node: simpleWorkflowNode,
- expected: undefined
- }
+ expected: undefined,
+ },
])('$testID', ({ node, expected }) => {
expect(getLogFileForNode(node)).toEqual(expected)
})
diff --git a/tests/unit/components/cylc/gantt/filter.spec.js b/tests/unit/components/cylc/gantt/filter.spec.js
index f54dce275..262cfedfd 100644
--- a/tests/unit/components/cylc/gantt/filter.spec.js
+++ b/tests/unit/components/cylc/gantt/filter.spec.js
@@ -17,7 +17,7 @@
import {
matchTasks,
- platformOptions
+ platformOptions,
} from '@/components/cylc/gantt/filter'
describe('matchTasks', () => {
@@ -41,7 +41,7 @@ describe('matchTasks', () => {
name: 'task3',
platform: 'test_platform', // 2nd job submitted on different platform
id: 'task3/02',
- }
+ },
]
const task4 = [{
name: 'task4',
@@ -94,12 +94,12 @@ describe('platformOptions', () => {
const tasks = {
test_entry_1: [{ name: 'test_entry_1', platform: 'platform_1' }],
test_entry_2: [{ name: 'test_entry_2', platform: 'platform_1' }],
- test_entry_3: [{ name: 'test_entry_3', platform: 'platform_2' }]
+ test_entry_3: [{ name: 'test_entry_3', platform: 'platform_2' }],
}
const expected = [
{ title: 'All', value: -1 },
{ title: 'platform_1', value: 'platform_1' },
- { title: 'platform_2', value: 'platform_2' }
+ { title: 'platform_2', value: 'platform_2' },
]
expect(platformOptions([])).to.deep.equal([{ title: 'All', value: -1 }])
expect(platformOptions(tasks)).to.deep.equal(expected)
diff --git a/tests/unit/components/cylc/gantt/ganttChart.vue.spec.js b/tests/unit/components/cylc/gantt/ganttChart.vue.spec.js
index 59b9c2e4d..0d837f4cf 100644
--- a/tests/unit/components/cylc/gantt/ganttChart.vue.spec.js
+++ b/tests/unit/components/cylc/gantt/ganttChart.vue.spec.js
@@ -28,7 +28,7 @@ const jobs = {
submittedTime: '2023-02-23T11:10:09Z',
startedTime: '2023-02-23T11:10:13Z',
finishedTime: '2023-02-23T11:10:20Z',
- platform: 'localhost'
+ platform: 'localhost',
}],
yet_another_test_job: [{
name: 'yet_another_test_job',
@@ -36,8 +36,8 @@ const jobs = {
submittedTime: '2023-02-23T11:10:21Z',
startedTime: '2023-02-23T11:10:24Z',
finishedTime: '2023-02-23T11:10:26Z',
- platform: 'localhost'
- }]
+ platform: 'localhost',
+ }],
}
const vuetify = createVuetify()
@@ -51,7 +51,7 @@ describe('GanttChart component', () => {
mocks: { $workflowService },
},
shallow: true,
- ...options
+ ...options,
})
}
@@ -62,22 +62,22 @@ describe('GanttChart component', () => {
const wrapper = mountFunction({
props: {
jobs,
- }
+ },
})
expect(wrapper.vm.series[0].data[0].y).to.deep.equal([
expectedSubmittedTime,
- expectedFinishedTime
+ expectedFinishedTime,
])
await wrapper.setProps({ timingOption: 'queue' })
expect(wrapper.vm.series[0].data[0].y).to.deep.equal([
expectedSubmittedTime,
- expectedStartedTime
+ expectedStartedTime,
])
await wrapper.setProps({ timingOption: 'run' })
expect(wrapper.vm.series[0].data[0].y).to.deep.equal([
expectedStartedTime,
- expectedFinishedTime
+ expectedFinishedTime,
])
})
})
diff --git a/tests/unit/components/cylc/gscan/gscan.vue.spec.js b/tests/unit/components/cylc/gscan/gscan.vue.spec.js
index f33108ffd..0fb678626 100644
--- a/tests/unit/components/cylc/gscan/gscan.vue.spec.js
+++ b/tests/unit/components/cylc/gscan/gscan.vue.spec.js
@@ -21,17 +21,17 @@ import GScan from '@/components/cylc/gscan/GScan.vue'
import CommandMenuPlugin from '@/components/cylc/commandMenu/plugin'
import {
WorkflowState,
- WorkflowStateOrder
+ WorkflowStateOrder,
} from '@/model/WorkflowState.model'
import TaskState from '@/model/TaskState.model'
import {
getWorkflowTreeSortValue,
- sortedWorkflowTree
+ sortedWorkflowTree,
} from '@/components/cylc/gscan/sort.js'
import {
TEST_TREE,
- listTree
+ listTree,
} from './utils'
import { getIDMap } from '$tests/util'
@@ -56,7 +56,7 @@ describe('GScan component', () => {
getWorkflowTreeSortValue({
type: 'workflow',
node: { status: workflowState.name },
- children: []
+ children: [],
})
).to.equal(WorkflowStateOrder.get(workflowState.name))
@@ -69,15 +69,15 @@ describe('GScan component', () => {
{
type: 'workflow',
node: { status: workflowState.name },
- children: []
+ children: [],
},
{
// a workflow with no state shouldn't mess with the sort order
type: 'workflow',
node: { status: undefined },
- children: []
- }
- ]
+ children: [],
+ },
+ ],
})
).to.equal(WorkflowStateOrder.get(workflowState.name))
}
@@ -88,7 +88,7 @@ describe('GScan component', () => {
expect(
listTree(sortedWorkflowTree(TEST_TREE))
).to.deep.equal([
- '~u/b', '~u/c', '~u/a/x1', '~u/a/x2'
+ '~u/b', '~u/c', '~u/a/x1', '~u/a/x2',
])
})
})
@@ -102,7 +102,7 @@ describe('GScan component', () => {
workflowTree: TEST_TREE,
isLoading: false,
},
- ...options
+ ...options,
})
it('has null filterState when filters are empty', async () => {
@@ -117,7 +117,7 @@ describe('GScan component', () => {
filters: {
'workflow state': [],
'task state': [],
- }
+ },
})
expect(wrapper.vm.filterState).toBeNull()
})
@@ -160,7 +160,7 @@ describe('GScan component', () => {
'workflow state': [
WorkflowState.STOPPING.name,
WorkflowState.STOPPED.name,
- ]
+ ],
},
})
filterNodes(wrapper, filteredOutNodesCache)
@@ -203,7 +203,7 @@ describe('GScan component', () => {
const filteredOutNodesCache = new Map()
await wrapper.setData({
- filters: { 'task state': [TaskState.RUNNING.name] }
+ filters: { 'task state': [TaskState.RUNNING.name] },
})
filterNodes(wrapper, filteredOutNodesCache)
expect(getIDMap(filteredOutNodesCache)).toEqual({
@@ -215,7 +215,7 @@ describe('GScan component', () => {
})
await wrapper.setData({
- filters: { 'task state': [TaskState.SUBMITTED.name] }
+ filters: { 'task state': [TaskState.SUBMITTED.name] },
})
filterNodes(wrapper, filteredOutNodesCache)
expect(getIDMap(filteredOutNodesCache)).toEqual({
diff --git a/tests/unit/components/cylc/gscan/sort.spec.js b/tests/unit/components/cylc/gscan/sort.spec.js
index a22fdf9d3..20fd4b68c 100644
--- a/tests/unit/components/cylc/gscan/sort.spec.js
+++ b/tests/unit/components/cylc/gscan/sort.spec.js
@@ -51,9 +51,9 @@ describe('flattenWorkflowParts()', () => {
type: 'workflow-part',
name: 'dark/place',
parent: '~awake/dark',
- children: [run1, run2]
- }
- ]
+ children: [run1, run2],
+ },
+ ],
}
expect(flattenWorkflowParts(node)).toStrictEqual({
...node.children[0],
@@ -73,9 +73,9 @@ describe('flattenWorkflowParts()', () => {
type: 'workflow-part',
name: 'dark/place',
parent: '~awake/dark',
- children: [run1]
- }
- ]
+ children: [run1],
+ },
+ ],
})).toStrictEqual({
...run1,
parent: '~awake',
@@ -94,7 +94,7 @@ describe('flattenWorkflowParts()', () => {
type: 'workflow-part',
name: 'dark/place',
parent: '~awake/dark',
- children: [run1]
+ children: [run1],
},
{
id: '~awake/dark/presence',
@@ -104,9 +104,9 @@ describe('flattenWorkflowParts()', () => {
children: [
{ type: 'workflow', id: 'barry' },
{ type: 'workflow', id: 'stucky' },
- ]
- }
- ]
+ ],
+ },
+ ],
}
const result = flattenWorkflowParts(node)
expect(result).toStrictEqual({
@@ -120,8 +120,8 @@ describe('flattenWorkflowParts()', () => {
name: 'place/run1',
parent: '~awake/dark',
},
- node.children[1]
- ]
+ node.children[1],
+ ],
})
})
diff --git a/tests/unit/components/cylc/gscan/utils.js b/tests/unit/components/cylc/gscan/utils.js
index 96765575b..80fa422b2 100644
--- a/tests/unit/components/cylc/gscan/utils.js
+++ b/tests/unit/components/cylc/gscan/utils.js
@@ -55,7 +55,7 @@ export const TEST_TREE = {
status: WorkflowState.STOPPED.name,
stateTotals: SUBMIT_FAILED_STATE_TOTALS,
latestStateTasks: [],
- }
+ },
},
{
id: '~u/a/x2',
@@ -65,9 +65,9 @@ export const TEST_TREE = {
node: {
status: WorkflowState.STOPPED.name,
latestStateTasks: [],
- }
- }
- ]
+ },
+ },
+ ],
},
{
id: '~u/b',
@@ -78,7 +78,7 @@ export const TEST_TREE = {
status: WorkflowState.STOPPING.name,
stateTotals: RUNNING_STATE_TOTALS,
latestStateTasks: [],
- }
+ },
},
{
id: '~u/c',
@@ -89,11 +89,11 @@ export const TEST_TREE = {
status: WorkflowState.RUNNING.name,
stateTotals: SUBMITTED_STATE_TOTALS,
latestStateTasks: [],
- }
- }
- ]
- }
- ]
+ },
+ },
+ ],
+ },
+ ],
}
/**
diff --git a/tests/unit/components/cylc/gscan/workflowicon.spec.js b/tests/unit/components/cylc/gscan/workflowicon.spec.js
index be4226129..0497f1981 100644
--- a/tests/unit/components/cylc/gscan/workflowicon.spec.js
+++ b/tests/unit/components/cylc/gscan/workflowicon.spec.js
@@ -27,20 +27,20 @@ describe('WorkflowIcon', () => {
it.each([
{
status: '',
- expected: mdiHelpCircle
+ expected: mdiHelpCircle,
},
{
status: WorkflowState.STOPPED.name,
- expected: WorkflowState.STOPPED.icon
+ expected: WorkflowState.STOPPED.icon,
},
])('uses the right icon for state: $status', ({ status, expected }) => {
const wrapper = shallowMount(WorkflowIcon, {
global: {
- plugins: [vuetify]
+ plugins: [vuetify],
},
props: {
status,
- }
+ },
})
expect(wrapper.vm.getIcon()).to.equal(expected)
})
diff --git a/tests/unit/components/cylc/job.vue.spec.js b/tests/unit/components/cylc/job.vue.spec.js
index 6a0113b62..90546e5de 100644
--- a/tests/unit/components/cylc/job.vue.spec.js
+++ b/tests/unit/components/cylc/job.vue.spec.js
@@ -23,8 +23,8 @@ describe('Job component', () => {
const wrapper = mount(Job, {
props: {
status: '',
- multiple: false
- }
+ multiple: false,
+ },
})
expect(wrapper.element.className).to.equal('c-job')
expect(wrapper.get('.job').element.childElementCount).to.equal(1)
@@ -33,8 +33,8 @@ describe('Job component', () => {
const wrapper = mount(Job, {
props: {
status: 'failed',
- 'previous-state': 'submit-failed'
- }
+ 'previous-state': 'submit-failed',
+ },
})
// The shadow is added as an extra child element for the Job SVG (two rects).
expect(wrapper.get('.job').element.childElementCount).to.equal(2)
diff --git a/tests/unit/components/cylc/mutation.vue.spec.js b/tests/unit/components/cylc/mutation.vue.spec.js
index 97bdf3a50..021aee830 100644
--- a/tests/unit/components/cylc/mutation.vue.spec.js
+++ b/tests/unit/components/cylc/mutation.vue.spec.js
@@ -30,18 +30,18 @@ const BASIC_MUTATION = {
defaultValue: '"MyDefault"',
type: {
name: 'String',
- kind: 'SCALAR'
- }
+ kind: 'SCALAR',
+ },
},
{
name: 'MyInteger',
type: {
name: 'Int',
- kind: 'SCALAR'
- }
- }
+ kind: 'SCALAR',
+ },
+ },
],
- _title: 'My Mutation'
+ _title: 'My Mutation',
}
describe('Mutation Component', () => {
@@ -53,9 +53,9 @@ describe('Mutation Component', () => {
const vuetify = createVuetify()
return mount(Mutation, {
global: {
- plugins: [vuetify]
+ plugins: [vuetify],
},
- ...options
+ ...options,
})
}
@@ -64,8 +64,8 @@ describe('Mutation Component', () => {
props: {
cylcObject,
mutation: BASIC_MUTATION,
- cancel: () => {}
- }
+ cancel: () => {},
+ },
})
const html = wrapper.html()
expect(html).to.contain('My Mutation')
@@ -80,10 +80,10 @@ describe('Mutation Component', () => {
name: 'Darmok',
description: desc,
args: [],
- _title: 'Darmok'
+ _title: 'Darmok',
},
- cancel: () => {}
- }
+ cancel: () => {},
+ },
})
describe('For a single line description', () => {
const desc = 'Lorem ipsum.'
diff --git a/tests/unit/components/cylc/table/table.data.js b/tests/unit/components/cylc/table/table.data.js
index f51dc8276..591243697 100644
--- a/tests/unit/components/cylc/table/table.data.js
+++ b/tests/unit/components/cylc/table/table.data.js
@@ -21,7 +21,7 @@ import { Tokens } from '@/utils/uid'
const tk = {
taskA: new Tokens('~cylc/workflow//20000101T0000Z/taskA'),
taskB: new Tokens('~cylc/workflow//20000102T0000Z/taskB'),
- taskC: new Tokens('~cylc/workflow//20000103T0000Z/taskC')
+ taskC: new Tokens('~cylc/workflow//20000103T0000Z/taskC'),
}
export const simpleTableTasks = [
@@ -49,11 +49,11 @@ export const simpleTableTasks = [
submittedTime: new Date().toISOString(),
startedTime: new Date().toISOString(),
finishedTime: null,
- state: JobState.RUNNING.name
+ state: JobState.RUNNING.name,
},
- children: []
- }
- ]
+ children: [],
+ },
+ ],
},
latestJob: {
id: tk.taskA.clone({ job: '01' }).id,
@@ -66,11 +66,11 @@ export const simpleTableTasks = [
submittedTime: new Date().toISOString(),
startedTime: new Date().toISOString(),
finishedTime: null,
- state: JobState.RUNNING.name
+ state: JobState.RUNNING.name,
},
- children: []
+ children: [],
},
- previousJob: null
+ previousJob: null,
},
{
task: {
@@ -82,10 +82,10 @@ export const simpleTableTasks = [
state: TaskState.WAITING.name,
name: 'taskB',
},
- children: []
+ children: [],
},
latestJob: null,
- previousJob: null
+ previousJob: null,
},
{
task: {
@@ -97,9 +97,9 @@ export const simpleTableTasks = [
state: TaskState.SUBMITTED.name,
name: 'taskC',
},
- children: []
+ children: [],
},
latestJob: null,
- previousJob: null
- }
+ previousJob: null,
+ },
]
diff --git a/tests/unit/components/cylc/table/table.vue.spec.js b/tests/unit/components/cylc/table/table.vue.spec.js
index 939c74001..4c1c4bd30 100644
--- a/tests/unit/components/cylc/table/table.vue.spec.js
+++ b/tests/unit/components/cylc/table/table.vue.spec.js
@@ -36,17 +36,17 @@ describe('Table component', () => {
global: {
plugins: [vuetify, CommandMenuPlugin],
mocks: {
- $workflowService
- }
+ $workflowService,
+ },
},
- ...options
+ ...options,
})
it('should sort cycle point column descending by default', async () => {
const wrapper = mountFunction({
props: {
- tasks: simpleTableTasks
- }
+ tasks: simpleTableTasks,
+ },
})
// check the the raw task data has the cycle points from lowest to highest
expect(wrapper.vm.tasks[wrapper.vm.tasks.length - 1].task.tokens.cycle).to.equal('20000103T0000Z')
@@ -61,8 +61,8 @@ describe('Table component', () => {
it('should display the table with valid data', () => {
const wrapper = mountFunction({
props: {
- tasks: simpleTableTasks
- }
+ tasks: simpleTableTasks,
+ },
})
expect(wrapper.props().tasks[0].task.name).to.equal('taskA')
expect(wrapper.find('div')).to.not.equal(null)
@@ -76,11 +76,11 @@ describe('Table component', () => {
localStorage.setItem('cyclePointsOrderDesc', cyclePointsOrderDesc)
const wrapper = mountFunction({
props: {
- tasks: simpleTableTasks
- }
+ tasks: simpleTableTasks,
+ },
})
expect(wrapper.vm.sortBy).toMatchObject([
- { order: expected }
+ { order: expected },
])
})
})
diff --git a/tests/unit/components/cylc/toolbar.vue.spec.js b/tests/unit/components/cylc/toolbar.vue.spec.js
index a615d3617..701ea9c31 100644
--- a/tests/unit/components/cylc/toolbar.vue.spec.js
+++ b/tests/unit/components/cylc/toolbar.vue.spec.js
@@ -24,10 +24,10 @@ import storeOptions from '@/store/options'
describe('Toolbar component', () => {
const vuetify = createVuetify({
- display: {}
+ display: {},
})
const $route = {
- name: 'testRoute'
+ name: 'testRoute',
}
let store
let mountFunction
@@ -37,16 +37,16 @@ describe('Toolbar component', () => {
mountFunction = () => mount(Toolbar, {
global: {
plugins: [vuetify, store],
- mocks: { $route }
- }
+ mocks: { $route },
+ },
})
store.state.workflows.workflows = [
{
id: 'user/id',
name: 'test',
- status: WorkflowState.RUNNING.name
- }
+ status: WorkflowState.RUNNING.name,
+ },
]
})
diff --git a/tests/unit/components/cylc/tree/tree.data.js b/tests/unit/components/cylc/tree/tree.data.js
index 331c5abaf..f6f3cb34f 100644
--- a/tests/unit/components/cylc/tree/tree.data.js
+++ b/tests/unit/components/cylc/tree/tree.data.js
@@ -25,7 +25,7 @@ export const stateTotalsTestWorkflowNodes = {
id: '~cylc/double',
name: 'double',
node: {
- id: '~cylc/double'
+ id: '~cylc/double',
},
parent: '~cylc',
tokens: {
@@ -33,7 +33,7 @@ export const stateTotalsTestWorkflowNodes = {
workflow: 'double',
id: '~cylc/double',
workflowID: '~cylc/double',
- relativeID: ''
+ relativeID: '',
},
type: 'workflow-part',
children: [
@@ -41,7 +41,7 @@ export const stateTotalsTestWorkflowNodes = {
id: '~cylc/double/mid',
name: 'mid',
node: {
- id: '~cylc/double/mid'
+ id: '~cylc/double/mid',
},
parent: '~cylc/double',
tokens: {
@@ -49,7 +49,7 @@ export const stateTotalsTestWorkflowNodes = {
workflow: 'double/mid',
id: '~cylc/double/mid',
workflowID: '~cylc/double/mid',
- relativeID: ''
+ relativeID: '',
},
type: 'workflow-part',
children: [
@@ -57,7 +57,7 @@ export const stateTotalsTestWorkflowNodes = {
id: '~cylc/double/mid/first',
name: 'first',
node: {
- id: '~cylc/double/mid/first'
+ id: '~cylc/double/mid/first',
},
parent: '~cylc/double/mid',
tokens: {
@@ -65,7 +65,7 @@ export const stateTotalsTestWorkflowNodes = {
workflow: 'double/mid/first',
id: '~cylc/double/mid/first',
workflowID: '~cylc/double/mid/first',
- relativeID: ''
+ relativeID: '',
},
type: 'workflow-part',
children: [
@@ -76,7 +76,7 @@ export const stateTotalsTestWorkflowNodes = {
workflow: 'double/mid/first/run1',
id: '~cylc/double/mid/first/run1',
workflowID: '~cylc/double/mid/first/run1',
- relativeID: ''
+ relativeID: '',
},
name: 'run1',
type: 'workflow',
@@ -96,7 +96,7 @@ export const stateTotalsTestWorkflowNodes = {
submitted: 3,
running: 6,
failed: 0,
- succeeded: 0
+ succeeded: 0,
},
latestStateTasks: {
failed: [],
@@ -105,7 +105,7 @@ export const stateTotalsTestWorkflowNodes = {
'2022-03-15/prep',
'2022-03-15/get-data',
'2022-03-16/get-data',
- '2022-03-17/get-data'
+ '2022-03-17/get-data',
],
'submit-failed': [],
submitted: [
@@ -113,29 +113,29 @@ export const stateTotalsTestWorkflowNodes = {
'2022-03-18/get-data',
'2022-03-17/get-data',
'2022-03-16/get-data',
- '2022-03-15/prep'
+ '2022-03-15/prep',
],
running: [
'2022-03-17/get-data',
'2022-03-19/get-data',
'2022-03-18/get-data',
'2022-03-16/get-data',
- '2022-03-15/get-data'
- ]
+ '2022-03-15/get-data',
+ ],
},
- __typename: 'Workflow'
+ __typename: 'Workflow',
},
children: [],
$edges: [],
- $namespaces: []
- }
- ]
+ $namespaces: [],
+ },
+ ],
},
{
id: '~cylc/double/mid/second',
name: 'second',
node: {
- id: '~cylc/double/mid/second'
+ id: '~cylc/double/mid/second',
},
parent: '~cylc/double/mid',
tokens: {
@@ -143,7 +143,7 @@ export const stateTotalsTestWorkflowNodes = {
workflow: 'double/mid/second',
id: '~cylc/double/mid/second',
workflowID: '~cylc/double/mid/second',
- relativeID: ''
+ relativeID: '',
},
type: 'workflow-part',
children: [
@@ -154,7 +154,7 @@ export const stateTotalsTestWorkflowNodes = {
workflow: 'double/mid/second/run1',
id: '~cylc/double/mid/second/run1',
workflowID: '~cylc/double/mid/second/run1',
- relativeID: ''
+ relativeID: '',
},
name: 'run1',
type: 'workflow',
@@ -174,7 +174,7 @@ export const stateTotalsTestWorkflowNodes = {
submitted: 2,
running: 6,
failed: 0,
- succeeded: 0
+ succeeded: 0,
},
latestStateTasks: {
failed: [],
@@ -183,7 +183,7 @@ export const stateTotalsTestWorkflowNodes = {
'2022-01-15/prep',
'2022-01-15/get-data',
'2022-01-16/get-data',
- '2022-01-17/get-data'
+ '2022-01-17/get-data',
],
'submit-failed': [],
submitted: [
@@ -191,27 +191,27 @@ export const stateTotalsTestWorkflowNodes = {
'2022-01-18/get-data',
'2022-01-17/get-data',
'2022-01-16/get-data',
- '2022-01-15/prep'
+ '2022-01-15/prep',
],
running: [
'2022-01-19/get-data',
'2022-01-18/get-data',
'2022-01-17/get-data',
'2022-01-15/prep',
- '2022-01-16/get-data'
- ]
+ '2022-01-16/get-data',
+ ],
},
- __typename: 'Workflow'
+ __typename: 'Workflow',
},
children: [],
$edges: [],
- $namespaces: []
- }
- ]
- }
- ]
- }
- ]
+ $namespaces: [],
+ },
+ ],
+ },
+ ],
+ },
+ ],
}
export const simpleWorkflowTree4Nodes = [
@@ -224,8 +224,8 @@ export const simpleWorkflowTree4Nodes = [
__typename: 'Workflow',
state: 'running',
node: {
- status: 'running'
- }
+ status: 'running',
+ },
},
children: [
{
@@ -235,7 +235,7 @@ export const simpleWorkflowTree4Nodes = [
type: 'cycle',
node: {
__typename: 'CyclePoint',
- state: 'failed'
+ state: 'failed',
},
children: ['stub'],
familyTree: [
@@ -245,7 +245,7 @@ export const simpleWorkflowTree4Nodes = [
tokens: new Tokens('~user/workflow1//20100101T0000Z/root'),
type: 'family',
node: {
- state: 'failed'
+ state: 'failed',
},
children: [
{
@@ -255,7 +255,7 @@ export const simpleWorkflowTree4Nodes = [
type: 'task',
node: {
__typename: 'TaskProxy',
- state: 'failed'
+ state: 'failed',
},
children: [
{
@@ -268,9 +268,9 @@ export const simpleWorkflowTree4Nodes = [
startedTime: '2019-08-19T22:51:06Z',
state: 'submit-failed',
submitNum: 2,
- customOutputs: []
+ customOutputs: [],
},
- children: []
+ children: [],
},
{
id: '~user/workflow1//20100101T0000Z/foo/01',
@@ -285,20 +285,20 @@ export const simpleWorkflowTree4Nodes = [
customOutputs: [
{
label: 'out1',
- message: 'Aliquam a lectus euismod, vehicula leo vel, ultricies odio.'
- }
- ]
+ message: 'Aliquam a lectus euismod, vehicula leo vel, ultricies odio.',
+ },
+ ],
},
- children: []
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
+ children: [],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
]
export const simpleWorkflowNode = simpleWorkflowTree4Nodes[0]
@@ -313,19 +313,19 @@ export const sampleWorkflow1 = {
status: 'running',
owner: 'cylc',
host: 'ranma',
- port: 43066
+ port: 43066,
},
cyclePoints: [
{
__typename: 'FamilyProxy',
id: '~cylc/one//20000101T0000Z/root',
- cyclePoint: '20000101T0000Z'
+ cyclePoint: '20000101T0000Z',
},
{
__typename: 'FamilyProxy',
id: '~cylc/one//20000102T0000Z/root',
- cyclePoint: '20000102T0000Z'
- }
+ cyclePoint: '20000102T0000Z',
+ },
],
familyProxies: [
{
@@ -339,8 +339,8 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'succeeded',
name: 'GOOD',
- cyclePoint: '20000101T0000Z'
- }
+ cyclePoint: '20000101T0000Z',
+ },
},
{
id: '~cylc/one//20000101T0000Z/BAD',
@@ -353,8 +353,8 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000101T0000Z'
- }
+ cyclePoint: '20000101T0000Z',
+ },
},
{
id: '~cylc/one//20000101T0000Z/GOOD',
@@ -367,8 +367,8 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000101T0000Z'
- }
+ cyclePoint: '20000101T0000Z',
+ },
},
{
id: '~cylc/one//20000102T0000Z/SUCCEEDED',
@@ -381,8 +381,8 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'succeeded',
name: 'GOOD',
- cyclePoint: '20000102T0000Z'
- }
+ cyclePoint: '20000102T0000Z',
+ },
},
{
id: '~cylc/one//20000102T0000Z/GOOD',
@@ -395,8 +395,8 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000102T0000Z'
- }
+ cyclePoint: '20000102T0000Z',
+ },
},
{
id: '~cylc/one//20000102T0000Z/BAD',
@@ -409,9 +409,9 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
name: 'root',
cyclePoint: '20000102T0000Z',
- state: 'failed'
- }
- }
+ state: 'failed',
+ },
+ },
],
taskProxies: [
{
@@ -425,13 +425,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'succeeded',
name: 'SUCCEEDED',
- cyclePoint: '20000101T0000Z'
+ cyclePoint: '20000101T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 0.5,
- name: 'eventually_succeeded'
- }
+ name: 'eventually_succeeded',
+ },
},
{
id: '~cylc/one//20000101T0000Z/sleepy',
@@ -443,13 +443,13 @@ export const sampleWorkflow1 = {
id: '~cylc/one//20000101T0000Z/root',
state: 'failed',
name: 'root',
- cyclePoint: '20000101T0000Z'
+ cyclePoint: '20000101T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 1.0,
- name: 'sleepy'
- }
+ name: 'sleepy',
+ },
},
{
id: '~cylc/one//20000101T0000Z/succeeded',
@@ -462,13 +462,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'succeeded',
name: 'SUCCEEDED',
- cyclePoint: '20000101T0000Z'
+ cyclePoint: '20000101T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 1.0,
- name: 'succeeded'
- }
+ name: 'succeeded',
+ },
},
{
id: '~cylc/one//20000101T0000Z/retrying',
@@ -481,13 +481,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'BAD',
- cyclePoint: '20000101T0000Z'
+ cyclePoint: '20000101T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 0.0,
- name: 'retrying'
- }
+ name: 'retrying',
+ },
},
{
id: '~cylc/one//20000101T0000Z/checkpoint',
@@ -500,13 +500,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000101T0000Z'
+ cyclePoint: '20000101T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 7.0,
- name: 'checkpoint'
- }
+ name: 'checkpoint',
+ },
},
{
id: '~cylc/one//20000101T0000Z/failed',
@@ -519,13 +519,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'BAD',
- cyclePoint: '20000101T0000Z'
+ cyclePoint: '20000101T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 0.0,
- name: 'failed'
- }
+ name: 'failed',
+ },
},
{
id: '~cylc/one//20000101T0000Z/waiting',
@@ -538,13 +538,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000101T0000Z'
+ cyclePoint: '20000101T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 1.0,
- name: 'waiting'
- }
+ name: 'waiting',
+ },
},
{
id: '~cylc/one//20000102T0000Z/sleepy',
@@ -557,13 +557,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000102T0000Z'
+ cyclePoint: '20000102T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 1.0,
- name: 'sleepy'
- }
+ name: 'sleepy',
+ },
},
{
id: '~cylc/one//20000102T0000Z/succeeded',
@@ -576,13 +576,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'succeeded',
name: 'SUCCEEDED',
- cyclePoint: '20000102T0000Z'
+ cyclePoint: '20000102T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 1.0,
- name: 'succeeded'
- }
+ name: 'succeeded',
+ },
},
{
id: '~cylc/one//20000102T0000Z/failed',
@@ -595,13 +595,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'BAD',
- cyclePoint: '20000102T0000Z'
+ cyclePoint: '20000102T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 0.0,
- name: 'failed'
- }
+ name: 'failed',
+ },
},
{
id: '~cylc/one//20000102T0000Z/waiting',
@@ -614,13 +614,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000102T0000Z'
+ cyclePoint: '20000102T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 1.0,
- name: 'waiting'
- }
+ name: 'waiting',
+ },
},
{
id: '~cylc/one//20000102T0000Z/checkpoint',
@@ -633,13 +633,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000102T0000Z'
+ cyclePoint: '20000102T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 7.0,
- name: 'checkpoint'
- }
+ name: 'checkpoint',
+ },
},
{
id: '~cylc/one//20000102T0000Z/checkpoint2',
@@ -652,13 +652,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'root',
- cyclePoint: '20000102T0000Z'
+ cyclePoint: '20000102T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 0.0,
- name: 'checkpoint2'
- }
+ name: 'checkpoint2',
+ },
},
{
id: '~cylc/one//20000102T0000Z/eventually_succeeded',
@@ -671,13 +671,13 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'succeeded',
name: 'SUCCEEDED',
- cyclePoint: '20000102T0000Z'
+ cyclePoint: '20000102T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 0.5,
- name: 'eventually_succeeded'
- }
+ name: 'eventually_succeeded',
+ },
},
{
id: '~cylc/one//20000102T0000Z/retrying',
@@ -690,14 +690,14 @@ export const sampleWorkflow1 = {
__typename: 'FamilyProxy',
state: 'failed',
name: 'BAD',
- cyclePoint: '20000102T0000Z'
+ cyclePoint: '20000102T0000Z',
},
task: {
__typename: 'Task',
meanElapsedTime: 0.0,
- name: 'retrying'
- }
- }
+ name: 'retrying',
+ },
+ },
],
jobs: [
{
@@ -705,7 +705,7 @@ export const sampleWorkflow1 = {
name: '04',
firstParent: {
id: '~cylc/one//20000101T0000Z/eventually_succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -720,29 +720,29 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'succeeded',
- message: 'succeeded'
+ message: 'succeeded',
},
{
label: 'out1',
- message: 'Aliquam a lectus euismod, vehicula leo vel, ultricies odio.'
- }
- ]
- }
+ message: 'Aliquam a lectus euismod, vehicula leo vel, ultricies odio.',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/eventually_succeeded/03',
name: '03',
firstParent: {
id: '~cylc/one//20000101T0000Z/eventually_succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -757,25 +757,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/eventually_succeeded/02',
name: '02',
firstParent: {
id: '~cylc/one//20000101T0000Z/eventually_succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -790,25 +790,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'succeeded',
- message: 'succeeded'
- }
- ]
- }
+ message: 'succeeded',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/eventually_succeeded/01',
name: '01',
firstParent: {
id: '~cylc/one//20000101T0000Z/eventually_succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -823,25 +823,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/sleepy/01',
name: '01',
firstParent: {
id: '~cylc/one//20000101T0000Z/sleepy',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -856,25 +856,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'succeeded',
- message: 'succeeded'
- }
- ]
- }
+ message: 'succeeded',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/succeeded/1',
name: '01',
firstParent: {
id: '~cylc/one//20000101T0000Z/succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -889,25 +889,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'succeeded',
- message: 'succeeded'
- }
- ]
- }
+ message: 'succeeded',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/retrying/01',
name: '01',
firstParent: {
id: '~cylc/one//20000101T0000Z/retrying',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -922,25 +922,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/checkpoint/01',
name: '01',
firstParent: {
id: '~cylc/one//20000101T0000Z/checkpoint',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -955,25 +955,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'succeeded',
- message: 'succeeded'
- }
- ]
- }
+ message: 'succeeded',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/failed/01',
name: '01',
firstParent: {
id: '~cylc/one//20000101T0000Z/failed',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -988,25 +988,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000101T0000Z/waiting/01',
name: '01',
firstParent: {
id: '~cylc/one//20000101T0000Z/waiting',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1021,25 +1021,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'succeeded',
- message: 'succeeded'
- }
- ]
- }
+ message: 'succeeded',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/succeeded/01',
name: '01',
firstParent: {
id: '~cylc/one//20000102T0000Z/succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1054,25 +1054,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'succeeded',
- message: 'succeeded'
- }
- ]
- }
+ message: 'succeeded',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/failed/01',
name: '01',
firstParent: {
id: '~cylc/one//20000102T0000Z/failed',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1087,25 +1087,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/checkpoint/01',
name: '01',
firstParent: {
id: '~cylc/one//20000102T0000Z/checkpoint',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1120,25 +1120,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/checkpoint2/01',
name: '01',
firstParent: {
id: '~cylc/one//20000102T0000Z/checkpoint2',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'TaskProxy',
jobRunnerName: 'background',
@@ -1153,21 +1153,21 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
- }
- ]
- }
+ message: 'started',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/eventually_succeeded/04',
name: '04',
firstParent: {
id: '~cylc/one//20000102T0000Z/eventually_succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1182,25 +1182,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'succeeded',
- message: 'succeeded'
- }
- ]
- }
+ message: 'succeeded',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/eventually_succeeded/03',
name: '03',
firstParent: {
id: '~cylc/one//20000102T0000Z/eventually_succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1215,25 +1215,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/eventually_succeeded/02',
name: '02',
firstParent: {
id: '~cylc/one//20000102T0000Z/eventually_succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1248,25 +1248,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/eventually_succeeded/01',
name: '01',
firstParent: {
id: '~cylc/one//20000102T0000Z/eventually_succeeded',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1281,25 +1281,25 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
+ message: 'failed',
+ },
+ ],
+ },
},
{
id: '~cylc/one//20000102T0000Z/retrying/01',
name: '01',
firstParent: {
id: '~cylc/one//20000102T0000Z/retrying',
- __typename: 'TaskProxy'
+ __typename: 'TaskProxy',
},
__typename: 'Job',
jobRunnerName: 'background',
@@ -1314,18 +1314,18 @@ export const sampleWorkflow1 = {
outputs: [
{
label: 'submitted',
- message: 'submitted'
+ message: 'submitted',
},
{
label: 'started',
- message: 'started'
+ message: 'started',
},
{
label: 'failed',
- message: 'failed'
- }
- ]
- }
- }
- ]
+ message: 'failed',
+ },
+ ],
+ },
+ },
+ ],
}
diff --git a/tests/unit/components/cylc/tree/treeitem.vue.spec.js b/tests/unit/components/cylc/tree/treeitem.vue.spec.js
index 168f94277..a89ee30ff 100644
--- a/tests/unit/components/cylc/tree/treeitem.vue.spec.js
+++ b/tests/unit/components/cylc/tree/treeitem.vue.spec.js
@@ -26,7 +26,7 @@ import {
stateTotalsTestWorkflowNodes,
simpleWorkflowNode,
simpleCyclepointNode,
- simpleTaskNode
+ simpleTaskNode,
} from './tree.data'
import CommandMenuPlugin from '@/components/cylc/commandMenu/plugin'
import WorkflowService from '@/services/workflow.service'
@@ -61,9 +61,9 @@ describe('TreeItem component', () => {
const mountFunction = (options) => mount(TreeItem, {
global: {
plugins: [createVuetify(), CommandMenuPlugin],
- mock: { $workflowService }
+ mock: { $workflowService },
},
- ...options
+ ...options,
})
it('should display the treeitem with valid data', () => {
@@ -85,8 +85,8 @@ describe('TreeItem component', () => {
props: {
node,
filteredOutNodesCache: new WeakMap(),
- autoExpandTypes: ['cycle']
- }
+ autoExpandTypes: ['cycle'],
+ },
})
expected
? expect(wrapper).to.be.expanded()
@@ -99,7 +99,7 @@ describe('TreeItem component', () => {
props: {
node: simpleTaskNode,
filteredOutNodesCache: new WeakMap(),
- }
+ },
})
expect(wrapper).to.not.be.expanded()
const expandCollapseBtn = wrapper.find('.node-expand-collapse-button')
@@ -139,9 +139,9 @@ describe('GScanTreeItem', () => {
const mountFunction = (options) => mount(GScanTreeItem, {
global: {
plugins: [createVuetify(), CommandMenuPlugin],
- mock: { $workflowService }
+ mock: { $workflowService },
},
- ...options
+ ...options,
})
describe('computed properties', () => {
@@ -149,7 +149,7 @@ describe('GScanTreeItem', () => {
props: {
node: flattenWorkflowParts(stateTotalsTestWorkflowNodes),
filteredOutNodesCache: new WeakMap(),
- }
+ },
})
it('combines all descendant tasks', () => {
expect(wrapper.vm.descendantTaskInfo.latestTasks.submitted.length).to.equal(10)
@@ -185,7 +185,7 @@ describe('GScanTreeItem', () => {
props: {
node: {
type: 'workflow',
- tokens: { workflow: 'a/b/c' }
+ tokens: { workflow: 'a/b/c' },
},
filteredOutNodesCache: new WeakMap(),
},
diff --git a/tests/unit/components/graphqlFormGenerator/editRuntimeForm.vue.spec.js b/tests/unit/components/graphqlFormGenerator/editRuntimeForm.vue.spec.js
index c412457cc..1511d0c1d 100644
--- a/tests/unit/components/graphqlFormGenerator/editRuntimeForm.vue.spec.js
+++ b/tests/unit/components/graphqlFormGenerator/editRuntimeForm.vue.spec.js
@@ -42,25 +42,25 @@ const INITIAL_DATA = {
{
key: '--nodes',
value: '5',
- frozenKey: true
+ frozenKey: true,
},
{
key: '--account',
value: 'h_seldon',
- frozenKey: true
- }
+ frozenKey: true,
+ },
],
environment: [
{
key: 'FACTION',
value: 'Foundation',
- frozenKey: true
+ frozenKey: true,
},
{
key: 'MAYOR',
value: 'Hardin',
- frozenKey: true
- }
+ frozenKey: true,
+ },
],
outputs: [],
runMode: 'Live',
@@ -69,7 +69,7 @@ const INITIAL_DATA = {
const $workflowService = {
query () {
return Promise.resolve(taskProxy.data)
- }
+ },
}
const vuetify = createVuetify()
@@ -79,10 +79,10 @@ describe('EditRuntimeForm Component', () => {
cylcObject: {
id: '~u/w//1/t',
isFamily: false,
- tokens: { id: '~u/w//1/t' }
+ tokens: { id: '~u/w//1/t' },
},
value: false,
- types: cloneDeep(IntrospectionQuery.data.__schema.types)
+ types: cloneDeep(IntrospectionQuery.data.__schema.types),
}
/**
@@ -92,9 +92,9 @@ describe('EditRuntimeForm Component', () => {
const mountFunction = (options) => shallowMount(EditRuntimeForm, {
global: {
plugins: [vuetify],
- mocks: { $workflowService }
+ mocks: { $workflowService },
},
- ...options
+ ...options,
})
describe('reset()', () => {
@@ -118,39 +118,39 @@ describe('EditRuntimeForm Component', () => {
environment: [
{ // new item
key: 'HORSE',
- value: '22'
+ value: '22',
},
{ // altered item
key: 'FACTION',
value: 'Empire',
- frozenKey: true
+ frozenKey: true,
},
{
key: 'MAYOR',
value: 'Hardin',
- frozenKey: true
- }
+ frozenKey: true,
+ },
],
outputs: [
{
key: 'planet',
- value: 'Trantor'
- }
- ]
+ value: 'Trantor',
+ },
+ ],
}
const expected = [
{ execution_time_limit: 'PT30M' },
{ environment: { HORSE: '22' } },
{ environment: { FACTION: 'Empire' } },
- { outputs: { planet: 'Trantor' } }
+ { outputs: { planet: 'Trantor' } },
]
const wrapper = mountFunction({
props,
data: () => ({
initialData: INITIAL_DATA,
- model
+ model,
}),
- created () {}
+ created () {},
})
expect(wrapper.vm.getBroadcastData()).to.deep.equal(expected)
})
@@ -160,20 +160,20 @@ describe('EditRuntimeForm Component', () => {
...INITIAL_DATA,
environment: [
{ key: null, value: null },
- { key: undefined, value: undefined }
+ { key: undefined, value: undefined },
],
outputs: [
- {}
- ]
+ {},
+ ],
}
const expected = []
const wrapper = mountFunction({
props,
data: () => ({
initialData: INITIAL_DATA,
- model
+ model,
}),
- created () {}
+ created () {},
})
expect(wrapper.vm.getBroadcastData()).to.deep.equal(expected)
})
diff --git a/tests/unit/components/graphqlFormGenerator/formgenerator.vue.spec.js b/tests/unit/components/graphqlFormGenerator/formgenerator.vue.spec.js
index 20e057b7e..ca06b517c 100644
--- a/tests/unit/components/graphqlFormGenerator/formgenerator.vue.spec.js
+++ b/tests/unit/components/graphqlFormGenerator/formgenerator.vue.spec.js
@@ -29,17 +29,17 @@ const BASIC_MUTATION = {
defaultValue: '"MyDefault"',
type: {
name: 'String',
- kind: 'SCALAR'
- }
+ kind: 'SCALAR',
+ },
},
{
name: 'MyInteger',
type: {
name: 'Int',
- kind: 'SCALAR'
- }
- }
- ]
+ kind: 'SCALAR',
+ },
+ },
+ ],
}
const CUSTOM_OBJECT = {
@@ -50,17 +50,17 @@ const CUSTOM_OBJECT = {
name: 'MyString',
type: {
name: 'String',
- kind: 'SCALAR'
- }
+ kind: 'SCALAR',
+ },
},
{
name: 'MyInteger',
type: {
name: 'Int',
- kind: 'SCALAR'
- }
- }
- ]
+ kind: 'SCALAR',
+ },
+ },
+ ],
}
const NESTED_TYPES = [
@@ -75,11 +75,11 @@ const NESTED_TYPES = [
kind: 'NON_NULL',
ofType: {
name: 'String',
- kind: 'SCALAR'
- }
- }
+ kind: 'SCALAR',
+ },
+ },
},
- null
+ null,
],
[
{
@@ -91,11 +91,11 @@ const NESTED_TYPES = [
kind: 'LIST',
ofType: {
name: 'String',
- kind: 'SCALAR'
- }
- }
+ kind: 'SCALAR',
+ },
+ },
},
- []
+ [],
],
[
{
@@ -107,11 +107,11 @@ const NESTED_TYPES = [
kind: 'LIST',
ofType: {
name: 'MyObject',
- kind: 'OBJECT'
- }
- }
+ kind: 'OBJECT',
+ },
+ },
},
- [{ MyString: null, MyInteger: null }]
+ [{ MyString: null, MyInteger: null }],
],
[
{
@@ -129,13 +129,13 @@ const NESTED_TYPES = [
kind: 'NON_NULL',
ofType: {
name: 'String',
- kind: 'SCALAR'
- }
- }
- }
- }
+ kind: 'SCALAR',
+ },
+ },
+ },
+ },
},
- []
+ [],
],
[
{
@@ -153,14 +153,14 @@ const NESTED_TYPES = [
kind: 'NON_NULL',
ofType: {
name: 'MyObject',
- kind: 'OBJECT'
- }
- }
- }
- }
+ kind: 'OBJECT',
+ },
+ },
+ },
+ },
},
- [{ MyString: null, MyInteger: null }]
- ]
+ [{ MyString: null, MyInteger: null }],
+ ],
]
/**
@@ -180,20 +180,20 @@ describe('FormGenerator Component', () => {
*/
const mountFunction = (options) => mount(FormGenerator, {
global: {
- plugins: [vuetify]
+ plugins: [vuetify],
},
- ...options
+ ...options,
})
it('should parse default values from the schema for simple types', () => {
const wrapper = mountFunction({
props: {
- mutation: BASIC_MUTATION
- }
+ mutation: BASIC_MUTATION,
+ },
})
expect(getModel(wrapper)).to.deep.equal({
MyString: 'MyDefault',
- MyInteger: null
+ MyInteger: null,
})
})
@@ -204,10 +204,10 @@ describe('FormGenerator Component', () => {
mutation: {
name: type.name + 'Mutation',
description: 'Beef Wellington',
- args: [type]
+ args: [type],
},
- types: [CUSTOM_OBJECT]
- }
+ types: [CUSTOM_OBJECT],
+ },
})
const expected = { [type.name]: JSON.parse(type.defaultValue) }
expect(getModel(wrapper)).to.deep.equal(expected)
@@ -223,10 +223,10 @@ describe('FormGenerator Component', () => {
mutation: {
name: type.name + 'Mutation',
description: 'Beef Wellington',
- args: [type]
+ args: [type],
},
- types: [CUSTOM_OBJECT]
- }
+ types: [CUSTOM_OBJECT],
+ },
})
const expected = { [type.name]: defaultValue }
expect(getModel(wrapper)).to.deep.equal(expected)
@@ -238,13 +238,13 @@ describe('FormGenerator Component', () => {
props: {
mutation: BASIC_MUTATION,
initialData: {
- MyString: 'Foo'
- }
- }
+ MyString: 'Foo',
+ },
+ },
})
expect(getModel(wrapper)).to.deep.equal({
MyString: 'Foo',
- MyInteger: null
+ MyInteger: null,
})
})
@@ -253,9 +253,9 @@ describe('FormGenerator Component', () => {
props: {
mutation: BASIC_MUTATION,
initialData: {
- MyString: 'Foo'
- }
- }
+ MyString: 'Foo',
+ },
+ },
})
const before = getModel(wrapper)
wrapper.vm.reset()
diff --git a/tests/unit/graphql/merge.spec.js b/tests/unit/graphql/merge.spec.js
index 6259fa652..0653d1cb9 100644
--- a/tests/unit/graphql/merge.spec.js
+++ b/tests/unit/graphql/merge.spec.js
@@ -163,20 +163,20 @@ describe('mergeQueries', () => {
const tests = [
{
a: true,
- b: false
+ b: false,
},
{
a: 'test',
- b: 'production'
+ b: 'production',
},
{
a: 1,
- b: 10
+ b: 10,
},
{
a: 1.0,
- b: 10.0
- }
+ b: 10.0,
+ },
]
for (const test of tests) {
const queryA = gql`query {
diff --git a/tests/unit/mixins/graphql.spec.js b/tests/unit/mixins/graphql.spec.js
index 0111a94ba..3e920ffe1 100644
--- a/tests/unit/mixins/graphql.spec.js
+++ b/tests/unit/mixins/graphql.spec.js
@@ -29,19 +29,19 @@ describe('GraphQL mixin', () => {
const workflowName = 'test'
const Component = {
mixins: [graphqlMixin],
- render () {}
+ render () {},
}
const component = shallowMount(Component, {
global: {
- plugins: [store]
+ plugins: [store],
},
props: {
- workflowName
- }
+ workflowName,
+ },
})
const variables = component.vm.variables
const expected = {
- workflowId: `~${user.owner}/${workflowName}`
+ workflowId: `~${user.owner}/${workflowName}`,
}
expect(variables).to.deep.equal(expected)
})
diff --git a/tests/unit/mixins/subscription.spec.js b/tests/unit/mixins/subscription.spec.js
index 51c79076d..8672a65d7 100644
--- a/tests/unit/mixins/subscription.spec.js
+++ b/tests/unit/mixins/subscription.spec.js
@@ -36,35 +36,35 @@ describe('Subscription mixin', () => {
const tests = [
{
viewState: ViewState.NO_STATE,
- expectedIsLoading: false
+ expectedIsLoading: false,
},
{
viewState: ViewState.LOADING,
- expectedIsLoading: true
+ expectedIsLoading: true,
},
{
viewState: ViewState.COMPLETE,
- expectedIsLoading: false
+ expectedIsLoading: false,
},
{
viewState: ViewState.ERROR,
- expectedIsLoading: false
- }
+ expectedIsLoading: false,
+ },
]
for (const test of tests) {
const Component = {
mixins: [subscriptionMixin],
- render () { }
+ render () { },
}
const component = mount(Component, {
global: {
- plugins: [store]
+ plugins: [store],
},
data () {
return {
- viewState: test.viewState
+ viewState: test.viewState,
}
- }
+ },
})
expect(component.vm.isLoading).to.equal(test.expectedIsLoading)
}
@@ -73,12 +73,12 @@ describe('Subscription mixin', () => {
store.state.alert = null
const Component = {
mixins: [subscriptionMixin],
- render () {}
+ render () {},
}
const component = mount(Component, {
global: {
- plugins: [store]
- }
+ plugins: [store],
+ },
})
const alert = new Alert('text', 'red')
component.vm.setAlert(alert)
diff --git a/tests/unit/mixins/subscriptionComponent.spec.js b/tests/unit/mixins/subscriptionComponent.spec.js
index 47a40492d..c3df946d4 100644
--- a/tests/unit/mixins/subscriptionComponent.spec.js
+++ b/tests/unit/mixins/subscriptionComponent.spec.js
@@ -29,14 +29,14 @@ describe('Subscription Component mixin', () => {
const Component = {
mixins: [subscriptionComponentMixin],
data: () => ({
- query: { foo: 1 }
+ query: { foo: 1 },
}),
- render () { }
+ render () { },
}
component = mount(Component, {
global: {
- mocks: { $workflowService }
- }
+ mocks: { $workflowService },
+ },
})
})
diff --git a/tests/unit/model/subscription.model.spec.js b/tests/unit/model/subscription.model.spec.js
index 79c8b7669..124fd9134 100644
--- a/tests/unit/model/subscription.model.spec.js
+++ b/tests/unit/model/subscription.model.spec.js
@@ -24,7 +24,7 @@ import ViewState from '@/model/ViewState.model'
describe('SubscriptionQuery model', () => {
const query = gql`query { workflow { id } }`
const variables = {
- workflowId: '~cylc/cylc'
+ workflowId: '~cylc/cylc',
}
const name = 'root'
const callbacks = []
@@ -63,37 +63,37 @@ describe('SubscriptionQuery model', () => {
viewState: ViewState.ERROR,
debug: true,
context: {
- message: 'test'
- }
+ message: 'test',
+ },
},
{
viewState: ViewState.NO_STATE,
debug: true,
context: {
- message: 'test'
- }
+ message: 'test',
+ },
},
{
viewState: ViewState.LOADING,
debug: true,
context: {
- message: 'test'
- }
+ message: 'test',
+ },
},
{
viewState: ViewState.COMPLETE,
debug: true,
context: {
- message: 'test'
- }
- }
+ message: 'test',
+ },
+ },
]
for (const test of tests) {
const subscription = new Subscription(subscriptionQuery, test.debug)
subscription.subscribers[1] = {
viewState: null,
setAlert: () => {
- }
+ },
}
subscription.handleViewState(test.viewState, test.context)
Object.values(subscription.subscribers).forEach(subscriber => {
diff --git a/tests/unit/model/subscriptionquery.model.spec.js b/tests/unit/model/subscriptionquery.model.spec.js
index 2648a5c8b..9bb0fd858 100644
--- a/tests/unit/model/subscriptionquery.model.spec.js
+++ b/tests/unit/model/subscriptionquery.model.spec.js
@@ -24,11 +24,11 @@ describe('SubscriptionQuery model', () => {
it('should be created', () => {
const query = gql`query { workflow { id } }`
const variables = {
- workflowId: '~cylc/cylc'
+ workflowId: '~cylc/cylc',
}
const name = 'root'
const callbacks = [
- new DeltasCallback()
+ new DeltasCallback(),
]
const isDelta = true
const isGlobalCallback = true
diff --git a/tests/unit/model/taskstate.model.spec.js b/tests/unit/model/taskstate.model.spec.js
index 491dc8ef1..db1981094 100644
--- a/tests/unit/model/taskstate.model.spec.js
+++ b/tests/unit/model/taskstate.model.spec.js
@@ -17,7 +17,7 @@
import {
TaskState,
- TaskStateUserOrder
+ TaskStateUserOrder,
} from '@/model/TaskState.model'
describe('TaskState model', () => {
diff --git a/tests/unit/services/user.service.spec.js b/tests/unit/services/user.service.spec.js
index b6f325946..0977dd052 100644
--- a/tests/unit/services/user.service.spec.js
+++ b/tests/unit/services/user.service.spec.js
@@ -45,7 +45,7 @@ describe('getUserProfile', () => {
...expected,
name: expected.username,
other_stuff: null,
- }
+ },
})
sandbox.stub(axios, 'get').returns(response)
const user = await getUserProfile()
@@ -56,7 +56,7 @@ describe('getUserProfile', () => {
expect(store.state.alert).to.equal(null)
const e = new Error('mock error')
e.response = {
- statusText: 'Test Status'
+ statusText: 'Test Status',
}
sandbox.stub(axios, 'get').rejects(e)
return getUserProfile()
diff --git a/tests/unit/services/workflow.service.spec.js b/tests/unit/services/workflow.service.spec.js
index 4fc31ad0d..3960506e6 100644
--- a/tests/unit/services/workflow.service.spec.js
+++ b/tests/unit/services/workflow.service.spec.js
@@ -67,16 +67,16 @@ describe('WorkflowService', () => {
createApolloClient: () => ({
query: vi.fn(),
subscribe: () => ({
- subscribe: vi.fn()
+ subscribe: vi.fn(),
}),
- })
+ }),
}))
subscriptionClient = null
// TODO: really load some mutations
sandbox.stub(WorkflowService.prototype, 'loadTypes').returns(
Promise.resolve({
mutations: [],
- types: []
+ types: [],
})
)
service = new WorkflowService(url, subscriptionClient)
@@ -90,7 +90,7 @@ describe('WorkflowService', () => {
subscriptionQuery = new SubscriptionQuery(
query,
{
- workflowId: '~cylc/test'
+ workflowId: '~cylc/test',
},
'root',
[],
@@ -108,7 +108,7 @@ describe('WorkflowService', () => {
_uid: 'view',
query: subscriptionQuery,
viewState: ViewState.NO_STATE,
- setAlert: () => {}
+ setAlert: () => {},
}
service.subscribe(view)
})
@@ -224,7 +224,7 @@ describe('WorkflowService', () => {
*/
const view1 = {
_uid: 'view1',
- query: query1
+ query: query1,
}
service.subscribe(view1)
// at this point we have only 1 query, so the computed query must have the exact value we provided
@@ -249,7 +249,7 @@ describe('WorkflowService', () => {
*/
const view2 = {
_uid: 'view2',
- query: query2
+ query: query2,
}
service.subscribe(view2)
// now the queries must have been merged
@@ -271,7 +271,7 @@ describe('WorkflowService', () => {
it('should not add duplicate callbacks', () => {
const newCallbacks = [
new WorkflowCallback(),
- new TreeCallback()
+ new TreeCallback(),
]
subscriptionQuery.callbacks.push(...newCallbacks)
const newSubscriptionQuery = new SubscriptionQuery(
@@ -284,7 +284,7 @@ describe('WorkflowService', () => {
)
const anotherView = {
_uid: 'anotherView',
- query: newSubscriptionQuery
+ query: newSubscriptionQuery,
}
service.subscribe(anotherView)
// Same callbacks, Lodash's union should add to list like a set
@@ -304,7 +304,7 @@ describe('WorkflowService', () => {
)
const anotherView = {
_uid: 'anotherView',
- query: newSubscriptionQuery
+ query: newSubscriptionQuery,
}
service.subscribe(anotherView)
// Same callbacks, Lodash's union should add to list like a set
@@ -318,7 +318,7 @@ describe('WorkflowService', () => {
const anotherQuery = new SubscriptionQuery(
gql`query { workflow { id } }`,
{
- invalidVariable: true
+ invalidVariable: true,
},
'test',
[],
@@ -327,7 +327,7 @@ describe('WorkflowService', () => {
_uid: 'view',
query: anotherQuery,
viewState: ViewState.NO_STATE,
- setAlert: () => {}
+ setAlert: () => {},
}
expect(() => { service.recompute(subscription) }).to.throw()
})
@@ -346,7 +346,7 @@ describe('WorkflowService', () => {
it('should NOT call unsubscribe if there are still subscribers left', () => {
const anotherView = {
_uid: 'test',
- query: subscriptionQuery
+ query: subscriptionQuery,
}
service.subscribe(anotherView)
const stub = sandbox.stub(service, 'stopSubscription')
@@ -357,7 +357,7 @@ describe('WorkflowService', () => {
describe('stopSubscription', () => {
it('should remove the subscription', () => {
subscription.observable = {
- unsubscribe: () => {}
+ unsubscribe: () => {},
}
expect(service.subscriptions[subscription.query.name]).to.not.equal(null)
service.stopSubscription(subscription)
@@ -383,8 +383,8 @@ describe('Global Callback', () => {
added: {
id: 123,
workflow: { id: '~user/foo' },
- taskProxies: { id: '~user/foo//1/a' }
- }
+ taskProxies: { id: '~user/foo//1/a' },
+ },
}
callback.before(delta1, store, errors)
callback.onAdded(delta1.added, store, errors)
@@ -403,8 +403,8 @@ describe('Global Callback', () => {
added: {
id: 234,
workflow: { id: '~user/foo', reloaded: true },
- taskProxies: { id: '~user/foo//2/b' }
- }
+ taskProxies: { id: '~user/foo//2/b' },
+ },
}
callback.before(delta2, store, errors)
callback.onUpdated(delta2.added, store, errors)
diff --git a/tests/unit/store/user.spec.js b/tests/unit/store/user.spec.js
index 597166b44..2046a505b 100644
--- a/tests/unit/store/user.spec.js
+++ b/tests/unit/store/user.spec.js
@@ -37,7 +37,7 @@ describe('user', () => {
it('should set user', () => {
const user = {
id: 1,
- username: 'cylc'
+ username: 'cylc',
}
store.commit('user/SET_USER', user)
expect(store.state.user.user).to.deep.equal(user)
diff --git a/tests/unit/store/workflows.spec.js b/tests/unit/store/workflows.spec.js
index 97adadc74..6e2fc61b1 100644
--- a/tests/unit/store/workflows.spec.js
+++ b/tests/unit/store/workflows.spec.js
@@ -73,11 +73,11 @@ describe('cylc tree', () => {
b: {
c: {
d: {
- '01': {}
- }
- }
- }
- }
+ '01': {},
+ },
+ },
+ },
+ },
})
// CLEAR should wipe the store
@@ -98,18 +98,18 @@ describe('cylc tree', () => {
b: {
c: {
d: {
- '01': {}
- }
- }
- }
- }
+ '01': {},
+ },
+ },
+ },
+ },
})
expect(getIndex()).to.deep.equal([
'~a',
'~a/b',
'~a/b//c',
'~a/b//c/d',
- '~a/b//c/d/01'
+ '~a/b//c/d/01',
])
// add another job for the same task
@@ -121,10 +121,10 @@ describe('cylc tree', () => {
d: {
'01': {},
'02': {},
- }
- }
- }
- }
+ },
+ },
+ },
+ },
})
expect(getIndex()).to.deep.equal([
'~a',
@@ -132,7 +132,7 @@ describe('cylc tree', () => {
'~a/b//c',
'~a/b//c/d',
'~a/b//c/d/01',
- '~a/b//c/d/02'
+ '~a/b//c/d/02',
])
// add another cycle for the same workflow
@@ -144,11 +144,11 @@ describe('cylc tree', () => {
d: {
'01': {},
'02': {},
- }
+ },
},
- g: {}
- }
- }
+ g: {},
+ },
+ },
})
expect(getIndex()).to.deep.equal([
'~a',
@@ -157,7 +157,7 @@ describe('cylc tree', () => {
'~a/b//c/d',
'~a/b//c/d/01',
'~a/b//c/d/02',
- '~a/b//g'
+ '~a/b//g',
])
})
@@ -186,14 +186,14 @@ describe('cylc tree', () => {
expectedTree: {
a: {
b: {
- g: {}
- }
- }
+ g: {},
+ },
+ },
},
expectedIndex: [
'~a',
'~a/b',
- '~a/b//g'
+ '~a/b//g',
],
},
{
@@ -202,14 +202,14 @@ describe('cylc tree', () => {
expectedTree: {
a: {
b: {
- g: {}
- }
- }
+ g: {},
+ },
+ },
},
expectedIndex: [
'~a',
'~a/b',
- '~a/b//g'
+ '~a/b//g',
],
},
{
@@ -220,12 +220,12 @@ describe('cylc tree', () => {
b: {
c: {
d: {
- '02': {}
- }
+ '02': {},
+ },
},
- g: {}
- }
- }
+ g: {},
+ },
+ },
},
expectedIndex: [
'~a',
@@ -233,7 +233,7 @@ describe('cylc tree', () => {
'~a/b//c',
'~a/b//c/d',
'~a/b//c/d/02',
- '~a/b//g'
+ '~a/b//g',
],
},
])('removes a $type from the tree', ({ id, expectedTree, expectedIndex }) => {
@@ -257,11 +257,11 @@ describe('cylc tree', () => {
d: {
'01': {},
'02': {},
- }
+ },
},
- g: {}
- }
- }
+ g: {},
+ },
+ },
})
expect(getIndex()).to.deep.equal([
'~a',
@@ -270,7 +270,7 @@ describe('cylc tree', () => {
'~a/b//c/d',
'~a/b//c/d/01',
'~a/b//c/d/02',
- '~a/b//g'
+ '~a/b//g',
])
store.commit('workflows/REMOVE', id)
@@ -317,13 +317,13 @@ describe('cylc tree', () => {
{
id: '~a',
foo: 1,
- bar: 2
+ bar: 2,
}
)
expect(getNode('~a').node).to.deep.equal({
id: '~a',
foo: 1,
- bar: 2
+ bar: 2,
})
// update a node
@@ -332,14 +332,14 @@ describe('cylc tree', () => {
{
id: '~a',
bar: 3, // update
- baz: 4 // add
+ baz: 4, // add
}
)
expect(getNode('~a').node).to.deep.equal({
id: '~a',
foo: 1, // old (not updated)
bar: 3, // new (updated)
- baz: 4 // new (added)
+ baz: 4, // new (added)
})
})
@@ -428,7 +428,7 @@ describe('cylc tree', () => {
expect(_tree.children.map(n => n.id)).to.deep.equal([
'~a',
'~b',
- '~c'
+ '~c',
])
// insert workflows
@@ -439,7 +439,7 @@ describe('cylc tree', () => {
expect(user.children.map(n => n.id)).to.deep.equal([
'~a/a1x',
'~a/a5x',
- '~a/a10x'
+ '~a/a10x',
])
// insert cycles
@@ -450,7 +450,7 @@ describe('cylc tree', () => {
expect(workflow.children.map(n => n.id)).to.deep.equal([
'~a/a1x//20T0',
'~a/a1x//10T0',
- '~a/a1x//5T0'
+ '~a/a1x//5T0',
])
// insert tasks
@@ -461,7 +461,7 @@ describe('cylc tree', () => {
expect(cycle.children.map(n => n.id)).to.deep.equal([
'~a/a1x//5T0/f1d',
'~a/a1x//5T0/f5d',
- '~a/a1x//5T0/f10d'
+ '~a/a1x//5T0/f10d',
])
// insert jobs
@@ -472,7 +472,7 @@ describe('cylc tree', () => {
expect(task.children.map(n => n.id)).to.deep.equal([
'~a/a1x//5T0/f1d/03',
'~a/a1x//5T0/f1d/02',
- '~a/a1x//5T0/f1d/01'
+ '~a/a1x//5T0/f1d/01',
])
// insert edges
@@ -483,7 +483,7 @@ describe('cylc tree', () => {
expect(workflow.$edges.map(n => n.id)).to.deep.equal([
'~a/a1x//$edge|1/a|2/a',
'~a/a1x//$edge|1/b|2/b',
- '~a/a1x//$edge|1/c|2/c'
+ '~a/a1x//$edge|1/c|2/c',
])
// insert namespaces
@@ -494,7 +494,7 @@ describe('cylc tree', () => {
expect(workflow.$namespaces.map(n => n.id)).to.deep.equal([
'~a/a1x//$namespace|a',
'~a/a1x//$namespace|b',
- '~a/a1x//$namespace|c'
+ '~a/a1x//$namespace|c',
])
})
@@ -509,9 +509,9 @@ describe('cylc tree', () => {
name: 'PENGUIN',
ancestors: [
{ name: 'ANIMAL' },
- { name: 'root' }
+ { name: 'root' },
],
- __typename: 'FamilyProxy'
+ __typename: 'FamilyProxy',
}
)
@@ -583,8 +583,8 @@ describe('cylc tree', () => {
childTasks: [
{ id: '~u/w//1/adelie' },
{ id: '~u/w//1/gentoo' },
- { id: '~u/w//1/jeffes' }
- ]
+ { id: '~u/w//1/jeffes' },
+ ],
}
)
store.commit(
@@ -592,8 +592,8 @@ describe('cylc tree', () => {
{
id: '~u/w//1/ANIMAL',
childTasks: [
- { id: '~u/w//1/great-auk' }
- ]
+ { id: '~u/w//1/great-auk' },
+ ],
}
)
@@ -604,12 +604,12 @@ describe('cylc tree', () => {
expect(animal.children.map(node => node.id)).to.deep.equal([
// NOTE: families should sort before tasks
'~u/w//1/PENGUIN',
- '~u/w//1/great-auk'
+ '~u/w//1/great-auk',
])
expect(penguin.children.map(node => node.id)).to.deep.equal([
'~u/w//1/adelie',
'~u/w//1/gentoo',
- '~u/w//1/jeffes'
+ '~u/w//1/jeffes',
])
// test removing task (1/adelie)
@@ -619,7 +619,7 @@ describe('cylc tree', () => {
expect(cycle.children.length).to.equal(3)
expect(penguin.children.map(node => node.id)).to.deep.equal([
'~u/w//1/gentoo',
- '~u/w//1/jeffes'
+ '~u/w//1/jeffes',
])
})
@@ -638,12 +638,12 @@ describe('cylc tree', () => {
childTasks: [
{ id: '~u/w//1/adelie' },
{ id: '~u/w//1/gentoo' },
- { id: '~u/w//1/jeffes' }
+ { id: '~u/w//1/jeffes' },
],
ancestors: [
- { name: 'root' }
+ { name: 'root' },
],
- __typename: 'FamilyProxy'
+ __typename: 'FamilyProxy',
}
)
// remove a family
@@ -652,7 +652,7 @@ describe('cylc tree', () => {
// the family tree should be destroyed...
expect(cycle.familyTree.map(node => node.id)).to.deep.equal([
- '~u/w//1/root'
+ '~u/w//1/root',
])
expect(cycle.familyTree[0].children.map(node => node.id)).to.deep.equal([])
@@ -661,7 +661,7 @@ describe('cylc tree', () => {
'~u/w//1/adelie',
'~u/w//1/gentoo',
'~u/w//1/great-auk',
- '~u/w//1/jeffes'
+ '~u/w//1/jeffes',
])
})
@@ -678,14 +678,14 @@ describe('cylc tree', () => {
{
id: '~u/w//1/root',
ancestors: [],
- __typename: 'FamilyProxy'
+ __typename: 'FamilyProxy',
}
)
const cycle = store.state.workflows.cylcTree.$index['~u/w//1']
expect(cycle.children.length).to.equal(0)
expect(cycle.familyTree.map(c => c.id)).to.deep.equal([
- '~u/w//1/root'
+ '~u/w//1/root',
])
})
@@ -698,28 +698,28 @@ describe('cylc tree', () => {
store.commit(
'workflows/UPDATE',
{
- id: '~u/a/b/c'
+ id: '~u/a/b/c',
}
)
store.commit(
'workflows/UPDATE',
{
- id: '~u/a/b/c//1/x'
+ id: '~u/a/b/c//1/x',
}
)
const user = store.state.workflows.cylcTree.$index['~u']
expect(user.children.map(c => c.id)).to.deep.equal([
- '~u/a'
+ '~u/a',
])
const workflowA = user.children[0]
expect(workflowA.children.map(c => c.id)).to.deep.equal([
- '~u/a/b'
+ '~u/a/b',
])
const workflowB = workflowA.children[0]
expect(workflowB.children.map(c => c.id)).to.deep.equal([
- '~u/a/b/c'
+ '~u/a/b/c',
])
})
})
diff --git a/tests/unit/utils/aotf.spec.js b/tests/unit/utils/aotf.spec.js
index 0554cff32..96424b438 100644
--- a/tests/unit/utils/aotf.spec.js
+++ b/tests/unit/utils/aotf.spec.js
@@ -69,7 +69,7 @@ describe('aotf (Api On The Fly)', () => {
const input = {
name: 'fooBar',
description: 'Short description.\n\nLong\ndescription.\nValid for: stopped, paused workflows.',
- args: []
+ args: [],
}
const output = {
...input,
@@ -77,7 +77,7 @@ describe('aotf (Api On The Fly)', () => {
_icon: aotf.getMutationIcon(),
_shortDescription: 'Short description.',
_help: 'Long\ndescription.\nValid for: stopped, paused workflows.',
- _validStates: ['stopped', 'paused']
+ _validStates: ['stopped', 'paused'],
}
aotf.processMutations([input], null)
expect(input).to.deep.equal(output)
@@ -92,9 +92,9 @@ describe('aotf (Api On The Fly)', () => {
name: 'fooBar',
kind: 'Whatever',
ofType: 'Whatever',
- defaultValue: '42'
- }
- ]
+ defaultValue: '42',
+ },
+ ],
}
const output = {
args: [
@@ -105,9 +105,9 @@ describe('aotf (Api On The Fly)', () => {
_cylcType: null,
_multiple: false,
_required: false,
- _default: 42
- }
- ]
+ _default: 42,
+ },
+ ],
}
aotf.processArguments(input, [])
expect(input).to.deep.equal(output)
@@ -129,13 +129,13 @@ describe('aotf (Api On The Fly)', () => {
name: 'WorkflowID',
type: {
name: 'SCALAR',
- ofType: null
- }
- }
- }
- }
- }
- ]
+ ofType: null,
+ },
+ },
+ },
+ },
+ },
+ ],
}
const output = {
args: [
@@ -146,9 +146,9 @@ describe('aotf (Api On The Fly)', () => {
_cylcType: 'WorkflowID',
_multiple: true, // because of the LIST
_required: true, // because of the NON_NULL
- _default: ['a']
- }
- ]
+ _default: ['a'],
+ },
+ ],
}
aotf.processArguments(input, [])
expect(input).to.deep.equal(output)
@@ -165,14 +165,14 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'arg1',
_cylcObject: aotf.cylcObjects.Workflow,
- _required: true
+ _required: true,
},
{
name: 'arg2',
_cylcObject: aotf.cylcObjects.User,
- _required: false
- }
- ]
+ _required: false,
+ },
+ ],
},
{
// mutation that operates on users
@@ -181,9 +181,9 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'arg1',
_cylcObject: aotf.cylcObjects.User,
- _required: false
- }
- ]
+ _required: false,
+ },
+ ],
},
{
// mutation that operates on workflows but requires additional info
@@ -192,15 +192,15 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'arg1',
_cylcObject: aotf.cylcObjects.Workflow,
- _required: true
+ _required: true,
},
{
name: 'arg2',
_cylcObject: null,
- _required: true
- }
- ]
- }
+ _required: true,
+ },
+ ],
+ },
]
const tokens = aotf.tokenise('~a/b//c/d')
const permissions = []
@@ -229,7 +229,7 @@ describe('aotf (Api On The Fly)', () => {
all.map((item) => [item.mutation.name, item.requiresInfo]).sort()
).to.deep.equal([
['baz', true],
- ['foo', false]
+ ['foo', false],
])
})
@@ -243,14 +243,14 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'arg1',
_cylcObject: aotf.cylcObjects.Workflow,
- _required: true
+ _required: true,
},
{
name: 'arg2',
_cylcObject: null,
- _required: false
- }
- ]
+ _required: false,
+ },
+ ],
},
{
// second argument is required -> info is required
@@ -259,14 +259,14 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'arg1',
_cylcObject: aotf.cylcObjects.Workflow,
- _required: true
+ _required: true,
},
{
name: 'arg2',
_cylcObject: null,
- _required: true
- }
- ]
+ _required: true,
+ },
+ ],
},
{
// second argument is required -> info is required unless
@@ -276,15 +276,15 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'arg1',
_cylcObject: aotf.cylcObjects.Workflow,
- _required: true
+ _required: true,
},
{
name: 'arg2',
_cylcObject: aotf.cylcObjects.CyclePoint,
- _required: true
- }
- ]
- }
+ _required: true,
+ },
+ ],
+ },
]
const permissions = []
@@ -300,7 +300,7 @@ describe('aotf (Api On The Fly)', () => {
).to.deep.equal([
['argon', false],
['boron', true],
- ['carbon', true] // no cycle point in the context -> info required
+ ['carbon', true], // no cycle point in the context -> info required
])
// filter mutations from the context of a cycle point
@@ -315,7 +315,7 @@ describe('aotf (Api On The Fly)', () => {
).to.deep.equal([
['argon', false],
['boron', true],
- ['carbon', false] // cycle point in the context -> no info is required
+ ['carbon', false], // cycle point in the context -> no info is required
])
})
@@ -323,12 +323,12 @@ describe('aotf (Api On The Fly)', () => {
const args = [{
name: 'arg1',
_cylcObject: aotf.cylcObjects.Workflow,
- _required: true
+ _required: true,
}]
const mutations = [
{ name: 'argon', args },
{ name: 'boron', args },
- { name: 'carbon', args }
+ { name: 'carbon', args },
]
const permissions = ['carbon', 'argon']
@@ -342,7 +342,7 @@ describe('aotf (Api On The Fly)', () => {
).to.deep.equal([
['argon', true],
['boron', false],
- ['carbon', true]
+ ['carbon', true],
])
})
})
@@ -352,20 +352,20 @@ describe('aotf (Api On The Fly)', () => {
const nodes = [
{
name: null,
- kind: 'NON_NULL'
+ kind: 'NON_NULL',
},
{
name: null,
- kind: 'LIST'
+ kind: 'LIST',
},
{
name: null,
- kind: 'NON_NULL'
+ kind: 'NON_NULL',
},
{
name: 'MyInputObject',
- kind: 'INPUT_OBJECT'
- }
+ kind: 'INPUT_OBJECT',
+ },
]
// chain these nodes together using the ofType field
@@ -394,10 +394,10 @@ describe('aotf (Api On The Fly)', () => {
[ // String => null
{
type: 'String',
- kind: 'SCALAR'
+ kind: 'SCALAR',
},
[],
- null
+ null,
],
[ // NON_NULL => null
{
@@ -405,11 +405,11 @@ describe('aotf (Api On The Fly)', () => {
kind: 'NON_NULL',
ofType: {
type: 'String',
- kind: 'SCALAR'
- }
+ kind: 'SCALAR',
+ },
},
[],
- null
+ null,
],
[ // LIST => []
{
@@ -417,11 +417,11 @@ describe('aotf (Api On The Fly)', () => {
kind: 'LIST',
ofType: {
type: 'String',
- kind: 'SCALAR'
- }
+ kind: 'SCALAR',
+ },
},
[],
- []
+ [],
],
[ // LIST> => [[]]
{
@@ -432,12 +432,12 @@ describe('aotf (Api On The Fly)', () => {
kind: 'LIST',
ofType: {
type: 'String',
- kind: 'SCALAR'
- }
- }
+ kind: 'SCALAR',
+ },
+ },
},
[],
- [[]]
+ [[]],
],
[ // NON_NULL> => []
{
@@ -448,17 +448,17 @@ describe('aotf (Api On The Fly)', () => {
kind: 'LIST',
ofType: {
type: 'String',
- kind: 'SCALAR'
- }
- }
+ kind: 'SCALAR',
+ },
+ },
},
[],
- []
+ [],
],
[ // OBJECT { A } => { foo: null, bar: null }
{
kind: 'OBJECT',
- name: 'A'
+ name: 'A',
},
[
{
@@ -466,12 +466,12 @@ describe('aotf (Api On The Fly)', () => {
kind: 'OBJECT',
fields: [
{ name: 'foo', type: 'String' },
- { name: 'bar', type: 'String' }
- ]
- }
+ { name: 'bar', type: 'String' },
+ ],
+ },
],
- { foo: null, bar: null }
- ]
+ { foo: null, bar: null },
+ ],
].forEach(([type, types, expected]) => {
expect(
aotf.getNullValue(type, types)
@@ -486,17 +486,17 @@ describe('aotf (Api On The Fly)', () => {
// [type, signature]
[
{
- kind: 'TEST_TYPE'
+ kind: 'TEST_TYPE',
},
- 'TEST_TYPE'
+ 'TEST_TYPE',
],
[
{
name: 'String',
kind: 'SCALAR',
- ofType: null
+ ofType: null,
},
- 'String'
+ 'String',
],
[
{
@@ -505,10 +505,10 @@ describe('aotf (Api On The Fly)', () => {
ofType: {
name: 'String',
kind: 'SCALAR',
- ofType: null
- }
+ ofType: null,
+ },
},
- 'String!'
+ 'String!',
],
[
{
@@ -523,18 +523,18 @@ describe('aotf (Api On The Fly)', () => {
ofType: {
name: 'String',
kind: 'SCALAR',
- ofType: null
- }
- }
- }
+ ofType: null,
+ },
+ },
+ },
},
- '[String!]!'
- ]
+ '[String!]!',
+ ],
].forEach(([type, signature]) => {
expect(
aotf.argumentSignature({
name: 'myArgument',
- type
+ type,
})
).to.equal(signature)
})
@@ -551,18 +551,18 @@ describe('aotf (Api On The Fly)', () => {
type: {
name: 'String',
kind: 'SCALAR',
- ofType: null
- }
+ ofType: null,
+ },
},
{
name: 'bar',
type: {
name: 'Int',
kind: 'SCALAR',
- ofType: null
- }
- }
- ]
+ ofType: null,
+ },
+ },
+ ],
}
expect(aotf.constructMutation(mutation)).to.equal(dedent`
mutation MyMutation($foo: String, $bar: Int) {
@@ -588,12 +588,12 @@ describe('aotf (Api On The Fly)', () => {
ofType: {
name: 'String',
kind: 'SCALAR',
- ofType: null
- }
- }
- }
- }
- ]
+ ofType: null,
+ },
+ },
+ },
+ },
+ ],
}
expect(aotf.constructMutation(mutation)).to.equal(dedent`
mutation MyMutation($myArg: [String]!) {
@@ -606,7 +606,7 @@ describe('aotf (Api On The Fly)', () => {
it('handles mutation objects with no arguments', () => {
const mutation = {
name: 'MyMutation',
- args: []
+ args: [],
}
expect(aotf.constructMutation(mutation)).to.equal(dedent`
mutation MyMutation {
@@ -628,23 +628,23 @@ describe('aotf (Api On The Fly)', () => {
_cylcType: 'WorkflowID',
_cylcObject: aotf.cylcObjects.Workflow,
_multiple: true,
- _default: null
+ _default: null,
},
{
name: 'arg2',
_cylcType: null,
_cylcObject: null,
_multiple: false,
- _default: 42
- }
- ]
+ _default: 42,
+ },
+ ],
}
const tokens = aotf.tokenise('~a/b')
expect(
aotf.getMutationArgsFromTokens(mutation, tokens)
).to.deep.equal({
arg1: ['~a/b'],
- arg2: 42
+ arg2: 42,
})
})
})
@@ -661,25 +661,25 @@ describe('aotf (Api On The Fly)', () => {
{ name: 'age', type: { name: 'Integer' } },
{ name: 'height', type: { name: 'Integer' } },
{ name: 'width', type: { name: 'Integer' } },
- { name: 'criminalAllegations', type: { name: 'CriminalAllegations' } }
- ]
+ { name: 'criminalAllegations', type: { name: 'CriminalAllegations' } },
+ ],
},
{ name: 'Integer' },
{
name: 'CriminalAllegations',
fields: [
{ name: 'date', type: { name: 'Date' } },
- { name: 'location', type: { name: 'Location' } }
- ]
+ { name: 'location', type: { name: 'Location' } },
+ ],
},
{ name: 'Date' },
{
name: 'Location',
fields: [
- { name: 'coordinates', type: { name: 'Coordinates' } }
- ]
+ { name: 'coordinates', type: { name: 'Coordinates' } },
+ ],
},
- { name: 'Coordinates' }
+ { name: 'Coordinates' },
]
personType = types.find(({ name }) => name === 'Person')
})
@@ -698,11 +698,11 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'location',
fields: [
- { name: 'coordinates', fields: null }
- ]
- }
- ]
- }
+ { name: 'coordinates', fields: null },
+ ],
+ },
+ ],
+ },
])
})
@@ -714,9 +714,9 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'criminalAllegations',
fields: [
- { name: 'location' }
- ]
- }
+ { name: 'location' },
+ ],
+ },
],
types
)
@@ -727,11 +727,11 @@ describe('aotf (Api On The Fly)', () => {
{
name: 'location',
fields: [
- { name: 'coordinates', fields: null }
- ]
- }
- ]
- }
+ { name: 'coordinates', fields: null },
+ ],
+ },
+ ],
+ },
])
})
@@ -741,13 +741,13 @@ describe('aotf (Api On The Fly)', () => {
personType,
[
{ name: 'width' },
- { name: 'height' }
+ { name: 'height' },
],
types
)
).to.deep.equal([
{ name: 'width', fields: null },
- { name: 'height', fields: null }
+ { name: 'height', fields: null },
])
})
})
diff --git a/tests/unit/utils/font-size.spec.js b/tests/unit/utils/font-size.spec.js
index 4c01b4dcd..29b5c1dd2 100644
--- a/tests/unit/utils/font-size.spec.js
+++ b/tests/unit/utils/font-size.spec.js
@@ -16,7 +16,7 @@
*/
import {
- decreaseFontSize, getCurrentFontSize, increaseFontSize, INCREMENT, resetFontSize
+ decreaseFontSize, getCurrentFontSize, increaseFontSize, INCREMENT, resetFontSize,
} from '@/utils/font-size'
describe('Font Size', () => {
diff --git a/tests/unit/utils/graph-utils.spec.js b/tests/unit/utils/graph-utils.spec.js
index 4cc556ab6..54e10cd6e 100644
--- a/tests/unit/utils/graph-utils.spec.js
+++ b/tests/unit/utils/graph-utils.spec.js
@@ -17,7 +17,7 @@
import {
posToPath,
- nonCryptoHash
+ nonCryptoHash,
} from '@/utils/graph-utils'
describe('Graph functionality', () => {
diff --git a/tests/unit/utils/graphql.spec.js b/tests/unit/utils/graphql.spec.js
index e965b0a74..fbe00371f 100644
--- a/tests/unit/utils/graphql.spec.js
+++ b/tests/unit/utils/graphql.spec.js
@@ -41,7 +41,7 @@ describe('utils', () => {
'ws://localhost:12345',
{
reconnect: false,
- lazy: true
+ lazy: true,
},
{})
expect(typeof subscriptionClient.request).to.equal('function')
@@ -51,7 +51,7 @@ describe('utils', () => {
'ws://localhost:12345',
{
reconnect: false,
- lazy: true
+ lazy: true,
},
{})
expect(store.state.offline).to.equal(false)
@@ -60,24 +60,24 @@ describe('utils', () => {
for ({ eventName, expectedOffline } of [
{
eventName: 'connecting',
- expectedOffline: true
+ expectedOffline: true,
},
{
eventName: 'connected',
- expectedOffline: false
+ expectedOffline: false,
},
{
eventName: 'reconnecting',
- expectedOffline: true
+ expectedOffline: true,
},
{
eventName: 'reconnected',
- expectedOffline: false
+ expectedOffline: false,
},
{
eventName: 'disconnected',
- expectedOffline: true
- }
+ expectedOffline: true,
+ },
]) {
subscriptionClient.eventEmitter.emit(eventName)
expect(store.state.offline).to.equal(expectedOffline)
diff --git a/tests/unit/utils/initialOptions.spec.js b/tests/unit/utils/initialOptions.spec.js
index c0446f97e..2ddb36a5d 100644
--- a/tests/unit/utils/initialOptions.spec.js
+++ b/tests/unit/utils/initialOptions.spec.js
@@ -19,7 +19,7 @@ import { nextTick } from 'vue'
import { vi } from 'vitest'
import {
updateInitialOptionsEvent,
- useInitialOptions
+ useInitialOptions,
} from '@/utils/initialOptions'
describe('useInitialOptions', () => {
@@ -52,7 +52,7 @@ describe('useInitialOptions', () => {
it('uses the default value when the property is not in initialOptions', () => {
const ctx = {
props: {
- initialOptions: { ship: 'In Amber Clad' }
+ initialOptions: { ship: 'In Amber Clad' },
},
emit () {},
}
diff --git a/tests/unit/utils/tasks.spec.js b/tests/unit/utils/tasks.spec.js
index 700c65095..f499ea6c2 100644
--- a/tests/unit/utils/tasks.spec.js
+++ b/tests/unit/utils/tasks.spec.js
@@ -38,7 +38,7 @@ describe('tasks', () => {
[TaskState.WAITING].map((state) => state.name)],
[
TaskState.RUNNING.name,
- [TaskState.SUBMITTED, TaskState.RUNNING].map((state) => state.name)]
+ [TaskState.SUBMITTED, TaskState.RUNNING].map((state) => state.name)],
].forEach((val) => {
const groupState = extractGroupState(val[1], false)
expect(groupState).to.equal(val[0])
@@ -55,7 +55,7 @@ describe('tasks', () => {
[TaskState.SUCCEEDED].map((state) => state.name)],
[
TaskState.RUNNING.name,
- [TaskState.SUBMITTED, TaskState.RUNNING, TaskState.EXPIRED].map((state) => state.name)]
+ [TaskState.SUBMITTED, TaskState.RUNNING, TaskState.EXPIRED].map((state) => state.name)],
].forEach((val) => {
const groupState = extractGroupState(val[1], true)
expect(groupState).to.equal(val[0])
@@ -70,27 +70,27 @@ describe('tasks', () => {
describe.each([
{
taskProxy: null,
- expected: undefined
+ expected: undefined,
},
{
taskProxy: {},
- expected: undefined
+ expected: undefined,
},
{
taskProxy: {
- children: []
+ children: [],
},
- expected: undefined
+ expected: undefined,
},
{
taskProxy: {
children: [
{ node: 'foo' },
{ node: 'bar' },
- ]
+ ],
},
- expected: 'foo'
- }
+ expected: 'foo',
+ },
])('latestJob($taskProxy)', ({ taskProxy, expected }) => {
it(`returns ${expected}`, () => {
expect(latestJob(taskProxy)).to.equal(expected)
@@ -102,56 +102,56 @@ describe('tasks', () => {
const tests = [
{
taskNode: { node: null },
- expected: undefined
+ expected: undefined,
},
{
taskNode: {
task: {
- meanElapsedTime: 0
- }
+ meanElapsedTime: 0,
+ },
},
- expected: undefined
+ expected: undefined,
},
{
taskNode: {
node: {
task: {
- meanElapsedTime: 84
- }
- }
+ meanElapsedTime: 84,
+ },
+ },
},
- expected: '00:01:24'
+ expected: '00:01:24',
},
{
taskNode: {
node: {
task: {
- meanElapsedTime: 42
- }
- }
+ meanElapsedTime: 42,
+ },
+ },
},
- expected: '00:00:42'
+ expected: '00:00:42',
},
{
taskNode: {
node: {
task: {
- meanElapsedTime: 4242
- }
- }
+ meanElapsedTime: 4242,
+ },
+ },
},
- expected: '01:10:42'
+ expected: '01:10:42',
},
{
taskNode: {
node: {
task: {
- meanElapsedTime: 1426332
- }
- }
+ meanElapsedTime: 1426332,
+ },
+ },
},
- expected: '16d 12:12:12'
- }
+ expected: '16d 12:12:12',
+ },
]
tests.forEach(test => {
expect(dtMean(test.taskNode)).to.equal(test.expected)
@@ -194,9 +194,9 @@ describe('tasks', () => {
outputs: [{
label: 'my-output',
message: 'chilbolton',
- }]
- }
- }
+ }],
+ },
+ },
}
expect(jobMessageOutputs(jobNode)).toEqual([
diff --git a/tests/unit/utils/toolbar.spec.js b/tests/unit/utils/toolbar.spec.js
index 203dba151..d9dcf6b2c 100644
--- a/tests/unit/utils/toolbar.spec.js
+++ b/tests/unit/utils/toolbar.spec.js
@@ -29,7 +29,7 @@ import { useDrawer, useNavBtn } from '@/utils/toolbar'
const vuetify = (mobile) => createVuetify({
display: {
mobileBreakpoint: mobile ? 10e3 : 0,
- }
+ },
})
describe('Toolbar/drawer utils', () => {
@@ -56,7 +56,7 @@ describe('Toolbar/drawer utils', () => {
},
{
global: {
- plugins: [vuetify(mobile)]
+ plugins: [vuetify(mobile)],
},
}
)
@@ -72,12 +72,12 @@ describe('Toolbar/drawer utils', () => {
const { drawer, toggleDrawer } = useDrawer()
return { drawer, toggleDrawer }
},
- render () {}
+ render () {},
},
{
global: {
- plugins: [vuetify]
- }
+ plugins: [vuetify],
+ },
}
)
diff --git a/tests/unit/utils/uid.spec.js b/tests/unit/utils/uid.spec.js
index 60cc9904d..ce62525cc 100644
--- a/tests/unit/utils/uid.spec.js
+++ b/tests/unit/utils/uid.spec.js
@@ -33,7 +33,7 @@ describe('Universal ID (UID)', () => {
workflowID: '~user/workflow',
relativeID: 'cycle/task/01',
namespace: undefined,
- edge: undefined
+ edge: undefined,
})
// workflow ID fragment
@@ -49,7 +49,7 @@ describe('Universal ID (UID)', () => {
workflowID: '~user',
relativeID: '',
namespace: undefined,
- edge: undefined
+ edge: undefined,
})
// relative ID fragment
@@ -65,7 +65,7 @@ describe('Universal ID (UID)', () => {
workflowID: '',
relativeID: 'cycle',
namespace: undefined,
- edge: undefined
+ edge: undefined,
})
})
@@ -83,7 +83,7 @@ describe('Universal ID (UID)', () => {
workflowID: '',
relativeID: '',
namespace: 'foo',
- edge: undefined
+ edge: undefined,
})
// edges
@@ -99,7 +99,7 @@ describe('Universal ID (UID)', () => {
workflowID: '',
relativeID: '',
namespace: undefined,
- edge: [new Tokens('1/a', true), new Tokens('1/b', true)]
+ edge: [new Tokens('1/a', true), new Tokens('1/b', true)],
})
})
@@ -130,7 +130,7 @@ describe('Universal ID (UID)', () => {
workflowID: 'w',
relativeID: 'c',
namespace: undefined,
- edge: undefined
+ edge: undefined,
})
// "b" should be updated
@@ -146,7 +146,7 @@ describe('Universal ID (UID)', () => {
workflowID: 'x',
relativeID: 'c/t',
namespace: undefined,
- edge: undefined
+ edge: undefined,
})
// should be able to wipe tokens using "undefined"
@@ -168,7 +168,7 @@ describe('Universal ID (UID)', () => {
workflowID: 'w',
relativeID: 'd/t',
namespace: undefined,
- edge: undefined
+ edge: undefined,
})
})
@@ -212,7 +212,7 @@ describe('Universal ID (UID)', () => {
['a', new Tokens('~u/a')],
['b', new Tokens('~u/a/b')],
['c', new Tokens('~u/a/b/c')],
- ['d', new Tokens('~u/a/b/c/d')]
+ ['d', new Tokens('~u/a/b/c/d')],
])
})
@@ -252,38 +252,38 @@ describe('Universal ID (UID)', () => {
[
'user',
'u',
- new Tokens('~u')
+ new Tokens('~u'),
],
[
'workflow-part',
'w1',
- new Tokens('~u/w1')
+ new Tokens('~u/w1'),
],
[
'workflow-part',
'w2',
- new Tokens('~u/w1/w2')
+ new Tokens('~u/w1/w2'),
],
[
'workflow',
'w3',
- new Tokens('~u/w1/w2/w3')
+ new Tokens('~u/w1/w2/w3'),
],
[
'cycle',
'c',
- new Tokens('~u/w1/w2/w3//c')
+ new Tokens('~u/w1/w2/w3//c'),
],
[
'task',
't',
- new Tokens('~u/w1/w2/w3//c/t')
+ new Tokens('~u/w1/w2/w3//c/t'),
],
[
'job',
'01',
- new Tokens('~u/w1/w2/w3//c/t/01')
- ]
+ new Tokens('~u/w1/w2/w3//c/t/01'),
+ ],
])
expect(
@@ -292,18 +292,18 @@ describe('Universal ID (UID)', () => {
[
'user',
'u',
- new Tokens('~u')
+ new Tokens('~u'),
],
[
'workflow',
'w',
- new Tokens('~u/w')
+ new Tokens('~u/w'),
],
[
'cycle',
'c',
- new Tokens('~u/w//c')
- ]
+ new Tokens('~u/w//c'),
+ ],
])
expect(
@@ -312,8 +312,8 @@ describe('Universal ID (UID)', () => {
[
'user',
'u',
- new Tokens('~u')
- ]
+ new Tokens('~u'),
+ ],
])
})
diff --git a/tests/unit/utils/urls.spec.js b/tests/unit/utils/urls.spec.js
index 24ed512c5..05efbd067 100644
--- a/tests/unit/utils/urls.spec.js
+++ b/tests/unit/utils/urls.spec.js
@@ -24,7 +24,7 @@ describe('urls', () => {
const DEFAULT_LOCATION = {
protocol: PROTOCOL,
host: HOST,
- pathname: PATHNAME
+ pathname: PATHNAME,
}
it('should create new URLs', () => {
const tests = [
@@ -32,26 +32,26 @@ describe('urls', () => {
path: '',
websockets: false,
expected: `${PROTOCOL}//${HOST}/${PATHNAME}`,
- location: DEFAULT_LOCATION
+ location: DEFAULT_LOCATION,
},
{
path: '',
websockets: false,
baseOnly: true,
expected: `${PROTOCOL}//${HOST}/`,
- location: DEFAULT_LOCATION
+ location: DEFAULT_LOCATION,
},
{
path: 'subscriptions',
websockets: false,
expected: `${PROTOCOL}//${HOST}/${PATHNAME}subscriptions`,
- location: DEFAULT_LOCATION
+ location: DEFAULT_LOCATION,
},
{
path: 'subscriptions',
websockets: true,
expected: `wss://${HOST}/${PATHNAME}subscriptions`,
- location: DEFAULT_LOCATION
+ location: DEFAULT_LOCATION,
},
{
path: 'subscriptions',
@@ -60,45 +60,45 @@ describe('urls', () => {
location: {
protocol: 'http:',
host: HOST,
- pathname: PATHNAME
- }
+ pathname: PATHNAME,
+ },
},
{
path: '//subscriptions',
websockets: false,
expected: `${PROTOCOL}//${HOST}/${PATHNAME}subscriptions`,
- location: DEFAULT_LOCATION
+ location: DEFAULT_LOCATION,
},
{
path: '//graphql/endpoint//subscriptions',
websockets: false,
expected: `${PROTOCOL}//${HOST}/${PATHNAME}graphql/endpoint/subscriptions`,
- location: DEFAULT_LOCATION
+ location: DEFAULT_LOCATION,
},
{
path: '//graphql/endpoint//subscriptions///',
websockets: false,
expected: `${PROTOCOL}//${HOST}/${PATHNAME}graphql/endpoint/subscriptions/`,
- location: DEFAULT_LOCATION
+ location: DEFAULT_LOCATION,
},
{
path: ' ',
websockets: false,
expected: `${PROTOCOL}//${HOST}/${PATHNAME}`,
- location: DEFAULT_LOCATION
+ location: DEFAULT_LOCATION,
},
{
path: ' graphql/endpoint// ',
websockets: false,
expected: `${PROTOCOL}//${HOST}/${PATHNAME}graphql/endpoint/`,
- location: DEFAULT_LOCATION
- }
+ location: DEFAULT_LOCATION,
+ },
]
tests.forEach((test) => {
const originalWindow = global.window
try {
global.window = {
- location: test.location
+ location: test.location,
}
// || false just to prevent accidental undefined values
const url = createUrl(
diff --git a/tests/unit/views/gantt.vue.spec.js b/tests/unit/views/gantt.vue.spec.js
index 2a9c09c8d..f2bdb4401 100644
--- a/tests/unit/views/gantt.vue.spec.js
+++ b/tests/unit/views/gantt.vue.spec.js
@@ -17,7 +17,7 @@
import { GanttCallback } from '@/views/Gantt.vue'
import {
- matchTasks
+ matchTasks,
} from '@/components/cylc/gantt/filter'
const input = {
@@ -28,7 +28,7 @@ const input = {
startedTime: '2023-02-23T11:37:00Z',
finishedTime: '2023-02-23T11:37:05Z',
platform: 'localhost',
- __typename: 'UISJob'
+ __typename: 'UISJob',
},
{
name: 'b',
@@ -37,7 +37,7 @@ const input = {
startedTime: '2023-02-23T11:37:33Z',
finishedTime: '2023-02-23T11:37:35Z',
platform: 'vld684',
- __typename: 'UISJob'
+ __typename: 'UISJob',
},
{
name: 'b',
@@ -46,8 +46,8 @@ const input = {
startedTime: '2023-02-23T11:38:12Z',
finishedTime: '2023-02-23T11:38:13Z',
platform: 'vld684',
- __typename: 'UISJob'
- }]
+ __typename: 'UISJob',
+ }],
}
const expectedJobs = {
a: [{
@@ -66,7 +66,7 @@ const expectedJobs = {
name: 'b',
platform: 'vld684',
startedTime: '2023-02-23T11:37:33Z',
- submittedTime: '2023-02-23T11:37:29Z'
+ submittedTime: '2023-02-23T11:37:29Z',
},
{
__typename: 'UISJob',
@@ -75,8 +75,8 @@ const expectedJobs = {
name: 'b',
platform: 'vld684',
startedTime: '2023-02-23T11:38:12Z',
- submittedTime: '2023-02-23T11:38:07Z'
- }]
+ submittedTime: '2023-02-23T11:38:07Z',
+ }],
}
const filteredJobs = {
@@ -87,8 +87,8 @@ const filteredJobs = {
startedTime: '2023-02-23T11:37:00Z',
finishedTime: '2023-02-23T11:37:05Z',
platform: 'localhost',
- __typename: 'UISJob'
- }]
+ __typename: 'UISJob',
+ }],
}
describe('GanttCallback', () => {
diff --git a/tests/unit/views/log.vue.spec.js b/tests/unit/views/log.vue.spec.js
index b0bc59541..64cb016e4 100644
--- a/tests/unit/views/log.vue.spec.js
+++ b/tests/unit/views/log.vue.spec.js
@@ -45,7 +45,7 @@ describe('Log view', () => {
file: initialFile,
},
},
- ...options
+ ...options,
})
beforeEach(() => {
@@ -61,7 +61,7 @@ describe('Log view', () => {
logFiles: {
files: ['a.log', 'b.log'],
},
- }
+ },
}),
}
})
@@ -81,8 +81,8 @@ describe('Log view', () => {
jobs: [
// Query response only includes latest job
{ id: 'w//1/foo/02', state },
- ]
- }
+ ],
+ },
})
const wrapper = mountFunction()
wrapper.vm.jobLog = 1
diff --git a/tests/unit/views/table.vue.spec.js b/tests/unit/views/table.vue.spec.js
index 8314cc4ea..4f9d57b1e 100644
--- a/tests/unit/views/table.vue.spec.js
+++ b/tests/unit/views/table.vue.spec.js
@@ -61,9 +61,9 @@ const workflows = [
},
],
},
- ]
- }
- ]
+ ],
+ },
+ ],
},
]
@@ -81,7 +81,7 @@ describe('Table view', () => {
shallow: true,
global: {
plugins: [store],
- mocks: { $workflowService }
+ mocks: { $workflowService },
},
props: {
workflowName: 'one',
@@ -94,12 +94,12 @@ describe('Table view', () => {
{
task: { id: '~user/one//1/eventually_succeeded' },
latestJob: { id: '~user/one//1/eventually_succeeded/3' },
- previousJob: { id: '~user/one//1/eventually_succeeded/2' }
+ previousJob: { id: '~user/one//1/eventually_succeeded/2' },
},
{
task: { id: '~user/one//1/failed' },
latestJob: { id: '~user/one//1/failed/1' },
- }
+ },
])
})
@@ -110,7 +110,7 @@ describe('Table view', () => {
shallow: true,
global: {
plugins: [store],
- mocks: { $workflowService }
+ mocks: { $workflowService },
},
props: {
workflowName: 'one',
@@ -125,7 +125,7 @@ describe('Table view', () => {
it('should filter by ID', async () => {
wrapper.vm.tasksFilter = {
- id: 'taskA'
+ id: 'taskA',
}
await nextTick()
expect(wrapper.vm.filteredTasks.length).to.equal(1)
@@ -134,8 +134,8 @@ describe('Table view', () => {
it('should filter by task state', async () => {
wrapper.vm.tasksFilter = {
states: [
- TaskState.WAITING.name
- ]
+ TaskState.WAITING.name,
+ ],
}
await nextTick()
expect(wrapper.vm.filteredTasks.length).to.equal(1)
@@ -145,8 +145,8 @@ describe('Table view', () => {
wrapper.vm.tasksFilter = {
id: 'taskA',
states: [
- TaskState.WAITING.name
- ]
+ TaskState.WAITING.name,
+ ],
}
await nextTick()
expect(wrapper.vm.filteredTasks.length).to.equal(0)
diff --git a/tests/unit/views/tree.vue.spec.js b/tests/unit/views/tree.vue.spec.js
index a8bd5a38f..8fb160ec9 100644
--- a/tests/unit/views/tree.vue.spec.js
+++ b/tests/unit/views/tree.vue.spec.js
@@ -61,7 +61,7 @@ const workflowNode = {
...expandID('~user/workflow1//1/foo/1'),
type: 'job',
},
- ]
+ ],
},
{
...expandID('~user/workflow1//1/bar'),
@@ -88,13 +88,13 @@ describe('Tree view', () => {
global: {
plugins: [vuetify, CommandMenuPlugin, store],
mocks: {
- $workflowService
- }
+ $workflowService,
+ },
},
props: {
workflowName: 'workflow1',
},
- ...options
+ ...options,
})
})
@@ -102,7 +102,7 @@ describe('Tree view', () => {
it.each([
{},
{ id: null, states: null },
- { id: ' ', states: [] }
+ { id: ' ', states: [] },
])('has null filterState when filters are empty: %o', async (tasksFilter) => {
const wrapper = mountFunction()
expect(wrapper.vm.tasksFilter).toEqual({
diff --git a/vite.config.js b/vite.config.js
index 3cf6c5492..bd99de04c 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -32,7 +32,7 @@ export default defineConfig(({ mode }) => {
vue(),
vuetify(),
eslint({
- failOnError: mode === 'production'
+ failOnError: mode === 'production',
}),
// GraphiQL is a React app:
react(),
@@ -41,7 +41,7 @@ export default defineConfig(({ mode }) => {
if (mode !== 'production' && process.env.COVERAGE) {
plugins.push(
IstanbulPlugin({
- forceBuildInstrument: true
+ forceBuildInstrument: true,
})
)
}
@@ -62,7 +62,7 @@ export default defineConfig(({ mode }) => {
// GraphiQL is a React app (use Preact as it's smaller):
react: 'preact/compat',
'react-dom': 'preact/compat',
- }
+ },
},
plugins,
optimizeDeps: {
@@ -78,18 +78,18 @@ export default defineConfig(({ mode }) => {
proxy: {
'^/(userprofile|version|graphql)': {
target: devProxyTarget,
- changeOrigin: true
+ changeOrigin: true,
},
'^/subscriptions': {
target: devProxyTarget,
changeOrigin: true,
- ws: true
- }
+ ws: true,
+ },
},
watch: {
ignored: [
- path.resolve(__dirname, './coverage')
- ]
+ path.resolve(__dirname, './coverage'),
+ ],
},
warmup: {
clientFiles: [
@@ -97,8 +97,8 @@ export default defineConfig(({ mode }) => {
'./src/App.vue',
'./src/views/Dashboard.vue',
'./src/views/Workspace.vue',
- ]
- }
+ ],
+ },
},
build: {
sourcemap: mode !== 'production',
@@ -119,7 +119,7 @@ export default defineConfig(({ mode }) => {
},
define: {
// Allow vue devtools to work when runing vite build:
- __VUE_PROD_DEVTOOLS__: mode !== 'production'
+ __VUE_PROD_DEVTOOLS__: mode !== 'production',
},
// Unit test specific config:
test: {
@@ -137,12 +137,12 @@ export default defineConfig(({ mode }) => {
coverage: {
provider: 'istanbul',
include: [
- 'src/**'
+ 'src/**',
],
exclude: [
- 'src/services/mock/**'
+ 'src/services/mock/**',
],
- }
- }
+ },
+ },
}
})