-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests failing on Safari after upgrading to v3.7.0 #8348
Comments
Hello, thank you for reaching out to us. Updating from v1.18.0 to v3.7.0 is a big leap between 2 major versions. Breaking changes like the one you encountered are possible. However, the described behavior is expected because cookies are not preserved between test runs. As a workaround, you can use a Fixture.beforeEach hook to accept cookies before each test run.
In addition, you can also use User Roles for an easier authentication process. |
Just to clarify, the problem is not even happening between different test runs, but is happening in the same test run. The cookie banner simply keep appearing on top of other elements causing the test to fail. Also, the tests run as expected on other browsers (Firefox, Chrome and Edge) |
We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news. |
On TestCafe version 2.2.0 the cookie banner behaves as expected, starting with v2.3.0 the issue described by @etshi occurs. In v2.2.0 after clicking the cookie banner I can see the session cookie being set in the browser, starting with v2.3.0 and higher the cookie is no longer set. |
Hello @bognix, Thank you for sharing this information. It will help us investigate this issue further. |
What is your Scenario?
On a cookie banner click accept all cookies which will make the banner not show again for the rest of the test scenario
What is the Current behavior?
Only on Safari and after upgrading from testcafe v1.18.0 to v3.7.0 the cookie banner keeps re-appearing.
It was working as expected in v1.18.0 before the upgrade
What is the Expected behavior?
On a cookie banner click accept all cookies which will make the banner not show again for the rest of the test scenario
What is the public URL of the test page? (attach your complete example)
https://github.com/etshi/Testcafe-example/tree/main
What is your TestCafe test code?
import { Selector } from 'testcafe';
fixture('Minimal Working Example')
.page('https://staging.app.cargo.one');
test('Click buttons on cargo.one staging', async t => {
// Accept cookies
const acceptCookiesButton = Selector('.iubenda-cs-accept-btn');
await t
.click(acceptCookiesButton)
.wait(2000); // Wait for 2 seconds
// Click on login button
const loginButton = Selector('#btn-login-password');
await t.click(loginButton);
});
Your complete configuration file
{
"selectorTimeout": 10000,
"assertionTimeout": 10000,
"skipUncaughtErrors": true,
"skipJsErrors": true,
"stopOnFirstFail": true,
"disableNativeAutomation": true,
"quarantineMode": { "successThreshold": 1, "attemptLimit": 6 }
}v
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
TestCafe version
3.7.0
Node.js version
18.20.4
Command-line arguments
testcafe safari ./test.js
Browser name(s) and version(s)
Safari v17.6
Platform(s) and version(s)
No response
Other
No response
The text was updated successfully, but these errors were encountered: