Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Create pricelist_with_currency_CHF_and_precision_3_spec.js #310

Merged
merged 4 commits into from Aug 16, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,29 @@
import { PriceList } from '../../support/utils/pricelist';
import { Pricesystem } from '../../support/utils/pricesystem';
import { humanReadableNow } from '../../support/utils/utils';

describe('Create Pricelist for Automatic End2End Tests with cypress https://github.com/metasfresh/metasfresh-e2e/issues/195', function() {
solovmon marked this conversation as resolved.
Show resolved Hide resolved
const date = humanReadableNow();
const priceSystemName = `TestPriceSystem ${date}`;
const priceListName = `TestPriceList ${date}`;
it('Create new Pricesystem', function() {
cy.fixture('price/pricesystem.json').then(priceSystemJson => {
Object.assign(new Pricesystem(), priceSystemJson)
.setName(priceSystemName)
.apply();
});
});

it('Create new Pricelist with currency CHF and precision 3', function() {
cy.fixture('price/pricelist.json').then(pricelistJson => {
Object.assign(new PriceList(), pricelistJson)
.setName(priceListName)
.setPriceSystem(priceSystemName)
.setCountry(`Switzerland`)
TheBestPessimist marked this conversation as resolved.
Show resolved Hide resolved
.setCurrency(`CHF`)
.setPricePrecision(3)
.setIsSalesPriceList(true)
.apply();
});
});
});