Commit a1d9a3c3 authored by Mark Lapierre's avatar Mark Lapierre

Visit project page after pushing

parent ed75b46c
......@@ -5,17 +5,17 @@ module QA
describe 'Project activity' do
it 'user creates an event in the activity page upon Git push' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
Page::Main::Login.perform(&:sign_in_using_credentials)
Resource::Repository::ProjectPush.fabricate! do |push|
project_push = Resource::Repository::ProjectPush.fabricate! do |push|
push.file_name = 'README.md'
push.file_content = '# This is a test project'
push.commit_message = 'Add README.md'
end
project_push.project.visit!
Page::Project::Menu.act { go_to_activity }
Page::Project::Activity.act { go_to_push_events }
Page::Project::Menu.perform(&:go_to_activity)
Page::Project::Activity.perform(&:go_to_push_events)
expect(page).to have_content('pushed new branch master')
end
......
......@@ -7,12 +7,12 @@ module QA
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
Resource::Repository::ProjectPush.fabricate! do |push|
project_push = Resource::Repository::ProjectPush.fabricate! do |push|
push.file_name = 'README.md'
push.file_content = '# This is a test project'
push.commit_message = 'Add README.md'
end
project_push.project.visit!
Page::Project::Show.act { wait_for_push }
expect(page).to have_content('README.md')
......
......@@ -16,13 +16,14 @@ module QA
resource.title = key_title
end
Resource::Repository::ProjectPush.fabricate! do |push|
project_push = Resource::Repository::ProjectPush.fabricate! do |push|
push.ssh_key = key
push.file_name = 'README.md'
push.file_content = '# Test Use SSH Key'
push.commit_message = 'Add README.md'
end
project_push.project.visit!
Page::Project::Show.act { wait_for_push }
expect(page).to have_content('README.md')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment