From 7a451e6c246fcaa37d6c95f3c6962f3709e07ffd Mon Sep 17 00:00:00 2001 From: Oliver Sanders Date: Wed, 11 Dec 2024 11:19:22 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> --- cypress/component/info.cy.js | 24 ++++++++++++------------ src/services/mock/json/infoView.json | 6 +++++- tests/e2e/specs/info.cy.js | 7 +++---- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/cypress/component/info.cy.js b/cypress/component/info.cy.js index 132cecb6d..3bd79dc37 100644 --- a/cypress/component/info.cy.js +++ b/cypress/component/info.cy.js @@ -161,23 +161,23 @@ describe('Info component', () => { .find('.prerequisite-alias.condition') .should('have.length', 6) .then((selector) => { - expect(selector[0]).to.contain('(0 & 1) | 2') - expect(selector[0].classList.toString()).to.equal('prerequisite-alias condition') + expect(selector[0].innerText).to.equal('(0 & 1) | 2') + expect(selector[0]).to.not.have.class('satisfied') - expect(selector[0]).to.contain('0') - expect(selector[1].classList.toString()).to.equal('prerequisite-alias condition satisfied') + expect(selector[1].innerText).to.equal('0 a:succeeded') + expect(selector[1]).to.have.class('satisfied') - expect(selector[0]).to.contain('1') - expect(selector[2].classList.toString()).to.equal('prerequisite-alias condition') + expect(selector[2].innerText).to.equal('1 b:custom_output') + expect(selector[2]).to.not.have.class('satisfied') - expect(selector[0]).to.contain('2') - expect(selector[3].classList.toString()).to.equal('prerequisite-alias condition') + expect(selector[3].innerText).to.equal('2 a:expired') + expect(selector[3]).to.not.have.class('satisfied') - expect(selector[0]).to.contain('0') - expect(selector[4].classList.toString()).to.equal('prerequisite-alias condition satisfied') + expect(selector[4].innerText).to.equal('0') + expect(selector[4]).to.have.class('satisfied') - expect(selector[0]).to.contain('0') - expect(selector[5].classList.toString()).to.equal('prerequisite-alias condition satisfied') + expect(selector[5].innerText).to.equal('0 x:succeeded') + expect(selector[5]).to.have.class('satisfied') }) // the outputs panel diff --git a/src/services/mock/json/infoView.json b/src/services/mock/json/infoView.json index 6e3d86056..05b7d1bfa 100644 --- a/src/services/mock/json/infoView.json +++ b/src/services/mock/json/infoView.json @@ -73,7 +73,11 @@ "label": "expired", "satisfied": false } - ] + ], + + "runtime": { + "completion": "succeeded" + } } ] } diff --git a/tests/e2e/specs/info.cy.js b/tests/e2e/specs/info.cy.js index 29a637869..e5a6204e5 100644 --- a/tests/e2e/specs/info.cy.js +++ b/tests/e2e/specs/info.cy.js @@ -19,13 +19,12 @@ describe('Info View', () => { it('works', () => { // test opening the "Info View" from a task in the "Tree View" cy.visit('/#/workspace/one') - // click on task 20000102T0000Z/failed - .get('.c-treeitem .c-treeitem .c-treeitem:first') - .find('.c-task') + // click on task + .get('.node-data-task [data-c-interactive]:first') .click({ force: true }) // from the menu select the "Info" psudo-mutation - .get('.v-list > :nth-child(6)') + .get('.v-list-item') .contains('Info') .click({ force: true })