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

Improve check for dangerous links... #13731

Closed
wants to merge 4 commits into from
Closed

Improve check for dangerous links... #13731

wants to merge 4 commits into from

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Nov 19, 2018

and some other UI test related stuff

@sgiehl sgiehl added the c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. label Nov 19, 2018
@fdellwing
Copy link
Contributor

It might be better to run Array.prototype.indexOf() instead of RegExp.prototype.test(): https://jsperf.com/matomo-org-matomo-13731/1

But I have to admit, the difference is very minor on my system. And the performance gain will cannibalize itself, as soon as you use more wildcards.

@@ -82,11 +82,11 @@ describe("TagManagerTeaser", function () {
});

it('should be possible to disable page and redirect to home', function (done) {
capturePage(done, 'admin_page_disable', function (page) {
expect.page("").contains("#dashboard", function (page) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that change on purpose?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no screenshot name etc... and shouldn't it capture?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. it now only checks if the loaded page has the element #dashboard. Imho there is no need to compare the actual content as a screenshot

@sgiehl sgiehl added the Needs Review PRs that need a code review label Nov 20, 2018
@sgiehl
Copy link
Member Author

sgiehl commented Nov 21, 2018

closing in favor of #13741

@sgiehl sgiehl closed this Nov 21, 2018
@sgiehl sgiehl deleted the dangerouslinks branch November 21, 2018 20:17
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Nov 21, 2018
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

3 participants