Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cucumber-runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gitlab-classrooms
cucumber-runner
Commits
b0017c9c
Verified
Commit
b0017c9c
authored
1 year ago
by
Julien Wittouck
Browse files
Options
Downloads
Patches
Plain Diff
: use assertThat
parent
820c8b32
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/univlille/gitlab/sra12023/cucumberrunner/selenium/AssertionMethods.java
+7
-4
7 additions, 4 deletions
...ab/sra12023/cucumberrunner/selenium/AssertionMethods.java
with
7 additions
and
4 deletions
src/main/java/fr/univlille/gitlab/sra12023/cucumberrunner/selenium/AssertionMethods.java
+
7
−
4
View file @
b0017c9c
...
...
@@ -7,6 +7,7 @@ import org.openqa.selenium.support.ui.Select;
import
java.util.List
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
fail
;
public
class
AssertionMethods
extends
SelectElementByType
implements
BaseTest
{
...
...
@@ -34,11 +35,13 @@ public class AssertionMethods extends SelectElementByType implements BaseTest {
String
pageTitle
=
getPageTitle
();
if
(
testCase
)
{
if
(!
pageTitle
.
equals
(
title
))
fail
(
"Page Title Not Matched, Actual Page Title : "
+
pageTitle
);
assertThat
(
pageTitle
)
.
as
(
"check page title"
)
.
isEqualTo
(
title
);
}
else
{
if
(
pageTitle
.
equals
(
title
))
fail
(
"Page Title Matched, Actual Page Title : "
+
pageTitle
);
assertThat
(
pageTitle
)
.
as
(
"check page title"
)
.
isNotEqualTo
(
title
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment