mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
More tests around the requests grid
This commit is contained in:
parent
b6ce223acd
commit
5ef8aff677
11 changed files with 235 additions and 13 deletions
|
@ -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}]`);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue