Cypress: GuiPort test fix & new check in every test (#748)

This commit is contained in:
Adam Kol
2022-02-02 16:05:07 +02:00
committed by GitHub
parent 4c4405885b
commit 78be20fe4d
9 changed files with 65 additions and 30 deletions

View File

@@ -16,3 +16,15 @@ export function resizeToNormalMizu() {
cy.viewport(1920, 1080);
}
export function verifyMinimumEntries() {
const minimumEntries = Cypress.env('minimumEntries');
it(`Making sure that mizu shows at least ${minimumEntries} entries`, async function () {
cy.get('#total-entries').then(number => {
const getNum = () => {
const numOfEntries = number.text();
return parseInt(numOfEntries);
};
cy.wrap({ there: getNum }).invoke('there').should('be.gte', minimumEntries);
});
});
}