diff --git a/apps/datahub-e2e/src/e2e/datasets.cy.ts b/apps/datahub-e2e/src/e2e/datasets.cy.ts index b096d09cec..2f8b6325c3 100644 --- a/apps/datahub-e2e/src/e2e/datasets.cy.ts +++ b/apps/datahub-e2e/src/e2e/datasets.cy.ts @@ -445,15 +445,13 @@ describe('datasets', () => { .as('initialResultTitles') cy.get('@sortBy').selectDropdownOption('desc,createDate') }) - it('changes the results order', () => { - cy.get('@initialResultTitles').then((initialResultTitles) => { - cy.get('@results') - .find('[data-cy="recordTitle"]') - .then(($titles) => - $titles.toArray().map((title) => title.innerText.trim()) - ) - .should('not.eql', initialResultTitles) - }) + it('changes the results order', function () { + cy.get('@results') + .find('[data-cy="recordTitle"]') + .then(($titles) => + $titles.toArray().map((title) => title.innerText.trim()) + ) + .should('not.eql', this.initialResultTitles) // @initialResultTitles }) }) })