diff --git a/tests/System/integration/api/com_users/Levels.cy.js b/tests/System/integration/api/com_users/Levels.cy.js index d0d4aa9d434bc..00f4183e8454b 100644 --- a/tests/System/integration/api/com_users/Levels.cy.js +++ b/tests/System/integration/api/com_users/Levels.cy.js @@ -54,15 +54,7 @@ describe('Test that users access levels API endpoint', () => { cy.wrap(patchResponse).its('body').its('data').its('attributes').its('title') .should('eq', 'updated automated test level'); cy.wrap(patchResponse).its('body').its('data').its('attributes').its('rules') - .then((rules) => { - if (typeof rules === 'string') { - const normalized = rules.replace(/\s+/g, ''); - expect(normalized).to.eq([1, 2]); - } else { - const nums = rules.map((r) => (typeof r === 'string' ? Number(r) : r)); - expect(nums).to.deep.equal([1, 2]); - } - }); + .should('deep.equal', [1, 2]); }); }); });