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

Add functional tests #16 #25

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

ChiuchiuSorin
Copy link
Collaborator

Create functional tests for Admin Tools

* Created the test modules and structures
@ChiuchiuSorin ChiuchiuSorin added this to the 1.0 milestone Nov 7, 2023
@ChiuchiuSorin ChiuchiuSorin self-assigned this Nov 7, 2023
* Fixed functional test errors regarding the server initialization
* Created AdminToolsViewPage class to access the info from the WebHome
* Refactored the server identification code to fix a bug where the incorect server is detected
* Adapted the tests
* Added functional tests for WebHome
* Added functional tests for modals
* Modified code to correct errors found using functional tests
* Fixed licensing compatibility issues
@ChiuchiuSorin ChiuchiuSorin marked this pull request as ready for review November 17, 2023 14:53
@ChiuchiuSorin
Copy link
Collaborator Author

ChiuchiuSorin commented Nov 17, 2023

Currently having an issue with the following test at line 112. The issue is that the application is not seen in the Applications panel, but I'm not sure what causes it. I'm thinking it may be a missing dependency, but I did not identify what may be missing.

Error log: https://up1.xwikisas.com/#GN9TRHXpO49fjt0odyRZsw
Test screenshot:
image

EDIT: I removed this testing part and created a new issue #37 for solving the application panel issue.

@oanalavinia oanalavinia removed this from the 1.0 milestone Nov 23, 2023
Comment on lines +154 to +155
switchToNewTab(testUtils, mainWindowHandle);
testUtils.getDriver().switchTo().window(mainWindowHandle);
Copy link

Choose a reason for hiding this comment

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

Why do you need to switch tabs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need to manually switch tabs to verify the opened content, as Selenium does not change focus when a tab is opened. I had a comment explaining this but did not offer a lot of details.

@ChiuchiuSorin ChiuchiuSorin marked this pull request as draft December 12, 2023 13:08
* Modified comments
* Split AdminToolsViewPage in different classes specialized in different dashboard sections
* Modified Page object selectors
* Added test execution condition
* Modifed page objects functions and interaction
* Modified comments
* Modified execution condition
* Removed test for application panel as it is currently not working (will create a separate issue to address this)
* Code refactoring
@ChiuchiuSorin ChiuchiuSorin marked this pull request as ready for review December 14, 2023 08:29
* Merged main branch
* Added test for application pannel
# Conflicts:
#	application-admintools-default/src/main/resources/templates/configurationTemplate.vm
#	application-admintools-default/src/main/resources/templates/filesSectionTemplate.vm
#	application-admintools-default/src/main/resources/templates/securityTemplate.vm
#	application-admintools-default/src/test/java/com/xwiki/admintools/internal/data/ConfigurationDataProviderTest.java
#	application-admintools-ui/src/main/resources/AdminTools/Code/Translations.xml
* modified tests
* modified translations
# Conflicts:
#	application-admintools-default/src/main/resources/templates/configurationTemplate.vm
#	application-admintools-ui/src/main/resources/AdminTools/Code/Translations.xml
# Conflicts:
#	application-admintools-default/src/main/java/com/xwiki/admintools/internal/data/ConfigurationDataProvider.java
#	application-admintools-default/src/main/java/com/xwiki/admintools/internal/data/identifiers/CurrentServer.java
#	application-admintools-default/src/main/java/com/xwiki/admintools/internal/data/identifiers/TomcatInfo.java
#	application-admintools-default/src/test/java/com/xwiki/admintools/internal/data/ConfigurationDataProviderTest.java
#	application-admintools-default/src/test/java/com/xwiki/admintools/internal/data/identifiers/CurrentServerTest.java
* Solved merge conflicts
# Conflicts:
#	application-admintools-default/src/main/resources/templates/configurationTemplate.vm
#	application-admintools-default/src/main/resources/templates/filesSectionTemplate.vm
# Conflicts:
#	application-admintools-default/src/main/resources/templates/configurationTemplate.vm
#	application-admintools-default/src/main/resources/templates/filesSectionTemplate.vm
* Solved merge issues
# Conflicts:
#	application-admintools-default/src/main/java/com/xwiki/admintools/internal/data/identifiers/CurrentServer.java
#	application-admintools-default/src/main/resources/templates/configurationTemplate.vm
#	application-admintools-default/src/main/resources/templates/filesSectionTemplate.vm
#	application-admintools-default/src/test/java/com/xwiki/admintools/internal/data/ConfigurationDataProviderTest.java
#	application-admintools-default/src/test/java/com/xwiki/admintools/internal/data/identifiers/CurrentServerTest.java
#	application-admintools-default/src/test/java/com/xwiki/admintools/internal/data/identifiers/TomcatInfoTest.java
* removed unnecessary code
* code refactoring
# Conflicts:
#	application-admintools-ui/src/main/resources/AdminTools/Code/Translations.xml
# Conflicts:
#	application-admintools-default/src/main/java/com/xwiki/admintools/internal/AdminToolsEventListener.java
* added tests for health check section
* started tests for instance usage section
* added tests for instance usage section
* added comments
* updated test poms version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants