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
203eba2a
Commit
203eba2a
authored
Jul 07, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve a spec to make it faster and less flaky
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
8a8bf427
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
21 deletions
+11
-21
ee/spec/features/groups/group_roadmap_spec.rb
ee/spec/features/groups/group_roadmap_spec.rb
+11
-21
No files found.
ee/spec/features/groups/group_roadmap_spec.rb
View file @
203eba2a
...
...
@@ -156,12 +156,9 @@ RSpec.describe 'group epic roadmap', :js do
end
context
'when over 1000 epics exist for the group'
do
6
.
times
do
|
i
|
let!
(
"epic_
#{
i
}
"
)
{
create
(
:epic
,
group:
group
,
start_date:
10
.
days
.
ago
,
end_date:
1
.
day
.
ago
)
}
end
before
do
stub_const
(
'Groups::RoadmapController::EPICS_ROADMAP_LIMIT'
,
5
)
stub_const
(
'Groups::RoadmapController::EPICS_ROADMAP_LIMIT'
,
1
)
create_list
(
:epic
,
2
,
group:
group
,
start_date:
10
.
days
.
ago
,
end_date:
1
.
day
.
ago
)
visit
group_roadmap_path
(
group
)
wait_for_requests
end
...
...
@@ -172,30 +169,23 @@ RSpec.describe 'group epic roadmap', :js do
expect
(
page
).
to
have_selector
(
'.js-epics-limit-callout'
,
count:
1
)
expect
(
find
(
'.js-epics-limit-callout'
)).
to
have_content
'Some of your epics may not be visible. A roadmap is limited to the first 1,000 epics, in your selected sort order.'
end
page
.
within
(
'.js-epics-limit-callout'
)
do
expect
(
find_link
(
'Learn more'
)[
:href
]).
to
eq
(
"https://docs.gitlab.com/ee/user/group/roadmap/"
)
end
end
it
'is removed after dismissal'
do
find
(
'.js-epics-limit-callout .js-close-callout'
).
click
it
'is removed after dismissal and even after reload'
do
page
.
within
(
'.js-epics-limit-callout'
)
do
find
(
'.js-close-callout'
).
click
end
expect
(
page
).
not_to
have_selector
(
'.js-epics-limit-callout'
)
end
it
'does not appear on page after dismissal and reload'
do
find
(
'.js-epics-limit-callout .js-close-callout'
).
click
visit
group_roadmap_path
(
group
)
wait_for_requests
refresh
expect
(
page
).
not_to
have_selector
(
'.js-epics-limit-callout'
)
end
it
'links to roadmap documentation'
do
page
.
within
(
'.js-epics-limit-callout'
)
do
find
(
'#js-learn-more'
).
click
wait_for_requests
expect
(
URI
.
parse
(
current_url
).
host
).
to
eq
(
"docs.gitlab.com"
)
expect
(
URI
.
parse
(
current_url
).
path
).
to
eq
(
"/ee/user/group/roadmap/"
)
end
end
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