Atm we use fixtures in most of our tests; however, they are set at the beginning of the test but get overwritten later on with randomized values (usually sth like e.g. "TestName" plus Timestamp).
To adapt the tests to customer data, we need to make sure that the fixtures are not overwritten at some point in the test, so that we can use customer-specific fixtures (plus Timestamp, so that the tests can run >1 time).
For that,
the fixtures we have atm need to be renamed: the fixture shall have the same name as the test (e.g. taxrate.json becomes taxrate_setup_spec.json)
the objects used in the tests need to be adapted
the tests need to be adapted
⚠️ The test that i modified for the drafts is: cypress/integration/price/add_a_product_to_a_pricelist_schema_and_create_a_new_PLV.js (check it to see how many things have to be changed in either variant)
Todo for developer (besides coding)
Always make sure the issue is in the correct project lane
I think we can close this issue now, since both me and @cristinastefan90 have moved (pretty much?) all the tests to use data from fixtures instead of harcoded data.
Test shall include:
Atm we use fixtures in most of our tests; however, they are set at the beginning of the test but get overwritten later on with randomized values (usually sth like e.g. "TestName" plus Timestamp). To adapt the tests to customer data, we need to make sure that the fixtures are not overwritten at some point in the test, so that we can use customer-specific fixtures (plus Timestamp, so that the tests can run >1 time).
For that,
⚠️ The test that i modified for the drafts is:
cypress/integration/price/add_a_product_to_a_pricelist_schema_and_create_a_new_PLV.js
(check it to see how many things have to be changed in either variant)Todo for developer (besides coding)
master
[ ] Draft 1:Use a FAT FIXTURE containing all the data needed in a test in a single fixture
: https://github.com/metasfresh/metasfresh-e2e/pull/293 (very difficult to use)Use a minimal fixture for customer-specific data only
: https://github.com/metasfresh/metasfresh-e2e/pull/295 (easy to use and with minimal changes)All Flags are ticked? Congratulations, you have delivered!