-
Notifications
You must be signed in to change notification settings - Fork 3
Create functional tests #45 #38
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
base: main
Are you sure you want to change the base?
Conversation
* I added the pom.xmls
* I added the pom.xmls
*I added the classes need to interact with the configs from Analytics.Code.COnfiguration and I also added a class that will normalise the jsons from matomo
* I added the scripting service and the MatomoAnalyticsManager
*I added the livetable and everything seems to work okay for the time being.
* I modified the implementations of the JsonNormaliser to be a component and I also added the url + the document reference to the returned json.
* I restructured the packages and replaced the URLBuilder with a proper one.
* I added some comments. The final version of the pr.
* I added an if in the case that I switch back to the getPageTitles API
* I modified the dependencies and removed some parameters.
* I modified how I get the normaliser
* I added 2 tests and modified a few typos.
* I added some functions.
* Renamed the MostViewed hint to MostViewedPages and modified the comments
* Renamed 2 pages and added a test class for MatomoAnalyticsManager
*Changed the name of a file
* I added a test for the MatomoANalyticsManager
* I added new error messages and I updated the comments ona few functions.
* I added the JSON normalizer to transform the Matomo result into a format that can be easily processed in JavaScript for the Chart.js library. I also added two new Velocity macros and the JS code for displaying the evolution.
* I added a test for the RowEvolutionJsonNormaliser and added comments to the javascript code.
* Removed unused variables
* Removed unused livetable fields
* Dosen't work for the time being I can't connect to the matomo application from the testing container.
* Test for the description button
* BACKUP
* Added a few functional tests for the basic operations of the extension.
* Removed a file
mflorea
left a comment
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.
Your code needs significant refactoring. I recommend checking the page objects and tests from XWiki platform to take inspiration from.
application-analytics-test/application-analytics-test-docker/pom.xml
Outdated
Show resolved
Hide resolved
application-analytics-test/application-analytics-test-docker/pom.xml
Outdated
Show resolved
Hide resolved
...ics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/MostViewedMacroViewPages.java
Outdated
Show resolved
Hide resolved
|
|
||
| public class Config | ||
| { | ||
| public static final String DB_CONTAINER_NAME = "farcasut/custom-mysql:latest"; |
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.
The test needs to run on CI. I doubt this custom Docker container is published somewhere, but even if it is, we should use an official container.
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.
The container is currently publicly hosted on Docker Hub, but do you think it would be a better choice to create the container from scratch? Like using the default container and populating the database using the API provided by TestContainers
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.
Long term we should move the container to an xwikisas account on Docker Hub.
...est/application-analytics-test-docker/src/test/it/xwiki/analytics/test/ui/config/Config.java
Outdated
Show resolved
Hide resolved
...est/application-analytics-test-docker/src/test/it/xwiki/analytics/test/ui/config/Config.java
Outdated
Show resolved
Hide resolved
...tion-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/AdminViewPage.java
Outdated
Show resolved
Hide resolved
* -Update the poms.xml -Moved from a class with static methods to a normal one
* - More comments
...-test/application-analytics-test-docker/src/test/it/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...-test/application-analytics-test-docker/src/test/it/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...-test/application-analytics-test-docker/src/test/it/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...-test/application-analytics-test-docker/src/test/it/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...-test/application-analytics-test-docker/src/test/it/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...n-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/HomePageEditPage.java
Outdated
Show resolved
Hide resolved
...test-pageobjects/src/main/java/com/xwiki/analytics/test/po/MostViewedPagesMacroViewPage.java
Outdated
Show resolved
Hide resolved
...-test/application-analytics-test-docker/src/test/it/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...test-pageobjects/src/main/java/com/xwiki/analytics/test/po/MostViewedPagesMacroViewPage.java
Outdated
Show resolved
Hide resolved
...n-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/HomePageEditPage.java
Outdated
Show resolved
Hide resolved
application-analytics-test/application-analytics-test-docker/pom.xml
Outdated
Show resolved
Hide resolved
application-analytics-test/application-analytics-test-docker/pom.xml
Outdated
Show resolved
Hide resolved
|
|
||
| public class Config | ||
| { | ||
| public static final String DB_CONTAINER_NAME = "farcasut/custom-mysql:latest"; |
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.
Long term we should move the container to an xwikisas account on Docker Hub.
...n-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/HomePageViewPage.java
Outdated
Show resolved
Hide resolved
...tion-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/AdminViewPage.java
Outdated
Show resolved
Hide resolved
...tion-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/AdminViewPage.java
Outdated
Show resolved
Hide resolved
...tion-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/AdminViewPage.java
Outdated
Show resolved
Hide resolved
...tion-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/AdminViewPage.java
Outdated
Show resolved
Hide resolved
…hat everything works properly
…it easier to select it.
Added a FindBy to select the elements in the config tab Removed unnecessary imports Renamed classes Modified the URL of the rowevolution request to have the get action insted of the view
Added a wait to avoid flickering
7f090f7 to
05114fe
Compare
...t/application-analytics-test-docker/src/test/it/com/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...t/application-analytics-test-docker/src/test/it/com/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...t/application-analytics-test-docker/src/test/it/com/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...t/application-analytics-test-docker/src/test/it/com/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...t/application-analytics-test-docker/src/test/it/com/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...t/application-analytics-test-docker/src/test/it/com/xwiki/analytics/test/ui/AnalyticsIT.java
Outdated
Show resolved
Hide resolved
...-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/RowEvolutionModal.java
Outdated
Show resolved
Hide resolved
...-analytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/RowEvolutionModal.java
Show resolved
Hide resolved
...ytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/MostViewedPagesElement.java
Outdated
Show resolved
Hide resolved
...ytics-test-pageobjects/src/main/java/com/xwiki/analytics/test/po/MostViewedPagesElement.java
Outdated
Show resolved
Hide resolved
Refactored code, added a new test and improved formatted the code.
No description provided.