fix: updated eslint rules for cypress files
parent
24bbf0788b
commit
4e4613d8ab
14
.eslintrc
14
.eslintrc
|
@ -25,6 +25,20 @@
|
|||
"globals": {
|
||||
"strapi": true
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"**/*.cy.*",
|
||||
"./cypress/**/*.*"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:cypress/recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.cypress.json"
|
||||
}
|
||||
}
|
||||
],
|
||||
"rules": {
|
||||
"import/no-unresolved": [2, {
|
||||
"ignore": [
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/// <reference types="cypress" />
|
||||
//
|
||||
// <reference types="cypress" />
|
||||
|
||||
describe('Config Sync', () => {
|
||||
beforeEach(() => {
|
||||
|
|
|
@ -10,6 +10,7 @@ module.exports = defineConfig({
|
|||
requestTimeout: 10000,
|
||||
setupNodeEvents(on, config) {
|
||||
// implement node event listeners here.
|
||||
// eslint-disable-next-line global-require
|
||||
require('cypress-terminal-report/src/installLogsPrinter')(on);
|
||||
|
||||
on('task', {
|
||||
|
@ -21,7 +22,7 @@ module.exports = defineConfig({
|
|||
console.log(`folder ${folderName} deleted`);
|
||||
return null;
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.error(`error deleting folder ${folderName}`, err);
|
||||
throw err;
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/// <reference types="cypress" />
|
||||
// <reference types="cypress" />
|
||||
// ***********************************************
|
||||
// This example commands.ts shows you how to
|
||||
// create various custom commands and overwrite
|
||||
|
@ -43,6 +43,7 @@ Cypress.Commands.add('login', (path) => {
|
|||
cy.wait('@adminInit').its('response.statusCode').should('equal', 200);
|
||||
|
||||
// Wait for the form to render.
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
|
||||
cy.get('body').then(($body) => {
|
||||
|
@ -120,7 +121,8 @@ Cypress.Commands.add('makeConfigChanges', (path) => {
|
|||
}).as('saveUpEmailTemplates');
|
||||
cy.get('a[href="/admin/settings/users-permissions/email-templates"]').click();
|
||||
cy.get('tbody tr').contains('Reset password').click();
|
||||
cy.get('input[name="options.response_email"]').clear().type(`${Math.random().toString(36).substring(2, 15)}@example.com`);
|
||||
cy.get('input[name="options.response_email"]').clear();
|
||||
cy.get('input[name="options.response_email"]').type(`${Math.random().toString(36).substring(2, 15)}@example.com`);
|
||||
cy.get('button[type="submit"]').click();
|
||||
cy.wait('@saveUpEmailTemplates').its('response.statusCode').should('equal', 200);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue