Commit a1d9a3c3 authored by Mark Lapierre's avatar Mark Lapierre

Visit project page after pushing

parent ed75b46c
...@@ -5,17 +5,17 @@ module QA ...@@ -5,17 +5,17 @@ module QA
describe 'Project activity' do describe 'Project activity' do
it 'user creates an event in the activity page upon Git push' do it 'user creates an event in the activity page upon Git push' do
Runtime::Browser.visit(:gitlab, Page::Main::Login) 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_name = 'README.md'
push.file_content = '# This is a test project' push.file_content = '# This is a test project'
push.commit_message = 'Add README.md' push.commit_message = 'Add README.md'
end end
project_push.project.visit!
Page::Project::Menu.act { go_to_activity } Page::Project::Menu.perform(&:go_to_activity)
Page::Project::Activity.perform(&:go_to_push_events)
Page::Project::Activity.act { go_to_push_events }
expect(page).to have_content('pushed new branch master') expect(page).to have_content('pushed new branch master')
end end
......
...@@ -7,12 +7,12 @@ module QA ...@@ -7,12 +7,12 @@ module QA
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials } 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_name = 'README.md'
push.file_content = '# This is a test project' push.file_content = '# This is a test project'
push.commit_message = 'Add README.md' push.commit_message = 'Add README.md'
end end
project_push.project.visit!
Page::Project::Show.act { wait_for_push } Page::Project::Show.act { wait_for_push }
expect(page).to have_content('README.md') expect(page).to have_content('README.md')
......
...@@ -16,13 +16,14 @@ module QA ...@@ -16,13 +16,14 @@ module QA
resource.title = key_title resource.title = key_title
end end
Resource::Repository::ProjectPush.fabricate! do |push| project_push = Resource::Repository::ProjectPush.fabricate! do |push|
push.ssh_key = key push.ssh_key = key
push.file_name = 'README.md' push.file_name = 'README.md'
push.file_content = '# Test Use SSH Key' push.file_content = '# Test Use SSH Key'
push.commit_message = 'Add README.md' push.commit_message = 'Add README.md'
end end
project_push.project.visit!
Page::Project::Show.act { wait_for_push } Page::Project::Show.act { wait_for_push }
expect(page).to have_content('README.md') 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