Releases: DevExpress/testcafe
v3.4.0-rc.3
What’s Changed
- release: v3.4.0-rc.3 (#8073) @PavelMor25
- refactor: refactor disableConcurrency from function to getter (#8068) @PavelMor25
- fix:
Hide Picker
button fixed for Mac (#8070) @aleks-pro
v3.4.0-rc.2
What’s Changed
- release: v3.4.0-rc.2 (#8065) @PavelMor25
v3.4.0-rc.1
What's Changed
- fix: safari tests by @Aleksey28 in #7973
- refactor: removed IE leftovers fromtest\functional\fixtures\api\es-next by @Aleksey28 in #7967
- refactor: removed IE leftovers from test\functional\fixtures by @Aleksey28 in #7968
- refactor: removed IE leftovers fromtest\functional\fixtures\regression by @Aleksey28 in #7981
- build(deps): bump @adobe/css-tools from 4.3.0-rc.1 to 4.3.1 by @dependabot in #7985
- refactor: removed IE leftovers from test\server by @Aleksey28 in #7989
- refactor: removed IE leftovers from test\functional\legacy-fixtures by @Aleksey28 in #7988
- should log concurrent requests (closes #7977) by @AlexKamaev in #7990
- change stale-bot settings by @AlexKamaev in #7982
- refactor: removed IE leftovers from test\functional by @Aleksey28 in #7993
- refactor: removed IE leftovers from .github and gulp/constants by @Aleksey28 in #7994
- refactor: removed IE leftovers from src\client\automation (part 1) by @Aleksey28 in #7995
- build: updated package-lock by @Aleksey28 in #8009
- refactor: removed IE leftovers from src\client\core\barriers by @Aleksey28 in #7997
- refactor: removed IE leftovers from src\client\automation (part 2) by @Aleksey28 in #7996
- refactor: removed IE leftovers from src\client\core\utils (part 2) by @Aleksey28 in #7999
- refactor: removed IE leftovers from src\client\core by @Aleksey28 in #8000
- refactor: removed IE leftovers from src\client\core\utils (part 1) by @Aleksey28 in #7998
- refactor: removed IE leftovers from src\client by @Aleksey28 in #8001
- refactor: removed IE leftovers from src\others by @Aleksey28 in #8003
- add a test for #7983 (part 1) by @AlexKamaev in #8007
- build: uninstalled saucelabs-connector by @Aleksey28 in #8014
- disabled restart browser in devmode by @PavelMor25 in #8017
- build(deps): bump get-func-name from 2.0.0 to 2.0.2 by @dependabot in #8022
- Update CODEOWNERS by @kirovboris in #8041
- update typescript compiler by @PavelMor25 in #8029
- added relative urls for Role constructor by @PavelMor25 in #8018
- [WIP] add hide/show btn for debugger selector panel by @PavelMor25 in #8013
- added no concurrency flag to fixture by @PavelMor25 in #8021
- added "dispatch touch event" in native automation by @PavelMor25 in #8042
- fix The Test Client (Mobile) by @PavelMor25 in #8044
- Bug template modifications by @titerman in #7992
- build: TRAVIS environment variable for desktop tests disabled by @aleks-pro in #8059
- build: upd babel vesrion by @aleks-pro in #8056
- release: v3.4.0-rc.1 by @PavelMor25 in #8061
- build: bump hammerhead version to 31.6.3 by @PavelMor25 in #8062
New Contributors
- @PavelMor25 made their first contribution in #8017
Full Changelog: v3.3.0...v3.4.0-rc.1
v3.3.0
v3.3.0 (2023-08-29)
TestCafe v3.3.0 includes important bug fixes and quality of life improvements.
Bug Fixes
- TestCafe terminates the test run when it attempts to parse an empty JSON file (#7935).
- Firefox throws an unexpected error when TestCafe attempts to close the browser window (#7285).
- [Native Automation] TestCafe ignores the
--disable-multiple-windows
option when you interact with a link that points to "target=_blank", or open a new window with thewindow.open
method (#7916). - [Native Automation] TestCafe ignores the clientScripts directive when you mock HTTP requests (#7914).
- [Native Automation] TestCafe hangs when it runs tests in the headless version of Google Chrome (#7898).
- [Native Automation] TestCafe doesn't throw an error when the user attempts to enable the
userProfile
option (#7925).
v3.3.0-rc.2
What’s Changed
- fix error message for
:userProfile
(#7972) @AlexKamaev
v3.3.0-rc.1
What’s Changed
- publish: v3.3.0-rc.1 (#7961) @Artem-Babich
- Browsers with "userProfile" option in Native Automation (closes #7925) (#7958) @AlexKamaev
- refactor: removed IE leftovers from test\client (#7964) @Aleksey28
- refactor: removed IE and MS Edge Legacy leftovers from test\client\fixtures (#7960) @Aleksey28
- build(deps): bump flat, gulp-mocha-simple and mocha-reporter-spec-with-retries (#7966) @dependabot
- refactor: removed IE and MS Edge Legacy leftovers from test\client\legacy-fixtures\api (#7962) @Aleksey28
- refactor: removed IE leftovers from test\client\legacy-fixtures (#7963) @Aleksey28
- fix 'legacy test running with the native automation mode' (#7957) @miherlosev
- github-actions: added parallelize client tests (#7959) @Aleksey28
- [WIP] Allow using native automation for pseudo-remote browsers (#7878) @Dmitry-Ostashev
- skip problematic test (#7956) @miherlosev
- native automation: disableMultipleWindows (#7947) @miherlosev
- quick fix for #7285 (closes #7285) (#7950) @AlexKamaev
- fix: fixed codeql vulnerability 19 (#7946) @Aleksey28
- fix: fixed codeql vulnerabilities (#7945) @Aleksey28
- Native Automation: fix test execution stuck in headless (closes #7898) (#7939) @AlexKamaev
- fix client scripts injection + request mocks in NA (closes #7914) (#7948) @AlexKamaev
- should not fail on empty JSON test file (closes #7935) (#7936) @AlexKamaev
- release: updated changelog (#7954) @Aleksey28
v3.2.0
TestCafe v3.2.0 Released
TestCafe v3.2.0 allows you to check whether TestCafe uses native automation to control the browser.
Check your native automation status
The nativeAutomation
property of the t.browser object indicates whether TestCafe uses native automation to control the browser. The property's value is true
when TestCafe uses native automation and false
when TestCafe uses the Hammerhead proxy.
You can check the browser's native automation status before you start the test:
import { Selector } from 'testcafe';
fixture`TestController.browser`
.page`https://example.com`;
test('Native automation check', async t => {
await t.expect(t.browser.nativeAutomation).ok();
//the test continues only if you use native automation
});
Bug Fixes
- TestCafe uses a version of the
error-stack-parser
package that contains a vulnerable dependency (PR #7919 by @sethidden). - TestCafe does not clear cookie storage if a Role activation URL is the same as the page URL (#7874).
- [Native Automation] TestCafe incorrectly processes web pages with file inputs (#7886).
v3.2.0-rc.2
What’s Changed
- 't.browser.nativeAutomation': add type definition (#7951) @miherlosev
v3.2.0-rc.1
What’s Changed
- build: updated package-lock (#7949) @Aleksey28
- release: updated release (v3.2.0-rc.1) (#7944) @Aleksey28
- build: replaced callsite-record (#7937) @Aleksey28
- skip: should rais reportTaskDone handler if browser disconnects for safari (#7938) @Artem-Babich
- fix 'Type error in getTopSameDomainWindow()' (#7934) @miherlosev
- Implement the
t.browser.nativeAutomation
property (#7930) @miherlosev - github-actions: added saving debug logs by default for all functional tests (#7931) @Aleksey28
- refactor: removed IE leftovers from test\client\fixtures\automation (part 2) (#7929) @Aleksey28
- refactor: removed IE leftovers from test\client\fixtures\automation (part1) (#7928) @Aleksey28
- fix: cookies are not cleared after role changing in proxy mode(closes #7874) (#7888) @Artem-Babich
- refactor: removed IE leftovers in test\client\fixtures\automation\content-editable (#7926) @Aleksey28
- build: added package-lock.json (#7924) @Aleksey28
- chore: update error-stack-parser to avoid licensing issues (#7919) @sethidden
v3.1.0
TestCafe v3.1.0 Released
TestCafe v3.1.0 introduces two enhancements:
- You can now respond to geolocation requests with the
t.setNativeDialogHandler
method. - Your tests and test reports can now reference a variable that stores the framework's version number.
Respond to geolocation requests
Main article: t.setNativeDialogHandler
Use the t.setNativeDialogHandler
method to respond to geolocation
requests.
- Return an
Error
type object to Block geolocation requests. - Return an object with coordinates to trigger the
success
callback of the getCurrentPosition method.
// Test
test('Switch from "allow" to "block"', async t => {
await t
.setNativeDialogHandler((type) => {
if (type === 'geolocation')
return { timestamp: 12356, accuracy: 20, coords: {latitude: '34.15321262322903', longitude: '-118.25543996370723'}; // Passes this data to geolocation requests
return null;
});
.click('#buttonGeo')
.setNativeDialogHandler((type) => {
if (type !== 'geolocation')
return null;
const err = new Error('Some error');
err.code = 1;
return err; // Blocks geolocation requests
})
.click('#buttonGeo');
Reference the framework's version in tests and test reports
Main article: Version Logger API
Earlier versions of TestCafe could output the framework's version number to the console:
TestCafe 3.1.0 and up allows you to access the framework's version number in test code:
import { version } from 'testcafe';
console.log(`TestCafe version: ${version}`);
To access the framework's version number in your custom reporter, reference the first argument (version
) of the init
method:
init (version) {
this
.write(`Using TestCafe ${version}`)
.newline()
}
Bug fixes
- TestCafe incorrectly reports test duration in concurrency mode (#1816).
- TestCafe assigns a non-zero duration value to skipped tests, which leads to an unexpected increase in the total test run duration value (#7731).
- [Native Automation] The
setFileUpload
method does not work (#7832). - [Native Automation] Request hooks cause tests to crash (#7846).
- [Native Automation] TestCafe overrides page titles (#7833).
- [Native Automation] If a website redirects the user to a new page before basic HTTP authentication is complete, the authentication process fails (#7852).
- [Native Automation] The
t.click
action fails if the event handler accounts for pointer input pressure (#7867). - [Native Automation] TestCafe hangs when the browser yields a "Session with given ID not found" error (#7865,#7810).
- [Native Automation] TestCafe cannot set the
httpOnly
flag when you use thet.setCookies
method (#7793).