Remove duplicate test code - Navigation helpers#3092
Open
labkey-tchad wants to merge 5 commits into
Open
Conversation
# Conflicts: # src/org/labkey/test/tests/BaseAppTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Github epic
SMTestUtilsandBiologicsHelperhave methods for building app URLs (buildAppURL) and navigating within apps (beginAt). These methods are no longer necessary.The custom
beginAtmethods were created beforeWebDriverWrapper.beginAtknew how to handle navigation within our single-page apps.There's no need for separate
buildAppURLmethods between LKB and LKSM so I've moved the methods toWebTestHelperwhere the rest of thebuildURLmethods reside.Numerous existing tests define a
getAppControllerName. I've pulled this method up into a newBaseAppTestclass. This allows the various page objects'beginAtmethods to work across LKB and LKSM. It also defines non-staticbuildAppURLthat uses the tests' appropriate controller.The
@Contract(pure = true)annotation identifies methods that don't have any side-effects. I added it to several methods to help IntelliJ with refactor operations.Related Pull Requests
Changes
buildAppURLmethods intoWebTestHelperBaseAppTestand standardizegetAppControllerName@Contract(pure = true)annotation to numerous methodsTasks