v0.23.1 (2018-11-7)
Enhancements
⚙️ Select Tests and Fixtures to Run by Their Metadata (#2527) by @NickCis
You can now run only those tests or fixtures whose metadata contains a specific set of values.
Use the --test-meta flag to specify values to look for in test metadata.
testcafe chrome my-tests --test-meta device=mobile,env=productionTo select fixtures by their metadata, use the --fixture-meta flag.
testcafe chrome my-tests --fixture-meta subsystem=payments,type=regressionIn the API, test and fixture metadata is now passed to the runner.filter method in the testMeta and fixtureMeta parameters. Use this metadata to decide whether to run the current test.
runner.filter((testName, fixtureName, fixturePath, testMeta, fixtureMeta) => {
return testMeta.mobile === 'true' &&
fixtureMeta.env === 'staging';
});⚙️ Run Dynamically Loaded Tests (#2074)
You can now run tests imported from external libraries or generated dynamically even if the .js file you provide to TestCafe does not contain any tests.
Previously, this was not possible because TestCafe required test files to contain the fixture and test directives. Now you can bypass this check. To do this, provide the --disable-test-syntax-validation command line flag.
testcafe safari test.js --disable-test-syntax-validationIn the API, use the disableTestSyntaxValidation option.
runner.run({ disableTestSyntaxValidation: true })Bug Fixes
- Touch events are now simulated with correct touch properties (
touches,targetTouches,changedTouches) (#2856) - Google Chrome now closes correctly on macOS after tests are finished (#2860)
- Internal attribute and node changes no longer provoke
MutationObservernotifications (testcafe-hammerhead/#1769) - The
ECONNABORTEDerror is no longer raised (testcafe-hammerhead/#1744) - Websites that use
Location.ancestorOriginsare now proxied correctly (testcafe-hammerhead/#1342)