From d171fee30332da4c08a5e5dc3f16c0934a1fbf31 Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Wed, 3 Apr 2024 16:22:19 +0200 Subject: [PATCH] test: refactor after PR review --- cypress/elements/dimensionModal/dataDimension.js | 2 +- cypress/integration/visTypes/outlierTable.cy.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/elements/dimensionModal/dataDimension.js b/cypress/elements/dimensionModal/dataDimension.js index 399549ca94..9a26f5fe44 100644 --- a/cypress/elements/dimensionModal/dataDimension.js +++ b/cypress/elements/dimensionModal/dataDimension.js @@ -81,7 +81,7 @@ export const expectDataTypeToBe = (type) => cy.getBySel(dataTypesSelectButtonEl).should('contain', type) export const expectDataTypeSelectHelpToContain = (text) => - cy.getBySel(dataTypesSelectHelpEl).should('contain', text) + cy.getBySel(dataTypesSelectHelpEl).should('have.text', text) export const expectGroupSelectToNotBeVisible = () => cy.getBySel(groupSelectButtonEl).should('not.exist') diff --git a/cypress/integration/visTypes/outlierTable.cy.js b/cypress/integration/visTypes/outlierTable.cy.js index b996756c78..751448ddb2 100644 --- a/cypress/integration/visTypes/outlierTable.cy.js +++ b/cypress/integration/visTypes/outlierTable.cy.js @@ -163,7 +163,7 @@ describe(['>=41'], 'using an Outlier table visualization', () => { cy.log('has default sorting on Value descending') cy.getBySel('outlier-table') .findBySel('table-header') - .contains('Value') + .containsExact('Value') .closest('[data-test="table-header"]') .find('button') .should('have.attr', 'title', 'Sort ascending by Value and update') @@ -178,14 +178,14 @@ describe(['>=41'], 'using an Outlier table visualization', () => { cy.getBySel('outlier-table') .findBySel('table-header') - .contains('Value') + .containsExact('Value') .closest('[data-test="table-header"]') .find('button') .should('have.attr', 'title', 'Sort descending by Value and update') cy.getBySel('outlier-table') .findBySel('table-header') - .contains('Min') + .containsExact('Min') .closest('[data-test="table-header"]') .find('button') .should('have.attr', 'title', 'Sort ascending by Min and update')