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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
db749d5d
Commit
db749d5d
authored
Mar 31, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds tests for scoped tabs
parent
d3ab245a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
spec/features/projects/environments/environments_spec.rb
spec/features/projects/environments/environments_spec.rb
+36
-0
No files found.
spec/features/projects/environments/environments_spec.rb
View file @
db749d5d
...
...
@@ -23,6 +23,42 @@ feature 'Environments page', :feature, :js do
expect
(
page
).
to
have_link
(
'Available'
)
expect
(
page
).
to
have_link
(
'Stopped'
)
end
describe
'with one available environment'
do
given
(
:environment
)
{
create
(
:environment
,
project:
project
,
state: :available
)
}
describe
'in available tab page'
do
it
'should show one environment'
do
visit
namespace_project_environments_path
(
project
.
namespace
,
project
,
scope:
'available'
)
expect
(
page
.
all
(
'tbody > tr'
).
length
).
to
eq
(
1
)
end
end
describe
'in stopped tab page'
do
it
'should show no environments'
do
visit
namespace_project_environments_path
(
project
.
namespace
,
project
,
scope:
'stopped'
)
expect
(
page
).
to
have_content
(
'You don\'t have any environments right now'
)
end
end
end
describe
'with one stopped environment'
do
given
(
:environment
)
{
create
(
:environment
,
project:
project
,
state: :stopped
)
}
describe
'in available tab page'
do
it
'should show no environments'
do
visit
namespace_project_environments_path
(
project
.
namespace
,
project
,
scope:
'available'
)
expect
(
page
).
to
have_content
(
'You don\'t have any environments right now'
)
end
end
describe
'in stopped tab page'
do
it
'should show one environment'
do
visit
namespace_project_environments_path
(
project
.
namespace
,
project
,
scope:
'stopped'
)
expect
(
page
.
all
(
'tbody > tr'
).
length
).
to
eq
(
1
)
end
end
end
end
context
'without environments'
do
...
...
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