mirror of
https://codeberg.org/beerbrawl/beerbrawl.git
synced 2024-09-23 01:30:52 +02:00
chore(#41): make prettier config global to re-use it for e2e tests
Signed-off-by: Christoph Heiss <e11907069@student.tuwien.ac.at>
This commit is contained in:
parent
84ecd3ddd8
commit
dee74f7556
2
.prettierignore
Normal file
2
.prettierignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
frontend/.angular
|
||||||
|
frontend/src/assets/
|
|
@ -1,4 +1,4 @@
|
||||||
const { defineConfig } = require("cypress");
|
const { defineConfig } = require('cypress');
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
reporter: 'cypress-multi-reporters',
|
reporter: 'cypress-multi-reporters',
|
||||||
|
@ -12,8 +12,8 @@ module.exports = defineConfig({
|
||||||
// We've imported your old cypress plugins here.
|
// We've imported your old cypress plugins here.
|
||||||
// You may want to clean this up later by importing these.
|
// You may want to clean this up later by importing these.
|
||||||
setupNodeEvents(on, config) {
|
setupNodeEvents(on, config) {
|
||||||
return require('./cypress/plugins/index.js')(on, config)
|
return require('./cypress/plugins/index.js')(on, config);
|
||||||
},
|
},
|
||||||
baseUrl: 'http://localhost:4200/',
|
baseUrl: 'http://localhost:4200/',
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
|
|
|
@ -19,4 +19,4 @@
|
||||||
module.exports = (on, config) => {
|
module.exports = (on, config) => {
|
||||||
// `on` is used to hook into various events Cypress emits
|
// `on` is used to hook into various events Cypress emits
|
||||||
// `config` is the resolved Cypress config
|
// `config` is the resolved Cypress config
|
||||||
}
|
};
|
||||||
|
|
|
@ -10,8 +10,8 @@ Cypress.Commands.add('createUser', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add("loginUser", () => {
|
Cypress.Commands.add('loginUser', () => {
|
||||||
cy.fixture("settings").then((settings) => {
|
cy.fixture('settings').then(settings => {
|
||||||
cy.visit(settings.baseUrl);
|
cy.visit(settings.baseUrl);
|
||||||
cy.get('[data-cy="open-login-dialog-button"]').click();
|
cy.get('[data-cy="open-login-dialog-button"]').click();
|
||||||
cy.get('input[name="username"]').type(settings.username);
|
cy.get('input[name="username"]').type(settings.username);
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
// ***********************************************************
|
// ***********************************************************
|
||||||
|
|
||||||
// Import commands.js using ES2015 syntax:
|
// Import commands.js using ES2015 syntax:
|
||||||
import './commands'
|
import './commands';
|
||||||
|
|
||||||
// Alternatively you can use CommonJS syntax:
|
// Alternatively you can use CommonJS syntax:
|
||||||
// require('./commands')
|
// require('./commands')
|
||||||
|
|
19
e2e/package-lock.json
generated
19
e2e/package-lock.json
generated
|
@ -14,7 +14,9 @@
|
||||||
"cypress-multi-reporters": "1.6.4",
|
"cypress-multi-reporters": "1.6.4",
|
||||||
"mocha-junit-reporter": "2.2.1"
|
"mocha-junit-reporter": "2.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {}
|
"devDependencies": {
|
||||||
|
"prettier": "^3.2.5"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@colors/colors": {
|
"node_modules/@colors/colors": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
|
@ -2323,6 +2325,21 @@
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/prettier": {
|
||||||
|
"version": "3.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
|
||||||
|
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"prettier": "bin/prettier.cjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/pretty-bytes": {
|
"node_modules/pretty-bytes": {
|
||||||
"version": "5.6.0",
|
"version": "5.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
|
||||||
|
|
|
@ -10,10 +10,14 @@
|
||||||
"cypress-multi-reporters": "1.6.4",
|
"cypress-multi-reporters": "1.6.4",
|
||||||
"mocha-junit-reporter": "2.2.1"
|
"mocha-junit-reporter": "2.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {
|
||||||
|
"prettier": "^3.2.5"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"cypress": "cypress run"
|
"cypress": "cypress run",
|
||||||
|
"prettier:check": "prettier --check '**/*.{json,html,scss,ts,js}'",
|
||||||
|
"prettier:fix": "prettier --write '**/*.{json,html,scss,ts,js}'"
|
||||||
},
|
},
|
||||||
"author": "Heimo Stranner",
|
"author": "Heimo Stranner",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
src/assets/
|
|
Loading…
Reference in a new issue