mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-02-02 08:52:52 +00:00
Cypress module conversion and updated chalk
This commit is contained in:
@@ -1,22 +0,0 @@
|
|||||||
const { defineConfig } = require('cypress');
|
|
||||||
|
|
||||||
module.exports = defineConfig({
|
|
||||||
requestTimeout: 30000,
|
|
||||||
defaultCommandTimeout: 20000,
|
|
||||||
reporter: 'cypress-multi-reporters',
|
|
||||||
reporterOptions: {
|
|
||||||
configFile: 'multi-reporter.json'
|
|
||||||
},
|
|
||||||
video: true,
|
|
||||||
videosFolder: 'results/videos',
|
|
||||||
screenshotsFolder: 'results/screenshots',
|
|
||||||
e2e: {
|
|
||||||
setupNodeEvents(on, config) {
|
|
||||||
return require("../plugins/index.js")(on, config);
|
|
||||||
},
|
|
||||||
env: {
|
|
||||||
swaggerBase: '{{baseUrl}}/api/schema?ts=' + Date.now(),
|
|
||||||
},
|
|
||||||
baseUrl: 'http://fullstack:81',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
23
test/cypress/config/ci.mjs
Normal file
23
test/cypress/config/ci.mjs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { defineConfig } from 'cypress';
|
||||||
|
import pluginSetup from '../plugins/index.mjs';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
requestTimeout: 30000,
|
||||||
|
defaultCommandTimeout: 20000,
|
||||||
|
reporter: "cypress-multi-reporters",
|
||||||
|
reporterOptions: {
|
||||||
|
configFile: "multi-reporter.json"
|
||||||
|
},
|
||||||
|
video: true,
|
||||||
|
videosFolder: "results/videos",
|
||||||
|
screenshotsFolder: "results/screenshots",
|
||||||
|
e2e: {
|
||||||
|
setupNodeEvents(on, config) {
|
||||||
|
return pluginSetup(on, config);
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
swaggerBase: `{{baseUrl}}/api/schema?ts=${Date.now()}`,
|
||||||
|
},
|
||||||
|
baseUrl: "http://fullstack:81",
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
const { defineConfig } = require('cypress');
|
|
||||||
|
|
||||||
module.exports = defineConfig({
|
|
||||||
requestTimeout: 30000,
|
|
||||||
defaultCommandTimeout: 20000,
|
|
||||||
reporter: 'cypress-multi-reporters',
|
|
||||||
reporterOptions: {
|
|
||||||
configFile: 'multi-reporter.json'
|
|
||||||
},
|
|
||||||
video: true,
|
|
||||||
videosFolder: 'results/videos',
|
|
||||||
screenshotsFolder: 'results/screenshots',
|
|
||||||
e2e: {
|
|
||||||
setupNodeEvents(on, config) {
|
|
||||||
return require("../plugins/index.js")(on, config);
|
|
||||||
},
|
|
||||||
env: {
|
|
||||||
swaggerBase: '{{baseUrl}}/api/schema?ts=' + Date.now(),
|
|
||||||
},
|
|
||||||
baseUrl: 'http://127.0.0.1:3081',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
23
test/cypress/config/dev.mjs
Normal file
23
test/cypress/config/dev.mjs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { defineConfig } from 'cypress';
|
||||||
|
import pluginSetup from '../plugins/index.mjs';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
requestTimeout: 30000,
|
||||||
|
defaultCommandTimeout: 20000,
|
||||||
|
reporter: "cypress-multi-reporters",
|
||||||
|
reporterOptions: {
|
||||||
|
configFile: "multi-reporter.json"
|
||||||
|
},
|
||||||
|
video: true,
|
||||||
|
videosFolder: "results/videos",
|
||||||
|
screenshotsFolder: "results/screenshots",
|
||||||
|
e2e: {
|
||||||
|
setupNodeEvents(on, config) {
|
||||||
|
return pluginSetup(on, config);
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
swaggerBase: `{{baseUrl}}/api/schema?ts=${Date.now()}`,
|
||||||
|
},
|
||||||
|
baseUrl: "http://127.0.0.1:3081",
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
const { SwaggerValidation } = require('@jc21/cypress-swagger-validation');
|
import { SwaggerValidation } from '@jc21/cypress-swagger-validation';
|
||||||
const chalk = require('chalk');
|
import chalk from 'chalk';
|
||||||
|
|
||||||
module.exports = (on, config) => {
|
export default (on, config) => {
|
||||||
// Replace swaggerBase config var wildcard
|
// Replace swaggerBase config var wildcard
|
||||||
if (typeof config.env.swaggerBase !== 'undefined') {
|
if (typeof config.env.swaggerBase !== 'undefined') {
|
||||||
config.env.swaggerBase = config.env.swaggerBase.replace('{{baseUrl}}', config.baseUrl);
|
config.env.swaggerBase = config.env.swaggerBase.replace('{{baseUrl}}', config.baseUrl);
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"include": [
|
"include": [
|
||||||
"./node_modules/cypress",
|
"./node_modules/cypress",
|
||||||
"cypress/**/*.js"
|
"cypress/**/*.js",
|
||||||
|
"cypress/config/dev.mjs",
|
||||||
|
"cypress/config/ci.mjs",
|
||||||
|
"cypress/plugins/index.mjs"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"@jc21/cypress-swagger-validation": "^0.3.2",
|
"@jc21/cypress-swagger-validation": "^0.3.2",
|
||||||
"@quobix/vacuum": "^0.19.4",
|
"@quobix/vacuum": "^0.19.4",
|
||||||
"axios": "^1.13.1",
|
"axios": "^1.13.1",
|
||||||
"chalk": "^4.1.0",
|
"chalk": "^5.6.2",
|
||||||
"cypress": "^15.9.0",
|
"cypress": "^15.9.0",
|
||||||
"cypress-multi-reporters": "^2.0.5",
|
"cypress-multi-reporters": "^2.0.5",
|
||||||
"cypress-wait-until": "^3.0.2",
|
"cypress-wait-until": "^3.0.2",
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
"mocha-junit-reporter": "^2.2.1"
|
"mocha-junit-reporter": "^2.2.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"cypress": "HTTP_PROXY=127.0.0.1:8128 HTTPS_PROXY=127.0.0.1:8128 cypress open --config-file=cypress/config/ci.js",
|
"cypress": "HTTP_PROXY=127.0.0.1:8128 HTTPS_PROXY=127.0.0.1:8128 cypress open --config-file=cypress/config/ci.mjs",
|
||||||
"cypress:headless": "HTTP_PROXY=127.0.0.1:8128 HTTPS_PROXY=127.0.0.1:8128 cypress run --config-file=cypress/config/ci.js",
|
"cypress:headless": "HTTP_PROXY=127.0.0.1:8128 HTTPS_PROXY=127.0.0.1:8128 cypress run --config-file=cypress/config/ci.mjs",
|
||||||
"cypress:dev": "cypress run --config-file=cypress/config/dev.js",
|
"cypress:dev": "cypress run --config-file=cypress/config/dev.mjs",
|
||||||
"swagger-lint": "vacuum lint -b -q -d -a --no-clip -n=warn"
|
"swagger-lint": "vacuum lint -b -q -d -a --no-clip -n=warn"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
@@ -552,6 +552,11 @@ chalk@^4.0.0, chalk@^4.1.0:
|
|||||||
ansi-styles "^4.1.0"
|
ansi-styles "^4.1.0"
|
||||||
supports-color "^7.1.0"
|
supports-color "^7.1.0"
|
||||||
|
|
||||||
|
chalk@^5.6.2:
|
||||||
|
version "5.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.6.2.tgz#b1238b6e23ea337af71c7f8a295db5af0c158aea"
|
||||||
|
integrity sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==
|
||||||
|
|
||||||
charenc@0.0.2:
|
charenc@0.0.2:
|
||||||
version "0.0.2"
|
version "0.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
|
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
|
||||||
|
|||||||
Reference in New Issue
Block a user