Releases: testxio/testx
2.11.2
2.11.1
2.11.0
Allow prefixing of object names when adding them.
Let's say in your objects file (my-objects.js) you have an object defined like this
...
coolObj: css("input.thing")
...In your config file, you'd do
testx.objects.add(require("my-objects"), "somePrefix.")and in the tests, you can use it like this
- set:
somePrefix.coolObj: "some text"2.10.0
- Check matches keyword is extended to support checking of attributes. Here is how you'd do it:
- check matches:
myPrettyObject:
title: Something funny
href: httpsThis will check that the title attribute of myPrettyObject object regex matches "Something funny" and the href attribute matches "https".
2.9.2
2.9.1
2.9.0
Added special behaviour for setting check boxes and radio buttons. You can now specify the resulting state of this type of elements or just click them regarding of their current state.
If you specify true as the value to set the checkbox (or radio button) to, testx will make certain that this element is checked . This means that If it is already checked nothing will happen and if it is not, it will be clicked (checked). If you specify false as the resulting state the element will be clicked if it is checked, or if it is unchecked nothing will happen.
If you omit the value (set it to null) the element will be clicked regardless.
Something like this. The example is valid for both check boxes and radio buttons:
- set:
# nothing happens - the elements are already in the state you require
checkboxChecked: true
checkboxUnchecked: false
- set:
# the elements get clicked, their state is set to unchecked and checked respectively
checkboxChecked: false
checkboxUnchecked: true
- set:
# both elements get clicked, regardless of their initial state
checkboxChecked:
checkboxUnchecked:2.8.0
2.7.1
2.7.0
- Allow for invocation of functions with arguments from context. For example, if the test context contains a function test that accepts 1 argument, this is now possible:
- some keyword:
first arg: '{{test("some value")}}'
The function argument doesn't need to be a literal, it can also be a variable from the test context. Essentially the function invocation is evaluated in the current test context.
It is possible to pass arbitrary number of arguments.