Skip to content
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

Merged
merged 15 commits into from Feb 17, 2020
Merged

Fix some failing tests #15564

merged 15 commits into from Feb 17, 2020

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Feb 13, 2020

  • 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

@sgiehl sgiehl added c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Feb 13, 2020
@sgiehl sgiehl added this to the 4.0.0 milestone Feb 13, 2020
@sgiehl sgiehl changed the title Fix Opt-Out UI tests Fix some failing tests Feb 13, 2020
}

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);
Copy link
Member Author

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,
Copy link
Member Author

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';
Copy link
Member Author

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";}}
Copy link
Member Author

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

@sgiehl sgiehl added the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label Feb 13, 2020
@sgiehl sgiehl force-pushed the fixuitest branch 2 times, most recently from 2ec085b to 2027d24 Compare February 14, 2020 08:29
@sgiehl sgiehl force-pushed the fixuitest branch 2 times, most recently from becd20f to 1b3d901 Compare February 14, 2020 13:30
@sgiehl sgiehl removed the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label Feb 14, 2020
@sgiehl sgiehl added the Needs Review PRs that need a code review label Feb 14, 2020
@sgiehl sgiehl merged commit f16d27e into 4.x-dev Feb 17, 2020
@sgiehl sgiehl deleted the fixuitest branch February 17, 2020 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant