Skip to content

Commit 2513af3

Browse files
committed
Fix e2e tests
1 parent 2383cfc commit 2513af3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/views/Dashboard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ export default {
241241
}
242242
},
243243
computed: {
244-
...mapState('workflows', ['workflows']),
244+
...mapState('workflows', ['lookup']),
245245
workflowsTable () {
246-
const count = Object.values(this.workflows)
246+
const count = Object.values(this.lookup)
247247
.map(workflow => workflow.status)
248248
.reduce((acc, state) => {
249249
acc[state] = (acc[state] || 0) + 1

src/views/WorkflowsTable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ export default {
132132
}
133133
}),
134134
computed: {
135-
...mapState('workflows', ['workflows']),
135+
...mapState('workflows', ['lookup']),
136136
workflowsTable () {
137-
return Object.values(this.workflows)
137+
return Object.values(this.lookup)
138138
}
139139
},
140140
methods: {

tests/e2e/specs/workflowservice.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('WorkflowService subscriptions', () => {
3030
expect(Object.keys(subscriptions).length).to.equal(1)
3131
})
3232
})
33-
it('-> Dashboard -> User Profile, should contain 1 subscription (GScan)', () => {
33+
it('-> Dashboard -> User Profile, should contain 1 subscription ("root" = GScan)', () => {
3434
cy.visit('/#/')
3535
cy.get('[href="#/user-profile"]').click({ force: true })
3636
cy.contains('h3', 'Your Profile')
@@ -39,30 +39,30 @@ describe('WorkflowService subscriptions', () => {
3939
expect(Object.keys(subscriptions).length).to.equal(1)
4040
})
4141
})
42-
it('-> Dashboard -> Workflows, should contain 2 subscriptions (GScan + Tree)', () => {
42+
it('-> Dashboard -> Workflows, should contain 2 subscriptions ("root" = GScan + Dashboard, and "workflow" = Tree)', () => {
4343
cy.visit('/#/')
4444
cy.get('[href="#/workflows/one"]').click({ force: true })
4545
// <div id='main'> is used by Lumino, and its initial tab contains the text tree
46-
cy.get('div#main').find('.c-tree')
46+
cy.get('div#main').find('.c-task')
4747
getSubscriptions().then(subscriptions => {
4848
// GScan subscription "root" and the subscription "workflow" used by the Tree view
4949
expect(Object.keys(subscriptions).length).to.equal(2)
5050
expect(subscriptions.root.observable.closed).to.equal(false)
5151
expect(subscriptions.workflow.observable.closed).to.equal(false)
5252
})
5353
})
54-
it('-> Dashboard -> Workflows -> Dashboard, should contain 2 subscriptions (GScan + Dashboard)', () => {
54+
it('-> Dashboard -> Workflows -> Dashboard, should contain 1 subscriptions ("root" = GScan + Dashboard)', () => {
5555
cy.visit('/#/')
56-
cy.get('[href="#/workflows/one"]').click()
56+
cy.get('[href="#/workflows/one"]').click({ force: true })
5757
// <div id='main'> is used by Lumino, and its initial tab contains the text tree
58-
cy.get('div#main').find('.c-tree')
58+
cy.get('div#main').find('.c-task')
5959
cy.get('[href="#/"]').click({ force: true })
6060
cy.get('div.c-dashboard')
6161
getSubscriptions().then(subscriptions => {
6262
expect(Object.keys(subscriptions).length).to.equal(1)
6363
})
6464
})
65-
it('-> Tree, should contain 2 subscriptions (GScan + Tree)', () => {
65+
it('-> Tree, should contain 2 subscriptions ("root" = GScan + Dashboard, and "workflow" = Tree)', () => {
6666
cy.visit('/#/tree/one')
6767
cy.get('.c-header').should('exist')
6868
getSubscriptions().then(subscriptions => {

0 commit comments

Comments
 (0)