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

[Vue] introduce frontend unit testing for vue & migrate periods.spec.js #18092

Merged
merged 41 commits into from Oct 5, 2021

Conversation

diosmosis
Copy link
Member

@diosmosis diosmosis commented Oct 2, 2021

Description:

This PR is based off #18091. That must be merged first. Or just merge this one and close the other I guess.

  • Introducing jest + jsdom to replace anguarjs unit tests. There was a mocha/karma integration for Vue, but it doesn't work with Vue 3 and no one seems to be working on that. Currently I'm not using chai, though it could be if desired.
  • Run vue tests in travis-ci AngularJS job.
  • Migrate the periods angular service tests to TypeScript + Jest.

image

Review

@diosmosis diosmosis added the Needs Review PRs that need a code review label Oct 2, 2021
@diosmosis diosmosis added this to the 4.6.0 milestone Oct 2, 2021
@tsteur
Copy link
Member

tsteur commented Oct 3, 2021

fyi @diosmosis there's a merge conflict and the tests fail in https://app.travis-ci.com/github/matomo-org/matomo/jobs/540966028#L1375-L1381 The tests itself succeed but some package file seems to not exist?

@diosmosis
Copy link
Member Author

@tsteur / @sgiehl the typescript compiler wasn't behaving the same on travis-ci vs. locally. I found a configuration that works, so it's passing now, but I'm not sure why it behaves differently locally.

@diosmosis
Copy link
Member Author

@tsteur seeing there is now a ReleaseCheckListTest failure due to matomo.zip size. The package-lock.json file is the biggest now, but I think we don't need to include this in the release. What do you think?

@tsteur
Copy link
Member

tsteur commented Oct 4, 2021

@diosmosis indeed we can ignore that one and not include it in the release. Are the tests otherwise passing?

@diosmosis
Copy link
Member Author

@tsteur there are some ui test failures, but they seem unrelated. They're not failing on 4.x-dev though, so re-running the build to see if they're random. Is it ok to merge if they pass?

@diosmosis
Copy link
Member Author

@tsteur looks like some were random. The bulk of the other failures have this error:

         <div class='alert alert-danger'><strong>Error:</strong> curl_exec: SSL certificate problem: certificate has expired. Hostname requested was: plugins.piwik.org</div>

I'll see if I can fix the build in this PR.

@Findus23
Copy link
Member

Findus23 commented Oct 4, 2021

@diosmosis I assume that's still because of the UI tests using Xenial

@diosmosis
Copy link
Member Author

@tsteur build is passing. I've also created a matomo-package pr.

@tsteur
Copy link
Member

tsteur commented Oct 5, 2021

@diosmosis looks good for me to merge. I tested and seemed to work and also had a look through the code. It says though that #18091 needs to be merged first? Is this still the case or we simply merge this PR and close #18091?

@diosmosis
Copy link
Member Author

@tsteur this pr is built on that one, so this can be merged and the other ignored if desired. I only split them apart so they'd be easier to review (if needed).

@diosmosis
Copy link
Member Author

@tsteur can you take a look at ^?

@tsteur
Copy link
Member

tsteur commented Oct 5, 2021

That looks all good to me @diosmosis 👍

@diosmosis
Copy link
Member Author

@tsteur ok, will merge soon

@diosmosis diosmosis merged commit f6ddf36 into 4.x-dev Oct 5, 2021
@diosmosis diosmosis deleted the periods-service-test branch October 5, 2021 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants