-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#208: adds test to check visibility on startup
- Loading branch information
1 parent
f3d6aca
commit 89974fc
Showing
21 changed files
with
103 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
46 changes: 46 additions & 0 deletions
46
app-tests/src/test/scala/app/logorrr/usecases/startup/VisibilityOnStartupTest.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package app.logorrr.usecases.startup | ||
|
||
import app.logorrr.TestFiles | ||
import app.logorrr.io.FileId | ||
import app.logorrr.usecases.SingleFileApplicationTest | ||
import app.logorrr.views.autoscroll.AutoScrollCheckBox | ||
import app.logorrr.views.ops.{ClearLogButton, CopyLogButton, DecreaseBlockSizeButton, IncreaseBlockSizeButton} | ||
import app.logorrr.views.search.{SearchButton, SearchTextField} | ||
import app.logorrr.views.text.toolbaractions.{DecreaseTextSizeButton, IncreaseTextSizeButton} | ||
import org.junit.jupiter.api.Test | ||
import org.testfx.api.FxAssert | ||
import org.testfx.matcher.base.NodeMatchers | ||
|
||
/** | ||
* Tests if all major UI elements are visible with default settings on first startup | ||
*/ | ||
class VisibilityOnStartupTest extends SingleFileApplicationTest(TestFiles.simpleLog0) { | ||
|
||
@Test def checkIfAllMajorUIElementsAreVisibleWithDefaultSettings(): Unit = { | ||
openFile(path) | ||
val fileId = FileId(path) | ||
//wait until UI is ready | ||
|
||
val elements = Seq( | ||
SearchTextField.uiNode(fileId) | ||
, SearchButton.uiNode(fileId) | ||
, DecreaseBlockSizeButton.uiNode(fileId) | ||
, IncreaseBlockSizeButton.uiNode(fileId) | ||
, DecreaseTextSizeButton.uiNode(fileId) | ||
, IncreaseTextSizeButton.uiNode(fileId) | ||
, AutoScrollCheckBox.uiNode(fileId) | ||
, ClearLogButton.uiNode(fileId) | ||
, CopyLogButton.uiNode(fileId) | ||
) | ||
|
||
// check all elements | ||
for (uiElement <- elements) { | ||
waitForVisibility(uiElement) | ||
FxAssert.verifyThat(lookup(uiElement.ref), NodeMatchers.isVisible) | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ import app.logorrr.io.FileId | |
trait HasFileId { | ||
|
||
def fileId: FileId | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/scala/app/logorrr/views/search/SearchActivateRegexToggleButton.scala
This file contains 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
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/scala/app/logorrr/views/search/SearchColorPicker.scala
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.