style: auto format whole project
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
Cypress.Commands.add('og', { prevSubject: 'optional' }, (subject, selector, suffix = '') => {
|
||||
if (subject) {
|
||||
return cy.wrap(subject).get(`[data-test="${selector}"]${suffix}`);
|
||||
}
|
||||
Cypress.Commands.add(
|
||||
'og',
|
||||
{ prevSubject: 'optional' },
|
||||
(subject, selector, suffix = '') => {
|
||||
if (subject) {
|
||||
return cy.wrap(subject).get(`[data-test="${selector}"]${suffix}`);
|
||||
}
|
||||
|
||||
return cy.get(`[data-test="${selector}"]${suffix}`);
|
||||
});
|
||||
return cy.get(`[data-test="${selector}"]${suffix}`);
|
||||
}
|
||||
);
|
||||
|
||||
Cypress.Commands.add('login', () => {
|
||||
cy.visit('/login');
|
||||
@@ -12,12 +16,10 @@ Cypress.Commands.add('login', () => {
|
||||
cy.og('email-text-field').type(Cypress.env('login_email'));
|
||||
cy.og('password-text-field').type(Cypress.env('login_password'));
|
||||
|
||||
cy
|
||||
.intercept('/graphql')
|
||||
.as('graphqlCalls');
|
||||
cy
|
||||
.intercept('https://notifications.automatisch.io/notifications.json')
|
||||
.as('notificationsCall');
|
||||
cy.intercept('/graphql').as('graphqlCalls');
|
||||
cy.intercept('https://notifications.automatisch.io/notifications.json').as(
|
||||
'notificationsCall'
|
||||
);
|
||||
cy.og('login-button').click();
|
||||
|
||||
cy.wait(['@graphqlCalls', '@notificationsCall']);
|
||||
@@ -30,14 +32,11 @@ Cypress.Commands.add('logout', () => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add('ss', (name, opts = {}) => {
|
||||
return cy.screenshot(
|
||||
name,
|
||||
{
|
||||
overwrite: true,
|
||||
capture: 'viewport',
|
||||
...opts,
|
||||
}
|
||||
);
|
||||
return cy.screenshot(name, {
|
||||
overwrite: true,
|
||||
capture: 'viewport',
|
||||
...opts,
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('clickOutside', () => {
|
||||
|
Reference in New Issue
Block a user