Welcome to mirror list, hosted at ThFree Co, Russian Federation.

archived.rb « project « steps « features - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 37ad0c776555da2384d9d501d2109f96daf5a8c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class Spinach::Features::ProjectArchived < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedProject
  include SharedPaths

  When 'project "Forum" is archived' do
    project = Project.find_by(name: "Forum")
    project.update_attribute(:archived, true)
  end

  When 'project "Shop" is archived' do
    project = Project.find_by(name: "Shop")
    project.update_attribute(:archived, true)
  end

  When 'I visit project "Forum" page' do
    project = Project.find_by(name: "Forum")
    visit namespace_project_path(project.namespace, project)
  end

  step 'I should not see "Archived"' do
    page.should_not have_content "Archived"
  end

  step 'I should see "Archived"' do
    page.should have_content "Archived"
  end

  When 'I set project archived' do
    click_link "Archive"
  end

  When 'I set project unarchived' do
    click_link "Unarchive"
  end

end