Skip to content

Commit

Permalink
Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Oct 19, 2021
1 parent 2383cfc commit 2513af3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ export default {
}
},
computed: {
...mapState('workflows', ['workflows']),
...mapState('workflows', ['lookup']),
workflowsTable () {
const count = Object.values(this.workflows)
const count = Object.values(this.lookup)
.map(workflow => workflow.status)
.reduce((acc, state) => {
acc[state] = (acc[state] || 0) + 1
Expand Down
4 changes: 2 additions & 2 deletions src/views/WorkflowsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ export default {
}
}),
computed: {
...mapState('workflows', ['workflows']),
...mapState('workflows', ['lookup']),
workflowsTable () {
return Object.values(this.workflows)
return Object.values(this.lookup)
}
},
methods: {
Expand Down
14 changes: 7 additions & 7 deletions tests/e2e/specs/workflowservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('WorkflowService subscriptions', () => {
expect(Object.keys(subscriptions).length).to.equal(1)
})
})
it('-> Dashboard -> User Profile, should contain 1 subscription (GScan)', () => {
it('-> Dashboard -> User Profile, should contain 1 subscription ("root" = GScan)', () => {
cy.visit('/#/')
cy.get('[href="#/user-profile"]').click({ force: true })
cy.contains('h3', 'Your Profile')
Expand All @@ -39,30 +39,30 @@ describe('WorkflowService subscriptions', () => {
expect(Object.keys(subscriptions).length).to.equal(1)
})
})
it('-> Dashboard -> Workflows, should contain 2 subscriptions (GScan + Tree)', () => {
it('-> Dashboard -> Workflows, should contain 2 subscriptions ("root" = GScan + Dashboard, and "workflow" = Tree)', () => {
cy.visit('/#/')
cy.get('[href="#/workflows/one"]').click({ force: true })
// <div id='main'> is used by Lumino, and its initial tab contains the text tree
cy.get('div#main').find('.c-tree')
cy.get('div#main').find('.c-task')
getSubscriptions().then(subscriptions => {
// GScan subscription "root" and the subscription "workflow" used by the Tree view
expect(Object.keys(subscriptions).length).to.equal(2)
expect(subscriptions.root.observable.closed).to.equal(false)
expect(subscriptions.workflow.observable.closed).to.equal(false)
})
})
it('-> Dashboard -> Workflows -> Dashboard, should contain 2 subscriptions (GScan + Dashboard)', () => {
it('-> Dashboard -> Workflows -> Dashboard, should contain 1 subscriptions ("root" = GScan + Dashboard)', () => {
cy.visit('/#/')
cy.get('[href="#/workflows/one"]').click()
cy.get('[href="#/workflows/one"]').click({ force: true })
// <div id='main'> is used by Lumino, and its initial tab contains the text tree
cy.get('div#main').find('.c-tree')
cy.get('div#main').find('.c-task')
cy.get('[href="#/"]').click({ force: true })
cy.get('div.c-dashboard')
getSubscriptions().then(subscriptions => {
expect(Object.keys(subscriptions).length).to.equal(1)
})
})
it('-> Tree, should contain 2 subscriptions (GScan + Tree)', () => {
it('-> Tree, should contain 2 subscriptions ("root" = GScan + Dashboard, and "workflow" = Tree)', () => {
cy.visit('/#/tree/one')
cy.get('.c-header').should('exist')
getSubscriptions().then(subscriptions => {
Expand Down

0 comments on commit 2513af3

Please sign in to comment.