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
4f115a09
Commit
4f115a09
authored
Feb 21, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
71270f80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
spec/features/variables_spec.rb
spec/features/variables_spec.rb
+11
-17
No files found.
spec/features/variables_spec.rb
View file @
4f115a09
...
...
@@ -16,18 +16,17 @@ describe 'Project variables', js: true do
it
'shows list of variables'
do
page
.
within
(
'.variables-table'
)
do
expect
(
page
).
to
have_content
(
variable
.
key
)
expect
(
page
).
to
have_content
(
variable
.
value
)
end
end
it
'adds new variable'
do
fill_in
(
'variable_key'
,
with:
'
new_
key'
)
fill_in
(
'variable_value'
,
with:
'
new
value'
)
fill_in
(
'variable_key'
,
with:
'key'
)
fill_in
(
'variable_value'
,
with:
'
key
value'
)
click_button
(
'Add new variable'
)
expect
(
page
).
to
have_content
(
'Variables were successfully updated.'
)
page
.
within
(
'.variables-table'
)
do
expect
(
page
).
to
have_content
(
'new_key'
)
expect
(
page
).
to
have_content
(
'new value'
)
expect
(
page
).
to
have_content
(
'key'
)
end
end
...
...
@@ -36,6 +35,7 @@ describe 'Project variables', js: true do
fill_in
(
'variable_value'
,
with:
''
)
click_button
(
'Add new variable'
)
expect
(
page
).
to
have_content
(
'Variables were successfully updated.'
)
page
.
within
(
'.variables-table'
)
do
expect
(
page
).
to
have_content
(
'new_key'
)
end
...
...
@@ -80,16 +80,12 @@ describe 'Project variables', js: true do
end
expect
(
page
).
to
have_content
(
'Update variable'
)
fill_in
(
'variable_key'
,
with:
'
new_
key'
)
fill_in
(
'variable_value'
,
with:
'
new
value'
)
fill_in
(
'variable_key'
,
with:
'key'
)
fill_in
(
'variable_value'
,
with:
'
key
value'
)
click_button
(
'Save variable'
)
page
.
within
(
'.variables-table'
)
do
expect
(
page
).
not_to
have_content
(
variable
.
key
)
expect
(
page
).
not_to
have_content
(
variable
.
value
)
expect
(
page
).
to
have_content
(
'new_key'
)
expect
(
page
).
to
have_content
(
'new value'
)
end
expect
(
page
).
to
have_content
(
'Variable was successfully updated.'
)
expect
(
project
.
variables
.
first
.
value
).
to
eq
(
'key value'
)
end
it
'edits variable with empty value'
do
...
...
@@ -101,9 +97,7 @@ describe 'Project variables', js: true do
fill_in
(
'variable_value'
,
with:
''
)
click_button
(
'Save variable'
)
page
.
within
(
'.variables-table'
)
do
expect
(
page
).
to
have_content
(
variable
.
key
)
expect
(
page
).
not_to
have_content
(
variable
.
value
)
end
expect
(
page
).
to
have_content
(
'Variable was successfully updated.'
)
expect
(
project
.
variables
.
first
.
value
).
to
eq
(
''
)
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