Skip to content

Commit

Permalink
✔️ Updating tests after components have been updated
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Jan 11, 2024
1 parent f66cc45 commit e25f983
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/29-templates.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ describe('Templates', () => {
let initialCollectionCount = 0;

templatesPage.getters.templateCountLabel().then(($el) => {
initialTemplateCount = Number($el.text());
initialTemplateCount = parseInt($el.text().replace(/\D/g, ''), 10);
templatesPage.getters.collectionCountLabel().then(($el) => {
initialCollectionCount = Number($el.text());
initialCollectionCount = parseInt($el.text().replace(/\D/g, ''), 10);

templatesPage.getters.categoryFilter('sales').click();
templatesPage.getters.templatesLoadingContainer().should('not.exist');

// Should have less templates and collections after selecting a category
templatesPage.getters.templateCountLabel().should(($el) => {
expect(Number($el.text())).to.be.lessThan(initialTemplateCount);
expect(parseInt($el.text().replace(/\D/g, ''), 10)).to.be.lessThan(initialTemplateCount);
});
templatesPage.getters.collectionCountLabel().should(($el) => {
expect(Number($el.text())).to.be.lessThan(initialCollectionCount);
expect(parseInt($el.text().replace(/\D/g, ''), 10)).to.be.lessThan(initialCollectionCount);
});
});
});
Expand Down

0 comments on commit e25f983

Please sign in to comment.