BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
7a5072c5
Commit
7a5072c5
authored
Oct 20, 2014
by
Vinnie Okada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test assertions
Make sure we're asserting the correct thing when testing visible and invisible DOM elements.
parent
5bb8aff5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
diff_note.rb
features/steps/shared/diff_note.rb
+4
-4
markdown.rb
features/steps/shared/markdown.rb
+5
-5
note.rb
features/steps/shared/note.rb
+4
-4
notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+2
-2
No files found.
features/steps/shared/diff_note.rb
View file @
7a5072c5
...
...
@@ -132,26 +132,26 @@ module SharedDiffNote
step
'I should see the diff comment preview'
do
within
(
"
#{
diff_file_selector
}
form"
)
do
expect
(
page
).
to
have_css
(
'.js-md-preview'
)
expect
(
page
).
to
have_css
(
'.js-md-preview'
,
visible:
true
)
end
end
step
'I should see the diff comment write tab'
do
within
(
diff_file_selector
)
do
expect
(
page
).
to
have_css
(
'.js-md-write-button'
)
expect
(
page
).
to
have_css
(
'.js-md-write-button'
,
visible:
true
)
end
end
step
'The diff comment preview tab should display rendered Markdown'
do
within
(
diff_file_selector
)
do
find
(
'.js-md-preview-button'
).
click
expect
(
find
(
'.js-md-preview'
)).
to
have_css
(
'img.emoji'
)
expect
(
find
(
'.js-md-preview'
)).
to
have_css
(
'img.emoji'
,
visible:
true
)
end
end
step
'I should see two separate previews'
do
within
(
diff_file_selector
)
do
expect
(
page
).
to
have_css
(
'.js-md-preview'
,
count:
2
)
expect
(
page
).
to
have_css
(
'.js-md-preview'
,
visible:
true
,
count:
2
)
expect
(
page
).
to
have_content
(
'Should fix it'
)
expect
(
page
).
to
have_content
(
'DRY this up'
)
end
...
...
features/steps/shared/markdown.rb
View file @
7a5072c5
...
...
@@ -56,7 +56,7 @@ EOT
end
step
'I should not see the Markdown preview'
do
expect
(
find
(
'.gfm-form
'
)).
not_to
have_css
(
'.js-md-preview'
,
visible:
true
)
expect
(
find
(
'.gfm-form
.js-md-preview'
)).
not_to
be_visible
end
step
'The Markdown preview tab should say there is nothing to do'
do
...
...
@@ -67,21 +67,21 @@ EOT
end
step
'I should not see the Markdown text field'
do
expect
(
find
(
'.gfm-form
'
)).
not_to
have_css
(
'textarea'
,
visible:
true
)
expect
(
find
(
'.gfm-form
textarea'
)).
not_to
be_visible
end
step
'I should see the Markdown write tab'
do
expect
(
find
(
'.gfm-form'
)).
to
have_css
(
'.js-md-write-button'
)
expect
(
find
(
'.gfm-form'
)).
to
have_css
(
'.js-md-write-button'
,
visible:
true
)
end
step
'I should see the Markdown preview'
do
expect
(
find
(
'.gfm-form'
)).
to
have_css
(
'.js-md-preview'
)
expect
(
find
(
'.gfm-form'
)).
to
have_css
(
'.js-md-preview'
,
visible:
true
)
end
step
'The Markdown preview tab should display rendered Markdown'
do
within
(
'.gfm-form'
)
do
find
(
'.js-md-preview-button'
).
click
expect
(
find
(
'.js-md-preview'
)).
to
have_css
(
'img.emoji'
)
expect
(
find
(
'.js-md-preview'
)).
to
have_css
(
'img.emoji'
,
visible:
true
)
end
end
...
...
features/steps/shared/note.rb
View file @
7a5072c5
...
...
@@ -51,7 +51,7 @@ module SharedNote
step
'I should not see the comment preview'
do
within
(
".js-main-target-form"
)
do
expect
(
page
).
not_to
have_css
(
'.js-md-preview'
,
visible:
true
)
expect
(
find
(
'.js-md-preview'
)).
not_to
be_visible
end
end
...
...
@@ -82,20 +82,20 @@ module SharedNote
step
'I should see the comment write tab'
do
within
(
".js-main-target-form"
)
do
expect
(
page
).
to
have_css
(
'.js-md-write-button'
)
expect
(
page
).
to
have_css
(
'.js-md-write-button'
,
visible:
true
)
end
end
step
'The comment preview tab should be display rendered Markdown'
do
within
(
".js-main-target-form"
)
do
find
(
'.js-md-preview-button'
).
click
expect
(
find
(
'.js-md-preview'
)).
to
have_css
(
'img.emoji'
)
expect
(
find
(
'.js-md-preview'
)).
to
have_css
(
'img.emoji'
,
visible:
true
)
end
end
step
'I should see the comment preview'
do
within
(
".js-main-target-form"
)
do
expect
(
page
).
to
have_css
(
'.js-md-preview'
)
expect
(
page
).
to
have_css
(
'.js-md-preview'
,
visible:
true
)
end
end
...
...
spec/features/notes_on_merge_requests_spec.rb
View file @
7a5072c5
...
...
@@ -34,7 +34,7 @@ describe 'Comments' do
it
'should have enable submit button and preview button'
do
within
(
'.js-main-target-form'
)
do
expect
(
page
).
not_to
have_css
(
'.js-comment-button[disabled]'
)
expect
(
page
).
to
have_css
(
'.js-md-preview-button'
)
expect
(
page
).
to
have_css
(
'.js-md-preview-button'
,
visible:
true
)
end
end
end
...
...
@@ -53,7 +53,7 @@ describe 'Comments' do
should
have_content
(
"This is awsome!"
)
within
(
'.js-main-target-form'
)
do
expect
(
page
).
to
have_no_field
(
'note[note]'
,
with:
'This is awesome!'
)
expect
(
page
).
not_to
have_css
(
'.js-md-preview'
,
visible:
true
)
expect
(
page
).
to
have_css
(
'.js-md-preview'
,
visible: :hidden
)
end
within
(
".js-main-target-form"
)
{
should
have_css
(
".js-note-text"
,
visible:
true
)
}
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