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
Fix some failing tests #15564
Fix some failing tests #15564
Conversation
sgiehl
commented
Feb 13, 2020
•
edited
edited
- Opt-Out UI test was currently failing as the https warning is displayed. That didn't show up in build artifacts as the same screenshot name was reused
} | ||
|
||
async function loginUser(username, doAuth) | ||
{ | ||
// make sure to log out previous session | ||
await page.goto(logoutUrl); | ||
|
||
var cookies = await page.cookies(); | ||
cookies.forEach(cookie => { | ||
page.deleteCookie(cookie); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems in tests logging out doesn't kill cookies, and so the some session data is still available. That caused some 2fa tests to fail, as the password verify was still stored and not triggered again
expect(await page.screenshotSelector('.usersManager')).to.matchImage('permissions_edit'); | ||
expect(await page.screenshotSelector('.usersManager')).to.matchImage({ | ||
imageName: 'permissions_edit', | ||
comparisonThreshold: 0.0005, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this and the following tests often failed randomly as some pixels of the permission boxes and drop downs were slightly different. Adding that small threshold shouldn't hurt, but they should fail less often
@@ -77,7 +77,7 @@ | |||
class Fixture extends \PHPUnit_Framework_Assert | |||
{ | |||
const IMAGES_GENERATED_ONLY_FOR_OS = 'linux'; | |||
const IMAGES_GENERATED_FOR_PHP = '5.6'; | |||
const IMAGES_GENERATED_FOR_PHP = '7.2'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of that some scheduled report tests were not executed at all. Adjusted the expected files as well, so the tests pass again :-)
a:5:{i:2008;a:0:{}i:2009;a:0:{}i:2010;a:0:{}i:2011;a:0:{}i:2012;a:9:{s:9:"nb_visits";d:311;s:10:"nb_actions";d:708;s:19:"nb_visits_converted";d:245;s:12:"bounce_count";d:166;s:16:"sum_visit_length";d:96791;s:11:"max_actions";d:20;s:11:"bounce_rate";s:3:"53%";s:20:"nb_actions_per_visit";d:2.3;s:16:"avg_time_on_site";s:9:"5 min 11s";}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess that changed due to the php version change
2ec085b
to
2027d24
Compare
becd20f
to
1b3d901
Compare