Update cypress tsets to use props instead of propsDat

This commit is contained in:
Matthias 2022-12-17 20:08:10 +01:00
parent 91e8bd4e3f
commit ca93a019c3
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ import ProfitPill from './ProfitPill.vue';
describe('ProfitPill.vue', () => {
it('Shows a Green pill with positive profits', () => {
cy.mount(ProfitPill, {
propsData: {
props: {
profitRatio: 0.051,
profitAbs: 0.1,
profitDesc: '',
@ -17,7 +17,7 @@ describe('ProfitPill.vue', () => {
});
it('Shows a Red pill with positive profits', () => {
cy.mount(ProfitPill, {
propsData: {
props: {
profitRatio: -0.1,
profitAbs: -0.1,
profitDesc: '',
@ -33,7 +33,7 @@ describe('ProfitPill.vue', () => {
});
it('Shows a pill with 0.0 profits.', () => {
cy.mount(ProfitPill, {
propsData: {
props: {
profitRatio: 0.0,
profitAbs: 0.0,
profitDesc: '',
@ -48,7 +48,7 @@ describe('ProfitPill.vue', () => {
});
it('Shows a pill without relative profits.', () => {
cy.mount(ProfitPill, {
propsData: {
props: {
profitRatio: undefined,
profitAbs: 223,
profitDesc: '',

View File

@ -2,13 +2,13 @@ import ProfitSymbol from '@/components/general/ProfitSymbol.vue';
describe('ProfitSymbol.vue', () => {
it('calculates isProfitable with negative profit', () => {
cy.mount(ProfitSymbol, { propsData: { profit: -0.5 } });
cy.mount(ProfitSymbol, { props: { profit: -0.5 } });
cy.get('div').should('have.class', 'triangle-down');
cy.get('div').should('not.have.class', 'triangle-up');
});
it('calculates isProfitable with positive profit', () => {
cy.mount(ProfitSymbol, { propsData: { profit: 0.5 } });
cy.mount(ProfitSymbol, { props: { profit: 0.5 } });
cy.get('div').should('have.class', 'triangle-up');
cy.get('div').should('not.have.class', 'triangle-down');
});