summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/repository/push_spec.rb
blob: 5b930b9818a4c9b8d8d125486b22e03c1a6fce99 (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
module QA
  feature 'push code to repository', :core do
    context 'with regular account over http' do
      scenario 'user pushes code to the repository'  do
        Page::Main::Entry.act { visit_login_page }
        Page::Main::Login.act { sign_in_using_credentials }

        Scenario::Gitlab::Project::Create.perform do |scenario|
          scenario.name = 'project_with_code'
          scenario.description = 'project with repository'
        end

        Scenario::Gitlab::Repository::Push.perform do |scenario|
          scenario.file_name = 'README.md'
          scenario.file_content = '# This is test project'
          scenario.commit_message = 'Add README.md'
        end

        Page::Project::Show.act do
          wait_for_push
          refresh
        end

        expect(page).to have_content('README.md')
        expect(page).to have_content('This is test project')
      end
    end
  end
end