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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
BudgetMaster
Commits
69817478
Commit
69817478
authored
May 10, 2021
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
#615 - added selenium test
parent
b439539d
No related branches found
No related tags found
No related merge requests found
Pipeline
#4992
passed
May 10, 2021
Stage: external
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/de/deadlocker8/budgetmaster/integration/selenium/AccountTest.java
+19
-0
19 additions, 0 deletions
...ocker8/budgetmaster/integration/selenium/AccountTest.java
with
19 additions
and
0 deletions
src/test/java/de/deadlocker8/budgetmaster/integration/selenium/AccountTest.java
+
19
−
0
View file @
69817478
...
@@ -225,6 +225,25 @@ public class AccountTest
...
@@ -225,6 +225,25 @@ public class AccountTest
assertThat
(
icons
).
isEmpty
();
assertThat
(
icons
).
isEmpty
();
}
}
@Test
public
void
test_readOnly_preventNewTransaction
()
{
TransactionTestHelper
.
selectGlobalAccountByName
(
driver
,
"read only account"
);
driver
.
get
(
helper
.
getUrl
()
+
"/transactions"
);
WebDriverWait
wait
=
new
WebDriverWait
(
driver
,
5
);
wait
.
until
(
ExpectedConditions
.
visibilityOfElementLocated
(
By
.
id
(
"modalFilterTrigger"
)));
assertThat
(
driver
.
findElements
(
By
.
id
(
"button-new-transaction"
))).
isEmpty
();
// try to open new transaction page
driver
.
get
(
helper
.
getUrl
()
+
"/transactions/newTransaction/normal"
);
wait
=
new
WebDriverWait
(
driver
,
5
);
wait
.
until
(
ExpectedConditions
.
visibilityOfElementLocated
(
By
.
id
(
"modalFilterTrigger"
)));
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
)
{
{
// icons
// icons
...
...
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