Changelog
v0.15.0 (2017-4-26)
Plugins for React and Vue.js, TestCafe Docker image, support for Internet access proxies and lots of bug fixes.
We have changed the way the withText method behaves when it is called in a chain.
const el = Selector('div').withText('This is').withText('my element');
In previous versions, this selector searched for a div
with text my element
because the second call to withText
overrode the first one.
Now this code returns an element whose text contains both This is
and my element
as the second call compounds with the first one.
In this release cycle, we have created a plugin for testing React applications. This plugin allows you to select React components by their names.
import ReactSelector from 'testcafe-react-selector';
const TodoList = ReactSelector('TodoApp TodoList');
const itemsCountStatus = ReactSelector('TodoApp div');
const itemsCount = ReactSelector('TodoApp div span');
And it enables you to get React component's state
and props
.
import ReactSelector from 'testcafe-react-selector';
fixture `TODO list test`
.page('http://localhost:1337');
test('Check list item', async t => {
const el = ReactSelector('TodoList');
await t.expect(el.getReact().props.priority).eql('High');
await t.expect(el.getReact().state.isActive).eql(false);
});
To learn more, see the testcafe-react-selectors repository.
Changelog
v0.14.0 (2017-3-28)
Authentication via user roles, client-side debugging and numerous bug fixes.