Comparing version 0.10.0-rc1 to 0.10.0
112
CHANGELOG.md
# Changelog | ||
## v0.10.0 (2016-11-8) | ||
### Enhancements | ||
* **Snapshot API shorthands. ([#771](https://github.com/DevExpress/testcafe/issues/771))** | ||
Previously, if you needed to use a single property from the snapshot, you had to introduce two assignments | ||
```js | ||
const snapshot = await selector(); | ||
const nodeType = snapshot.nodeType; | ||
``` | ||
or additional parentheses. | ||
```js | ||
const nodeType = (await selector()).nodeType; | ||
``` | ||
Now snapshot methods and property getters are exposed by selectors | ||
(and selector promises as well) so that you can write more compact code. | ||
```js | ||
const nodeType = await selector.nodeType; | ||
// or | ||
const nodeType = await selector('someParam').nodeType; | ||
``` | ||
However, shorthand properties do not allow you to omit parentheses when working with dictionary properties | ||
like `style`, `attributes` or `boundingClientRect`. | ||
```js | ||
const width = (await selector.style)['width']; | ||
``` | ||
That is why we have also introduced shorthand methods for these dictionaries: `getStyleProperty`, `getAttribute` and `getBoundingClientRectProperty`. | ||
```js | ||
const width = await selector.getStyleProperty('width'); | ||
const id = await selector.getAttribute('id'); | ||
const left = await selector.getBoundingClientRectProperty('left'); | ||
``` | ||
Finally, we have added the `hasClass` method. | ||
```js | ||
if (await selector.hasClass('foo')) { | ||
//... | ||
} | ||
``` | ||
See [Snapshot API Shorthands](https://devexpress.github.io/testcafe/documentation/test-api/selecting-page-elements/selectors.html#snapshot-api-shorthands). | ||
* **Improved automatic wait mechanism. ([#245](https://github.com/DevExpress/testcafe/issues/245))** | ||
We got rid of unnecessary waiting so that tests now run almost two times faster. | ||
![Tests running in v0.10.0 vs v0.9.0](https://raw.githubusercontent.com/DevExpress/testcafe/master/media/new-0-10-0-autowait.gif) | ||
* **Test execution speed control. ([#938](https://github.com/DevExpress/testcafe/issues/938))** | ||
We have introduced an option that allows you to specify how fast tests run. | ||
By default, tests run at the maximum speed. However, if you need to watch a test running to understand what happens in it, | ||
this speed may seem too fast. In this instance, use the new `speed` option to slow the test down. | ||
This option is available from the command line | ||
```sh | ||
testcafe chrome my-tests --speed 0.1 | ||
``` | ||
and from the API. | ||
```js | ||
await runner.run({ | ||
speed: 0.1 | ||
}) | ||
``` | ||
You can use factor values between `1` (the fastest, used by default) and `0.01` (the slowest). | ||
* **`t.maximizeWindow` test action. ([#812](https://github.com/DevExpress/testcafe/issues/812))** | ||
We have added a test action that maximizes the browser window. | ||
```js | ||
import { expect } from 'chai'; | ||
import { Selector } from 'testcafe'; | ||
const menu = Selector('#side-menu'); | ||
fixture `My fixture` | ||
.page `http://www.example.com/`; | ||
test('Side menu is displayed in full screen', async t => { | ||
await t.maximizeWindow(); | ||
expect(await menu.visible).to.be.ok; | ||
}); | ||
``` | ||
### Bug Fixes | ||
* The `t.resizeWindow` and `t.resizeWindowToFitDevice` actions now work correctly on macOS ([#816](https://github.com/DevExpress/testcafe/issues/816)) | ||
* Browser aliases are now case insensitive in the command line ([#890](https://github.com/DevExpress/testcafe/issues/890)) | ||
* Tests no longer hang if target scrolling coordinates are fractional ([#882](https://github.com/DevExpress/testcafe/issues/882)) | ||
* The 'Element is not visible' error is no longer raised when scrolling a document in Quirks mode ([#883](https://github.com/DevExpress/testcafe/issues/883)) | ||
* `<table>` child elements are now focused correctly ([#889](https://github.com/DevExpress/testcafe/issues/889)) | ||
* The page is no longer scrolled to the parent element when focusing on a non-focusable child during click automation ([#913](https://github.com/DevExpress/testcafe/issues/913)) | ||
* Browser auto-detection now works with all the Linux distributions ([#104](https://github.com/DevExpress/testcafe-browser-tools/issues/104), | ||
[#915](https://github.com/DevExpress/testcafe/issues/915)) | ||
## v0.9.0 (2016-10-18) | ||
:tada: Initial release :tada: |
@@ -11,5 +11,5 @@ 'use strict'; | ||
resizeNotSupportedByBrowserProvider: 'The window resize functionality is not supported by the "{providerName}" browser provider.', | ||
maximizeNotSupportedByBrowserProvider: 'The maximize functionality is not supported by the "{providerName}" browser provider.', | ||
maximizeNotSupportedByBrowserProvider: 'The window maximization functionality is not supported by the "{providerName}" browser provider.', | ||
resizeError: 'Was unable to resize the window due to an error.\n\n{errMessage}' | ||
}; | ||
module.exports = exports['default']; |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.10.0-rc1", | ||
"version": "0.10.0", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "name": "Developer Express Inc.", |
@@ -21,3 +21,3 @@ <h1 align="center"> | ||
TestCafe is a pure node.js solution for testing web apps. It takes care of all the stages: starting browsers, running tests, gathering test results and generating reports. TestCafe doesn’t need browser plugins - it works in all popular modern browsers out-of-the-box. | ||
TestCafe is a pure node.js end-to-end solution for testing web apps. It takes care of all the stages: starting browsers, running tests, gathering test results and generating reports. TestCafe doesn’t need browser plugins - it works in all popular modern browsers out-of-the-box. | ||
@@ -92,2 +92,3 @@ ![Install TestCafe and Run a Test](https://raw.githubusercontent.com/DevExpress/testcafe/master/media/install-and-run-test.gif) | ||
```js | ||
import { expect } from 'chai'; | ||
import { Selector } from 'testcafe'; | ||
@@ -94,0 +95,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
797641
323