未验证 提交 2b17505e 编写于 作者: S Sebastian Florek 提交者: GitHub

Refactor cypress config and improve scale request (#5928)

* Add dependabot, refactor cypress config, improve scale request

* Fix husky ignore

* Fix config

* i18n
上级 aae921ec
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
# Check the npm registry for updates every day (weekdays)
schedule:
interval: "daily"
......@@ -28,6 +28,3 @@ cypress/videos
# npm debug log:
npm-debug.log
# husky
.husky/_
......@@ -16,3 +16,7 @@
. "$(dirname "$0")/_/husky.sh"
npx --no-install lint-staged
npm run check
npm run check:license
npm run test:frontend
npm run test:backend
{
"extends": "../tsconfig.json",
"compilerOptions": {
"strict": true,
"baseUrl": "../node_modules",
"types": ["cypress"]
},
"include": [
"../cypress/integration/**/*.ts",
"../cypress/pages/**/*.ts",
"../node_modules/cypress/**/*.ts"]
}
const wp = require('@cypress/webpack-preprocessor');
const webpackOptions = {
resolve: {extensions: ['.ts', '.js']},
module: {
rules: [
{
test: /\.ts$/,
exclude: [/node_modules/],
use: [
{
loader: 'ts-loader',
options: {configFile: 'aio/tsconfig.e2e.json'},
},
],
},
],
},
};
const options = {webpackOptions};
module.exports = wp(options);
const wp = require('@cypress/webpack-preprocessor')
const cypressTypeScriptPreprocessor = require('./cy-ts-preprocessor');
module.exports = (on) => {
const options = {
webpackOptions: require('../../webpack.config'),
}
on('file:preprocessor', wp(options))
}
module.exports = on => on('file:preprocessor', cypressTypeScriptPreprocessor);
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
// add a custom command cy.foo()
Cypress.Commands.add('foo', () => 'foo');
//
// // see more example of adding custom commands to Cypress TS interface
// // in https://github.com/cypress-io/add-cypress-custom-command-in-typescript
// // add new command to the existing Cypress interface
declare namespace Cypress {
interface Chainable {
foo: () => string;
}
}
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
{
"ignore": [
"*", "docs", "i18n",
"*", "docs", "i18n", ".husky", ".github",
".cached_tools", ".git", ".github/ISSUE_TEMPLATE", ".tmp", "coverage", "cypress", ".idea",
"aio/test-resources",
"**/*.json", "**/*.yaml", "**/*.svg", "**/*.txt", "**/*.md", "**/OWNERS", "**/.helmignore", "**/*.lock"
......
......@@ -78,7 +78,7 @@ export class VerberService {
objectMeta.name
}/`;
return this.http_.put(url, result, {params: {scaleBy: result}});
return this.http_.put(url, {scaleBy: result}, {params: {scaleBy: result}});
})
)
.subscribe(_ => this.onScale.emit(true), this.handleErrorResponse_.bind(this));
......
module.exports = {
mode: 'development',
// webpack will transpile TS and JS files
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
// every time webpack sees a TS file (except for node_modules)
// webpack will use "ts-loader" to transpile it to JavaScript
test: /\.ts$/,
exclude: [/node_modules/],
use: [
{
loader: 'ts-loader',
options: {
// skip typechecking for speed
transpileOnly: true
}
}
]
}
]
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册