Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BudgetMaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
BudgetMaster
Commits
8b7aa33f
Commit
8b7aa33f
authored
1 year ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
#765 - fix selenium tests
parent
c7b336d7
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
BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/AccountTest.java
+11
-8
11 additions, 8 deletions
...ocker8/budgetmaster/integration/selenium/AccountTest.java
with
11 additions
and
8 deletions
BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/AccountTest.java
+
11
−
8
View file @
8b7aa33f
...
...
@@ -53,7 +53,7 @@ class AccountTest extends SeleniumTestBase
final
String
name
=
columns
.
get
(
2
).
getText
();
if
(
name
.
equals
(
"zzzz"
))
{
columns
.
get
(
3
).
findElements
(
By
.
tagName
(
"a"
)).
get
(
1
).
click
();
columns
.
get
(
4
).
findElements
(
By
.
tagName
(
"a"
)).
get
(
1
).
click
();
WebDriverWait
wait
=
new
WebDriverWait
(
driver
,
Duration
.
ofSeconds
(
5
));
wait
.
until
(
ExpectedConditions
.
textToBePresentInElementLocated
(
By
.
cssSelector
(
".modal-content h4"
),
"Delete Account"
));
...
...
@@ -122,12 +122,12 @@ class AccountTest extends SeleniumTestBase
List
<
WebElement
>
accountRows
=
driver
.
findElements
(
By
.
cssSelector
(
".account-container tr"
));
assertThat
(
accountRows
).
hasSize
(
6
);
assertAccountColumns
(
accountRows
.
get
(
0
).
findElements
(
By
.
tagName
(
"td"
)),
true
,
true
,
AccountState
.
FULL_ACCESS
,
"Default Account"
);
assertAccountColumns
(
accountRows
.
get
(
1
).
findElements
(
By
.
tagName
(
"td"
)),
true
,
false
,
AccountState
.
FULL_ACCESS
,
"DefaultAccount0815"
);
assertAccountColumns
(
accountRows
.
get
(
2
).
findElements
(
By
.
tagName
(
"td"
)),
false
,
false
,
AccountState
.
HIDDEN
,
"hidden account"
);
assertAccountColumns
(
accountRows
.
get
(
3
).
findElements
(
By
.
tagName
(
"td"
)),
false
,
false
,
AccountState
.
READ_ONLY
,
"read only account"
);
assertAccountColumns
(
accountRows
.
get
(
4
).
findElements
(
By
.
tagName
(
"td"
)),
true
,
false
,
AccountState
.
FULL_ACCESS
,
"sfsdf"
);
assertAccountColumns
(
accountRows
.
get
(
5
).
findElements
(
By
.
tagName
(
"td"
)),
false
,
false
,
AccountState
.
READ_ONLY
,
name
);
assertAccountColumns
(
accountRows
.
get
(
0
).
findElements
(
By
.
tagName
(
"td"
)),
true
,
true
,
AccountState
.
FULL_ACCESS
,
"Default Account"
,
""
);
assertAccountColumns
(
accountRows
.
get
(
1
).
findElements
(
By
.
tagName
(
"td"
)),
true
,
false
,
AccountState
.
FULL_ACCESS
,
"DefaultAccount0815"
,
""
);
assertAccountColumns
(
accountRows
.
get
(
2
).
findElements
(
By
.
tagName
(
"td"
)),
false
,
false
,
AccountState
.
HIDDEN
,
"hidden account"
,
""
);
assertAccountColumns
(
accountRows
.
get
(
3
).
findElements
(
By
.
tagName
(
"td"
)),
false
,
false
,
AccountState
.
READ_ONLY
,
"read only account"
,
""
);
assertAccountColumns
(
accountRows
.
get
(
4
).
findElements
(
By
.
tagName
(
"td"
)),
true
,
false
,
AccountState
.
FULL_ACCESS
,
"sfsdf"
,
""
);
assertAccountColumns
(
accountRows
.
get
(
5
).
findElements
(
By
.
tagName
(
"td"
)),
false
,
false
,
AccountState
.
READ_ONLY
,
name
,
""
);
}
@Test
...
...
@@ -372,7 +372,7 @@ class AccountTest extends SeleniumTestBase
assertThat
(
driver
.
findElement
(
By
.
cssSelector
(
".notification.background-yellow"
)).
isDisplayed
()).
isTrue
();
}
public
static
void
assertAccountColumns
(
List
<
WebElement
>
columns
,
boolean
isDefaultIconVisible
,
boolean
isDefaultIconSelected
,
AccountState
expectedAccountState
,
String
name
)
public
static
void
assertAccountColumns
(
List
<
WebElement
>
columns
,
boolean
isDefaultIconVisible
,
boolean
isDefaultIconSelected
,
AccountState
expectedAccountState
,
String
name
,
String
description
)
{
// icons
final
List
<
WebElement
>
icons
=
columns
.
get
(
0
).
findElements
(
By
.
tagName
(
"i"
));
...
...
@@ -415,6 +415,9 @@ class AccountTest extends SeleniumTestBase
// name
assertThat
(
columns
.
get
(
2
)).
hasFieldOrPropertyWithValue
(
"text"
,
name
);
// description
assertThat
(
columns
.
get
(
3
)).
hasFieldOrPropertyWithValue
(
"text"
,
description
);
}
private
void
setAccountState
(
int
accountID
,
AccountState
accountState
)
...
...
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