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
e393151d
Commit
e393151d
authored
Jan 04, 2017
by
Semyon Pupkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move dashboard archived projects spinach tests to rspec
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
parent
115aac77
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
43 deletions
+32
-43
features/dashboard/archived_projects.feature
features/dashboard/archived_projects.feature
+0
-17
features/steps/dashboard/archived_projects.rb
features/steps/dashboard/archived_projects.rb
+0
-26
spec/factories/projects.rb
spec/factories/projects.rb
+4
-0
spec/features/dashboard/archived_projects_spec.rb
spec/features/dashboard/archived_projects_spec.rb
+28
-0
No files found.
features/dashboard/archived_projects.feature
deleted
100644 → 0
View file @
115aac77
@dashboard
Feature
:
Dashboard Archived Projects
Background
:
Given
I sign in as a user
And
I own project
"Shop"
And
I own project
"Forum"
And
project
"Forum"
is archived
And
I visit dashboard page
Scenario
:
I
should see non-archived projects on dashboard
Then
I should see
"Shop"
project link
And
I should not see
"Forum"
project link
Scenario
:
I
toggle show of archived projects on dashboard
When
I click
"Show archived projects"
link
Then
I should see
"Shop"
project link
And
I should see
"Forum"
project link
features/steps/dashboard/archived_projects.rb
deleted
100644 → 0
View file @
115aac77
class
Spinach::Features::DashboardArchivedProjects
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedProject
When
'project "Forum" is archived'
do
project
=
Project
.
find_by
(
name:
"Forum"
)
project
.
update_attribute
(
:archived
,
true
)
end
step
'I should see "Shop" project link'
do
expect
(
page
).
to
have_link
"Shop"
end
step
'I should not see "Forum" project link'
do
expect
(
page
).
not_to
have_link
"Forum"
end
step
'I should see "Forum" project link'
do
expect
(
page
).
to
have_link
"Forum"
end
step
'I click "Show archived projects" link'
do
click_link
"Show archived projects"
end
end
spec/factories/projects.rb
View file @
e393151d
...
...
@@ -24,6 +24,10 @@ FactoryGirl.define do
visibility_level
Gitlab
::
VisibilityLevel
::
PRIVATE
end
trait
:archived
do
archived
true
end
trait
:access_requestable
do
request_access_enabled
true
end
...
...
spec/features/dashboard/archived_projects_spec.rb
0 → 100644
View file @
e393151d
require
'spec_helper'
RSpec
.
describe
'Dashboard Archived Project'
,
feature:
true
do
let
(
:user
)
{
create
:user
}
let
(
:project
)
{
create
:project
}
let
(
:archived_project
)
{
create
(
:project
,
:archived
)
}
before
do
project
.
team
<<
[
user
,
:master
]
archived_project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
visit
dashboard_projects_path
end
it
'renders non archived projects'
do
expect
(
page
).
to
have_link
(
project
.
name
)
expect
(
page
).
not_to
have_link
(
archived_project
.
name
)
end
it
'renders all projects'
do
click_link
'Show archived projects'
expect
(
page
).
to
have_link
(
project
.
name
)
expect
(
page
).
to
have_link
(
archived_project
.
name
)
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