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
Tatuya Kamada
gitlab-ce
Commits
e069875e
Commit
e069875e
authored
Nov 15, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests broken by new wiki page design
parent
952bdfae
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
28 deletions
+19
-28
app/assets/javascripts/wikis.js.es6
app/assets/javascripts/wikis.js.es6
+2
-2
features/project/wiki.feature
features/project/wiki.feature
+0
-5
features/steps/project/source/markdown_render.rb
features/steps/project/source/markdown_render.rb
+3
-3
features/steps/project/wiki.rb
features/steps/project/wiki.rb
+6
-10
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+6
-6
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
+2
-2
No files found.
app/assets/javascripts/wikis.js.es6
View file @
e069875e
...
...
@@ -17,8 +17,8 @@
$(this.sidebarEl).niceScroll();
const sidebarToggles = document.querySelectorAll('.js-sidebar-wiki-toggle');
for (
const toggle of sidebarToggles
) {
toggle
.addEventListener('click', e => this.handleToggleSidebar(e));
for (
let i = 0; i < sidebarToggles.length; i += 1
) {
sidebarToggles[i]
.addEventListener('click', e => this.handleToggleSidebar(e));
}
this.newWikiForm = document.querySelector('form.new-wiki-page');
...
...
features/project/wiki.feature
View file @
e069875e
...
...
@@ -49,7 +49,6 @@ Feature: Project Wiki
Scenario
:
View all pages
Given
I have an existing wiki page
And
I browse to that Wiki page
And
I click on the
"Pages"
button
Then
I should see the existing page in the pages list
Scenario
:
File exists in wiki repo
...
...
@@ -72,13 +71,11 @@ Feature: Project Wiki
@javascript
Scenario
:
New Wiki page that has a path
Given
I create a New page with paths
And
I click on the
"Pages"
button
Then
I should see non-escaped link in the pages list
@javascript
Scenario
:
Edit Wiki page that has a path
Given
I create a New page with paths
And
I click on the
"Pages"
button
And
I edit the Wiki page with a path
Then
I should see a non-escaped path
And
I should see the Editing page
...
...
@@ -88,7 +85,6 @@ Feature: Project Wiki
@javascript
Scenario
:
View the page history of a Wiki page that has a path
Given
I create a New page with paths
And
I click on the
"Pages"
button
And
I view the page history of a Wiki page that has a path
Then
I should see a non-escaped path
And
I should see the page history
...
...
@@ -96,7 +92,6 @@ Feature: Project Wiki
@javascript
Scenario
:
View an old page version of a Wiki page
Given
I create a New page with paths
And
I click on the
"Pages"
button
And
I edit the Wiki page with a path
Then
I should see a non-escaped path
And
I should see the Editing page
...
...
features/steps/project/source/markdown_render.rb
View file @
e069875e
...
...
@@ -241,7 +241,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
page
.
within
(
:css
,
".nav-text"
)
do
expect
(
page
).
to
have_content
"Test"
expect
(
page
).
to
have_content
"
Edit
Page"
expect
(
page
).
to
have_content
"
Create
Page"
end
end
...
...
@@ -258,7 +258,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
expect
(
current_path
).
to
eq
namespace_project_wiki_path
(
@project
.
namespace
,
@project
,
"api"
)
page
.
within
(
:css
,
".nav-text"
)
do
expect
(
page
).
to
have_content
"
Edit
"
expect
(
page
).
to
have_content
"
Create
"
expect
(
page
).
to
have_content
"Api"
end
end
...
...
@@ -271,7 +271,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
expect
(
current_path
).
to
eq
namespace_project_wiki_path
(
@project
.
namespace
,
@project
,
"raketasks"
)
page
.
within
(
:css
,
".nav-text"
)
do
expect
(
page
).
to
have_content
"
Edit
"
expect
(
page
).
to
have_content
"
Create
"
expect
(
page
).
to
have_content
"Rake"
end
end
...
...
features/steps/project/wiki.rb
View file @
e069875e
...
...
@@ -29,7 +29,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
expect
(
page
).
to
have_content
"link test"
click_link
"link test"
expect
(
page
).
to
have_content
"
Edit
Page"
expect
(
page
).
to
have_content
"
Create
Page"
end
step
'I have an existing Wiki page'
do
...
...
@@ -80,13 +80,9 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
expect
(
page
).
to
have_content
"Page was successfully deleted"
end
step
'I click on the "Pages" button'
do
click_on
"Pages"
end
step
'I should see the existing page in the pages list'
do
expect
(
page
).
to
have_content
current_user
.
name
expect
(
page
).
to
have_content
@page
.
titl
e
expect
(
find
(
'.wiki-pages'
)).
to
have_content
@page
.
title
.
capitaliz
e
end
step
'I have an existing Wiki page with images linked on page'
do
...
...
@@ -125,7 +121,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
step
'I should see the new wiki page form'
do
expect
(
current_path
).
to
match
(
'wikis/image.jpg'
)
expect
(
page
).
to
have_content
(
'New Wiki Page'
)
expect
(
page
).
to
have_content
(
'
Edit
Page'
)
expect
(
page
).
to
have_content
(
'
Create
Page'
)
end
step
'I create a New page with paths'
do
...
...
@@ -142,8 +138,8 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
step
'I edit the Wiki page with a path'
do
expect
(
page
).
to
have_content
(
't
hree'
)
click_on
'
t
hree'
expect
(
find
(
'.wiki-pages'
)).
to
have_content
(
'T
hree'
)
click_on
'
T
hree'
expect
(
find
(
'.nav-text'
)).
to
have_content
(
'Three'
)
click_on
'Edit'
end
...
...
@@ -157,7 +153,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
step
'I view the page history of a Wiki page that has a path'
do
click_on
'
t
hree'
click_on
'
T
hree'
click_on
'Page History'
end
...
...
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
View file @
e069875e
...
...
@@ -20,7 +20,7 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
click_button
'Create page'
expect
(
page
).
to
have_content
(
'Home'
)
expect
(
page
).
to
have_content
(
"
l
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
"
L
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
end
end
...
...
@@ -41,7 +41,7 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
click_button
'Create page'
expect
(
page
).
to
have_content
(
'Foo'
)
expect
(
page
).
to
have_content
(
"
l
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
"
L
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
end
...
...
@@ -55,7 +55,7 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
click_button
'Create page'
expect
(
page
).
to
have_content
(
'Spaces in the name'
)
expect
(
page
).
to
have_content
(
"
l
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
"
L
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
end
...
...
@@ -69,7 +69,7 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
click_button
'Create page'
expect
(
page
).
to
have_content
(
'Hyphens in the name'
)
expect
(
page
).
to
have_content
(
"
l
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
"
L
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
end
end
...
...
@@ -85,7 +85,7 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
click_button
'Create page'
expect
(
page
).
to
have_content
(
'Home'
)
expect
(
page
).
to
have_content
(
"
l
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
"
L
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
end
end
...
...
@@ -105,7 +105,7 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
click_button
'Create page'
expect
(
page
).
to
have_content
(
'Foo'
)
expect
(
page
).
to
have_content
(
"
l
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
"
L
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
end
end
...
...
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
View file @
e069875e
...
...
@@ -22,7 +22,7 @@ feature 'Projects > Wiki > User updates wiki page', feature: true do
click_button
'Save changes'
expect
(
page
).
to
have_content
(
'Home'
)
expect
(
page
).
to
have_content
(
"
l
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
"
L
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
end
end
...
...
@@ -37,7 +37,7 @@ feature 'Projects > Wiki > User updates wiki page', feature: true do
click_button
'Save changes'
expect
(
page
).
to
have_content
(
'Home'
)
expect
(
page
).
to
have_content
(
"
l
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
"
L
ast edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
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