-
Notifications
You must be signed in to change notification settings - Fork 2
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
test: add simple integration tests #40
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe recent updates enhance the testing capabilities of the project by introducing new integration tests, a timer management interface, and a UI component for interacting with timers. The changes also refine the project's build management by updating the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant IntegrationView
participant SimpleTimer
Client->>IntegrationView: setStartTime(startTime)
IntegrationView->>SimpleTimer: setStartTime(startTime)
Client->>IntegrationView: start()
IntegrationView->>SimpleTimer: start()
SimpleTimer-->>IntegrationView: Timer started
IntegrationView-->>Client: Timer is running
Client->>IntegrationView: isRunning()
IntegrationView->>SimpleTimer: isRunning()
SimpleTimer-->>IntegrationView: true
IntegrationView-->>Client: Timer is active
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Quality Gate passedIssues Measures |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- .gitignore (1 hunks)
- pom.xml (2 hunks)
- src/test/java/com/flowingcode/addons/simpletimer/integration/AbstractViewTest.java (1 hunks)
- src/test/java/com/flowingcode/addons/simpletimer/integration/IntegrationCallables.java (1 hunks)
- src/test/java/com/flowingcode/addons/simpletimer/integration/IntegrationView.java (1 hunks)
- src/test/java/com/flowingcode/addons/simpletimer/integration/SimpleIT.java (1 hunks)
- src/test/java/com/flowingcode/addons/simpletimer/integration/SimpleTimerElement.java (1 hunks)
Files skipped from review due to trivial changes (1)
- .gitignore
Additional comments not posted (23)
src/test/java/com/flowingcode/addons/simpletimer/integration/IntegrationCallables.java (6)
5-5
: LGTM!The method
setStartTime
is well-defined.
7-7
: LGTM!The method
setEndTime
is well-defined.
9-9
: LGTM!The method
start
is well-defined.
11-11
: LGTM!The method
pause
is well-defined.
13-13
: LGTM!The method
reset
is well-defined.
15-15
: LGTM!The method
isRunning
is well-defined.src/test/java/com/flowingcode/addons/simpletimer/integration/SimpleTimerElement.java (1)
10-13
: LGTM!The method
currentTime
is well-defined and handles null values appropriately.src/test/java/com/flowingcode/addons/simpletimer/integration/IntegrationView.java (6)
19-21
: LGTM!The method
setStartTime
is well-defined and appropriately exposed to the client-side.
25-27
: LGTM!The method
setEndTime
is well-defined and appropriately exposed to the client-side.
31-33
: LGTM!The method
start
is well-defined and appropriately exposed to the client-side.
37-39
: LGTM!The method
pause
is well-defined and appropriately exposed to the client-side.
43-45
: LGTM!The method
reset
is well-defined and appropriately exposed to the client-side.
49-51
: LGTM!The method
isRunning
is well-defined and appropriately exposed to the client-side.src/test/java/com/flowingcode/addons/simpletimer/integration/SimpleIT.java (2)
25-39
: LGTM!The
countDown
method correctly tests the countdown functionality of the timer component.
41-55
: LGTM!The
countUp
method correctly tests the count-up functionality of the timer component.src/test/java/com/flowingcode/addons/simpletimer/integration/AbstractViewTest.java (5)
60-63
: LGTM!The
setupClass
method correctly sets up the WebDriver for Chrome using WebDriverManager.
65-74
: LGTM!The
setup
method correctly initializes the WebDriver and navigates to the test URL based on whether it is using a test hub.
81-83
: LGTM!The
getURL
method correctly constructs the URL for the test route using the deployment hostname and server port.
94-96
: LGTM!The
isUsingHub
method correctly checks if the tests are using a test hub by evaluating a system property.
103-105
: LGTM!The
getDeploymentHostname
method correctly retrieves the deployment hostname based on whether the tests are using a test hub.pom.xml (3)
131-158
: LGTM!The added dependencies for
vaadin-testbench
,license-checker
,hamcrest-library
,webdrivermanager
, andtestbench-rpc
enhance the testing framework.
254-335
: LGTM!The added profile for integration tests is well-configured with the
jetty-maven-plugin
,maven-failsafe-plugin
, andmaven-resources-plugin
.
300-307
: LGTM!The added properties and configurations ensure that the integration tests run smoothly by setting up the necessary environment and dependencies.
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.
I think that test are flaky.
- First time it ended with error because it was not able to wait until frontend build ended, so I first started the demo and waited until the frontend build finished
- Second time ended with error because it was expecting a time to be less and it was exactly equal to the time. Maybe my host is too fast?
- Third time it ended successfully
Anyway for me it is ok.
Summary by CodeRabbit
New Features
Bug Fixes
Chores