Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b98fbe8c
Commit
b98fbe8c
authored
Jan 28, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rspec wait_for_requests helper waits for graphQL requests
Review feedback
parent
c9931302
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
ee/spec/features/boards/swimlanes/epics_swimlanes_sidebar_spec.rb
...features/boards/swimlanes/epics_swimlanes_sidebar_spec.rb
+22
-5
No files found.
ee/spec/features/boards/swimlanes/epics_swimlanes_sidebar_spec.rb
View file @
b98fbe8c
...
@@ -23,15 +23,11 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -23,15 +23,11 @@ RSpec.describe 'epics swimlanes sidebar', :js do
visit
project_boards_path
(
project
)
visit
project_boards_path
(
project
)
wait_for_requests
wait_for_requests
page
.
within
(
'.board-swimlanes-toggle-wrapper'
)
do
page
.
find
(
'.dropdown-toggle'
).
click
page
.
find
(
'.dropdown-item'
,
text:
'Epic'
).
click
end
end
end
context
'notifications subscription'
do
context
'notifications subscription'
do
it
'displays notifications toggle'
do
it
'displays notifications toggle'
do
load_epic_boards
click_first_issue_card
click_first_issue_card
page
.
within
(
'[data-testid="sidebar-notifications"]'
)
do
page
.
within
(
'[data-testid="sidebar-notifications"]'
)
do
...
@@ -42,6 +38,7 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -42,6 +38,7 @@ RSpec.describe 'epics swimlanes sidebar', :js do
end
end
it
'shows toggle as on then as off as user toggles to subscribe and unsubscribe'
do
it
'shows toggle as on then as off as user toggles to subscribe and unsubscribe'
do
load_epic_boards
click_first_issue_card
click_first_issue_card
toggle
=
find
(
'[data-testid="notification-subscribe-toggle"]'
)
toggle
=
find
(
'[data-testid="notification-subscribe-toggle"]'
)
...
@@ -58,6 +55,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -58,6 +55,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
context
'when notifications have been disabled'
do
context
'when notifications have been disabled'
do
before
do
before
do
project
.
update_attribute
(
:emails_disabled
,
true
)
project
.
update_attribute
(
:emails_disabled
,
true
)
load_epic_boards
end
end
it
'displays a message that notifications have been disabled'
do
it
'displays a message that notifications have been disabled'
do
...
@@ -73,6 +72,7 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -73,6 +72,7 @@ RSpec.describe 'epics swimlanes sidebar', :js do
context
'time tracking'
do
context
'time tracking'
do
it
'displays time tracking feature with default message'
do
it
'displays time tracking feature with default message'
do
load_epic_boards
click_first_issue_card
click_first_issue_card
page
.
within
(
'[data-testid="time-tracker"]'
)
do
page
.
within
(
'[data-testid="time-tracker"]'
)
do
...
@@ -85,6 +85,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -85,6 +85,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
before
do
before
do
issue1
.
timelogs
.
create!
(
time_spent:
3600
,
user:
user
)
issue1
.
timelogs
.
create!
(
time_spent:
3600
,
user:
user
)
load_epic_boards
click_first_issue_card
click_first_issue_card
end
end
...
@@ -100,6 +102,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -100,6 +102,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
before
do
before
do
issue1
.
update!
(
time_estimate:
3600
)
issue1
.
update!
(
time_estimate:
3600
)
load_epic_boards
click_first_issue_card
click_first_issue_card
end
end
...
@@ -116,6 +120,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -116,6 +120,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
issue1
.
update!
(
time_estimate:
3600
)
issue1
.
update!
(
time_estimate:
3600
)
issue1
.
timelogs
.
create!
(
time_spent:
1800
,
user:
user
)
issue1
.
timelogs
.
create!
(
time_spent:
1800
,
user:
user
)
load_epic_boards
click_first_issue_card
click_first_issue_card
end
end
...
@@ -140,6 +146,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -140,6 +146,8 @@ RSpec.describe 'epics swimlanes sidebar', :js do
# 3600+3600*24 = 1d 1h or 25h
# 3600+3600*24 = 1d 1h or 25h
issue1
.
timelogs
.
create!
(
time_spent:
3600
+
3600
*
24
,
user:
user
)
issue1
.
timelogs
.
create!
(
time_spent:
3600
+
3600
*
24
,
user:
user
)
load_epic_boards
click_first_issue_card
click_first_issue_card
end
end
...
@@ -156,4 +164,13 @@ RSpec.describe 'epics swimlanes sidebar', :js do
...
@@ -156,4 +164,13 @@ RSpec.describe 'epics swimlanes sidebar', :js do
first
(
"[data-testid='board_card']"
).
click
first
(
"[data-testid='board_card']"
).
click
end
end
end
end
def
load_epic_boards
page
.
within
(
'.board-swimlanes-toggle-wrapper'
)
do
page
.
find
(
'.dropdown-toggle'
).
click
page
.
find
(
'.dropdown-item'
,
text:
'Epic'
).
click
end
wait_for_all_requests
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment