mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Merge pull request #802 from freqtrade/dependabot/npm_and_yarn/main/cypress-10.0.3
build(deps-dev): bump cypress from 9.7.0 to 10.0.3
This commit is contained in:
commit
713afd925d
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
||||||
run: yarn test:unit
|
run: yarn test:unit
|
||||||
|
|
||||||
- name: Run Component tests
|
- name: Run Component tests
|
||||||
uses: cypress-io/github-action@v2
|
uses: cypress-io/github-action@v4
|
||||||
with:
|
with:
|
||||||
# we have already installed everything
|
# we have already installed everything
|
||||||
install: false
|
install: false
|
||||||
|
@ -47,7 +47,7 @@ jobs:
|
||||||
command: yarn cypress run-ct
|
command: yarn cypress run-ct
|
||||||
|
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@v2
|
uses: cypress-io/github-action@v4
|
||||||
with:
|
with:
|
||||||
# build: yarn build
|
# build: yarn build
|
||||||
start: yarn serve
|
start: yarn serve
|
||||||
|
|
22
cypress.config.ts
Normal file
22
cypress.config.ts
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
import { defineConfig } from 'cypress';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
video: false,
|
||||||
|
e2e: {
|
||||||
|
// We've imported your old cypress plugins here.
|
||||||
|
// You may want to clean this up later by importing these.
|
||||||
|
setupNodeEvents(on, config) {
|
||||||
|
return require('./cypress/plugins/index.js')(on, config);
|
||||||
|
},
|
||||||
|
specPattern: 'cypress/e2e/**/*.spec.ts',
|
||||||
|
baseUrl: 'http://localhost:3000',
|
||||||
|
},
|
||||||
|
component: {
|
||||||
|
devServer: {
|
||||||
|
framework: 'vue',
|
||||||
|
bundler: 'vite',
|
||||||
|
},
|
||||||
|
// setupNodeEvents(on, config) {},
|
||||||
|
specPattern: 'src/**/*.spec.ts',
|
||||||
|
},
|
||||||
|
});
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"testFiles": "**/*.spec.ts",
|
|
||||||
"baseUrl": "http://localhost:3000",
|
|
||||||
"video": false,
|
|
||||||
"component": {
|
|
||||||
"componentFolder": "src"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
/// <reference types="cypress" />
|
||||||
// ***********************************************
|
// ***********************************************
|
||||||
// This example commands.js shows you how to
|
// This example commands.ts shows you how to
|
||||||
// create various custom commands and overwrite
|
// create various custom commands and overwrite
|
||||||
// existing commands.
|
// existing commands.
|
||||||
//
|
//
|
||||||
|
@ -23,3 +24,14 @@
|
||||||
//
|
//
|
||||||
// -- This will overwrite an existing command --
|
// -- This will overwrite an existing command --
|
||||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||||
|
//
|
||||||
|
// declare global {
|
||||||
|
// namespace Cypress {
|
||||||
|
// interface Chainable {
|
||||||
|
// login(email: string, password: string): Chainable<void>
|
||||||
|
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||||
|
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||||
|
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
12
cypress/support/component-index.html
Normal file
12
cypress/support/component-index.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<title>Components App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div data-cy-root></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
39
cypress/support/component.ts
Normal file
39
cypress/support/component.ts
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
// ***********************************************************
|
||||||
|
// This example support/component.ts 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')
|
||||||
|
|
||||||
|
import { mount } from 'cypress/vue2';
|
||||||
|
|
||||||
|
// Augment the Cypress namespace to include type definitions for
|
||||||
|
// your custom command.
|
||||||
|
// Alternatively, can be defined in cypress/support/component.d.ts
|
||||||
|
// with a <reference path="./component" /> at the top of your spec.
|
||||||
|
declare global {
|
||||||
|
namespace Cypress {
|
||||||
|
interface Chainable {
|
||||||
|
mount: typeof mount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Cypress.Commands.add('mount', mount);
|
||||||
|
|
||||||
|
// Example use:
|
||||||
|
// cy.mount(MyComponent)
|
|
@ -6,7 +6,7 @@
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"integration/*.ts",
|
"e2e/*.ts",
|
||||||
"integration/*.tsx"
|
"e2e/*.tsx"
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"cy:open": "cypress open",
|
"cy:open": "cypress open",
|
||||||
"cy:run": "cypress run",
|
"cy:run": "cypress run",
|
||||||
"cy:open-ct": "cypress open-ct",
|
"cy:open-ct": "cypress open-ct",
|
||||||
"cy:run-ct": "cypress run-ct"
|
"cy:run-ct": "cypress run --component"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/composition-api": "^1.6.2",
|
"@vue/composition-api": "^1.6.2",
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
"@vue/eslint-config-typescript": "^5.1.0",
|
"@vue/eslint-config-typescript": "^5.1.0",
|
||||||
"@vue/runtime-dom": "^3.2.37",
|
"@vue/runtime-dom": "^3.2.37",
|
||||||
"@vue/test-utils": "^1.3.0",
|
"@vue/test-utils": "^1.3.0",
|
||||||
"cypress": "^9.7.0",
|
"cypress": "^10.0.3",
|
||||||
"eslint": "^6.7.2",
|
"eslint": "^6.7.2",
|
||||||
"eslint-plugin-prettier": "^3.4.1",
|
"eslint-plugin-prettier": "^3.4.1",
|
||||||
"eslint-plugin-vue": "^7.20.0",
|
"eslint-plugin-vue": "^7.20.0",
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { mount } from '@cypress/vue';
|
|
||||||
import ProfitPill from './ProfitPill.vue';
|
import ProfitPill from './ProfitPill.vue';
|
||||||
import { createLocalVue } from '@vue/test-utils';
|
import { createLocalVue } from '@vue/test-utils';
|
||||||
|
|
||||||
|
@ -9,7 +8,7 @@ localVue.use(VueCompositionAPI);
|
||||||
|
|
||||||
describe('ProfitPill.vue', () => {
|
describe('ProfitPill.vue', () => {
|
||||||
it('Shows a Green pill with positive profits', () => {
|
it('Shows a Green pill with positive profits', () => {
|
||||||
mount(ProfitPill, {
|
cy.mount(ProfitPill, {
|
||||||
localVue,
|
localVue,
|
||||||
propsData: {
|
propsData: {
|
||||||
profitRatio: 0.051,
|
profitRatio: 0.051,
|
||||||
|
@ -24,7 +23,7 @@ describe('ProfitPill.vue', () => {
|
||||||
cy.get('span').should('have.attr', 'title', 'USDT');
|
cy.get('span').should('have.attr', 'title', 'USDT');
|
||||||
});
|
});
|
||||||
it('Shows a Red pill with positive profits', () => {
|
it('Shows a Red pill with positive profits', () => {
|
||||||
mount(ProfitPill, {
|
cy.mount(ProfitPill, {
|
||||||
localVue,
|
localVue,
|
||||||
propsData: {
|
propsData: {
|
||||||
profitRatio: -0.1,
|
profitRatio: -0.1,
|
||||||
|
@ -41,7 +40,7 @@ describe('ProfitPill.vue', () => {
|
||||||
cy.get('span').should('have.attr', 'title', 'USDT');
|
cy.get('span').should('have.attr', 'title', 'USDT');
|
||||||
});
|
});
|
||||||
it('Shows a pill with 0.0 profits.', () => {
|
it('Shows a pill with 0.0 profits.', () => {
|
||||||
mount(ProfitPill, {
|
cy.mount(ProfitPill, {
|
||||||
localVue,
|
localVue,
|
||||||
propsData: {
|
propsData: {
|
||||||
profitRatio: 0.0,
|
profitRatio: 0.0,
|
||||||
|
@ -57,7 +56,7 @@ describe('ProfitPill.vue', () => {
|
||||||
cy.get('span').should('have.attr', 'title', 'BTC');
|
cy.get('span').should('have.attr', 'title', 'BTC');
|
||||||
});
|
});
|
||||||
it('Shows a pill without relative profits.', () => {
|
it('Shows a pill without relative profits.', () => {
|
||||||
mount(ProfitPill, {
|
cy.mount(ProfitPill, {
|
||||||
localVue,
|
localVue,
|
||||||
propsData: {
|
propsData: {
|
||||||
profitRatio: undefined,
|
profitRatio: undefined,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { mount } from '@cypress/vue';
|
|
||||||
import ProfitSymbol from '@/components/general/ProfitSymbol.vue';
|
import ProfitSymbol from '@/components/general/ProfitSymbol.vue';
|
||||||
import { createLocalVue } from '@vue/test-utils';
|
import { createLocalVue } from '@vue/test-utils';
|
||||||
import VueCompositionAPI from '@vue/composition-api';
|
import VueCompositionAPI from '@vue/composition-api';
|
||||||
|
@ -8,13 +7,13 @@ localVue.use(VueCompositionAPI);
|
||||||
|
|
||||||
describe('ProfitSymbol.vue', () => {
|
describe('ProfitSymbol.vue', () => {
|
||||||
it('calculates isProfitable with negative profit', () => {
|
it('calculates isProfitable with negative profit', () => {
|
||||||
mount(ProfitSymbol, { localVue, propsData: { profit: -0.5 } });
|
cy.mount(ProfitSymbol, { localVue, propsData: { profit: -0.5 } });
|
||||||
|
|
||||||
cy.get('div').should('have.class', 'triangle-down');
|
cy.get('div').should('have.class', 'triangle-down');
|
||||||
cy.get('div').should('not.have.class', 'triangle-up');
|
cy.get('div').should('not.have.class', 'triangle-up');
|
||||||
});
|
});
|
||||||
it('calculates isProfitable with positive profit', () => {
|
it('calculates isProfitable with positive profit', () => {
|
||||||
mount(ProfitSymbol, { localVue, propsData: { profit: 0.5 } });
|
cy.mount(ProfitSymbol, { localVue, propsData: { profit: 0.5 } });
|
||||||
cy.get('div').should('have.class', 'triangle-up');
|
cy.get('div').should('have.class', 'triangle-up');
|
||||||
cy.get('div').should('not.have.class', 'triangle-down');
|
cy.get('div').should('not.have.class', 'triangle-down');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import { mount } from '@cypress/vue';
|
|
||||||
import ValuePair from './ValuePair.vue';
|
import ValuePair from './ValuePair.vue';
|
||||||
|
|
||||||
it('renders a message', () => {
|
it('renders a message', () => {
|
||||||
const msg = 'Test description';
|
const msg = 'Test description';
|
||||||
mount(ValuePair, {
|
cy.mount(ValuePair, {
|
||||||
propsData: {
|
propsData: {
|
||||||
description: msg,
|
description: msg,
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
"src/**/*.tsx",
|
"src/**/*.tsx",
|
||||||
"src/**/*.vue",
|
"src/**/*.vue",
|
||||||
|
"cypress/support/*.ts",
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
|
|
@ -2241,10 +2241,10 @@ csstype@^2.6.8:
|
||||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.20.tgz#9229c65ea0b260cf4d3d997cb06288e36a8d6dda"
|
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.20.tgz#9229c65ea0b260cf4d3d997cb06288e36a8d6dda"
|
||||||
integrity sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==
|
integrity sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==
|
||||||
|
|
||||||
cypress@^9.7.0:
|
cypress@^10.0.3:
|
||||||
version "9.7.0"
|
version "10.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.7.0.tgz#bf55b2afd481f7a113ef5604aa8b693564b5e744"
|
resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.0.3.tgz#889b4bef863b7d1ef1b608b85b964394ad350c5f"
|
||||||
integrity sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==
|
integrity sha512-8C82XTybsEmJC9POYSNITGUhMLCRwB9LadP0x33H+52QVoBjhsWvIzrI+ybCe0+TyxaF0D5/9IL2kSTgjqCB9A==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cypress/request" "^2.88.10"
|
"@cypress/request" "^2.88.10"
|
||||||
"@cypress/xvfb" "^1.2.4"
|
"@cypress/xvfb" "^1.2.4"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user