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 AutoSuggestAPITest w/ small refactor to API.getSegmentsMetadata & Plugin\Segment #8703

Merged
merged 2 commits into from Sep 3, 2015

Conversation

diosmosis
Copy link
Member

This PR modifies AutoSuggestAPITest (and one or two others) so the data providers do not connect to the database. Changes include:

  • Moving the segments defined in API.getSegmentsMetadata to new Dimension instances that define segments.
  • Creating a new non-API property in Plugin\Segment that will hide the segment from API.getSegmentsMetadata if the current user does not have view access to the requested sites.
  • Modifying tests to go through dimensions to collect all segments instead of using the API method. CustomVariable segments are added manually instead of trying to find the number of columns in the tables.

@mattab or @tsteur please review, not sure what side effects this change will have.

diosmosis added 2 commits September 2, 2015 15:42
…ll defined through Plugin\Segment class in dimensions & make sure AutoSuggestAPITest data providers do not use database.
@diosmosis diosmosis 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. Needs Review PRs that need a code review labels Sep 2, 2015
@diosmosis diosmosis added this to the 2.15.0 milestone Sep 2, 2015
@mattab
Copy link
Member

mattab commented Sep 3, 2015

Fixes #8672

@mattab
Copy link
Member

mattab commented Sep 3, 2015

Looks good to me 👍

mattab pushed a commit that referenced this pull request Sep 3, 2015
Fix AutoSuggestAPITest w/ small refactor to API.getSegmentsMetadata & Plugin\Segment
@mattab mattab merged commit 5793383 into master Sep 3, 2015
@mattab mattab deleted the autosugesst_api_test branch September 3, 2015 01:45
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

2 participants