style: auto format whole project

This commit is contained in:
Ali BARIN
2022-11-05 23:57:33 +01:00
parent e338770e57
commit 475f24f661
199 changed files with 2421 additions and 1839 deletions

View File

@@ -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', () => {