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

XWIKI-22582: Add automated test for "Switch between Icon Themes" #3628

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Nov 7, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-22582

Changes

Description

  • Added the automated test

Clarifications

  • I went with the straightforward solution of using the webDriver in the test directly to check for the icon. Adding such a function on the Breadcrumb WebElement would look a bit out of left field. I don't mind having to switch solution if needed.
  • The test could be more refined, but for this ticket there's no need to add that many extra step. It's already more than what the manual test covered.
  • In ThemesAdministrationSectionPage.java, I tried to avoid duplicated code. However I did not provide much more architecture here because there's only two kinds of themes, and I expect it to be only two kinds for quite a while.

Screenshots & Video

None, test change only

Executed Tests

Successfully passed mvn clean install -f xwiki-platform-core/xwiki-platform-icon/xwiki-platform-icon-test/xwiki-platform-icon-test-docker. Other tests should not be impacted by the changes.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • None.

* Tried to add a new test

(WIP, right now the test fails because the Administration extension is not loaded)
* Fixed the setup. The adminUI should not be only in the test scope. It's probably because we need to build the WAR and THEN only we test. We want this adminUI in the WAR.
* Fixed the test.

Note: I don't think it's correct to use the driver directly in the test, but the use case here is very specific. I use the fact that there's always an icon in the breadcrumb (home-first item) to check the state of the iconTheme.
* Reverted non needed changes
* Cleaned up the test class
@Sereza7 Sereza7 marked this pull request as ready for review November 8, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants