More tests around the requests grid

This commit is contained in:
tidusjar 2021-03-09 21:51:33 +00:00
commit 5ef8aff677
11 changed files with 235 additions and 13 deletions

View file

@ -32,7 +32,6 @@ Cypress.Commands.add("landingSettings", (enabled) => {
})
Cypress.Commands.add('login', (username, password) => {
cy.clearLocalStorage();
cy.request({
method: 'POST',
url: '/api/v1/token',
@ -88,4 +87,16 @@ Cypress.Commands.add('generateUniqueId', () => {
const uniqueSeed = Date.now().toString();
const id = Cypress._.uniqueId(uniqueSeed);
return id;
});
});
Cypress.Commands.add("getByData", (selector, ...args) => {
return cy.get(`[data-test=${selector}]`, ...args);
});
Cypress.Commands.add("getByData", (selector) => {
return cy.get(`[data-test=${selector}]`);
});
Cypress.Commands.add("getByDataLike", (selector) => {
return cy.get(`[data-test*=${selector}]`);
});