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
Boxiang Sun
gitlab-ce
Commits
a3fbf344
Commit
a3fbf344
authored
Apr 28, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix header_should_have_correct_id_and_link for features
parent
fad01576
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
features/steps/shared/markdown.rb
features/steps/shared/markdown.rb
+6
-2
No files found.
features/steps/shared/markdown.rb
View file @
a3fbf344
...
@@ -2,8 +2,12 @@ module SharedMarkdown
...
@@ -2,8 +2,12 @@ module SharedMarkdown
include
Spinach
::
DSL
include
Spinach
::
DSL
def
header_should_have_correct_id_and_link
(
level
,
text
,
id
,
parent
=
".wiki"
)
def
header_should_have_correct_id_and_link
(
level
,
text
,
id
,
parent
=
".wiki"
)
find
(
:css
,
"
#{
parent
}
h
#{
level
}
#
#{
id
}
"
).
text
.
should
==
text
node
=
find
(
"
#{
parent
}
h
#{
level
}
a#
#{
id
}
"
)
find
(
:css
,
"
#{
parent
}
h
#{
level
}
#
#{
id
}
> :last-child"
)[
:href
].
should
=~
/#
#{
id
}
$/
node
[
:href
].
should
==
"#
#{
id
}
"
# Work around a weird Capybara behavior where calling `parent` on a node
# returns the whole document, not the node's actual parent element
find
(
:xpath
,
"
#{
node
.
path
}
/.."
).
text
.
should
==
text
end
end
def
create_taskable
(
type
,
title
)
def
create_taskable
(
type
,
title
)
...
...
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