From ae09f8a70a2e848c4a5fc70ac4ccff1bc3874eed Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Fri, 12 Jan 2018 09:45:02 +0000 Subject: gitlab-qa !155 push creates event on activity page --- qa/qa/page/activity/activity.rb | 18 ++++++++++++++++++ qa/qa/specs/features/activity/activity_spec.rb | 24 ++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 qa/qa/page/activity/activity.rb create mode 100644 qa/qa/specs/features/activity/activity_spec.rb diff --git a/qa/qa/page/activity/activity.rb b/qa/qa/page/activity/activity.rb new file mode 100644 index 00000000000..fc885deedf1 --- /dev/null +++ b/qa/qa/page/activity/activity.rb @@ -0,0 +1,18 @@ +module QA + module Page + module Activity + class Activity < Page::Base + ## + # TODO, define all selectors required by this page object + # + # See gitlab-org/gitlab-qa#155 + # + view 'app/views/projects/activity.html.haml' + + def go_to_push_events + click_button 'Push events' + end + end + end + end +end diff --git a/qa/qa/specs/features/activity/activity_spec.rb b/qa/qa/specs/features/activity/activity_spec.rb new file mode 100644 index 00000000000..5eab95c95f3 --- /dev/null +++ b/qa/qa/specs/features/activity/activity_spec.rb @@ -0,0 +1,24 @@ +module QA + feature 'activity page', :core do + scenario 'push creates an event in the activity page' do + Runtime::Browser.visit(:gitlab, Page::Main::Login) + Page::Main::Login.act { sign_in_using_credentials } + + Factory::Resource::Project.fabricate! do |project| + project.name = 'awesome-project' + project.description = 'create awesome project test' + end + + Factory::Repository::Push.fabricate! do |push| + push.file_name = 'README.md' + push.file_content = '# This is a test project' + push.commit_message = 'Add README.md' + end + + Page::Activity::Activity.act { go_to_push_events } + + expect(page).to have_content('Add README.md') + expect(page).to have_content('pushed to branch master') + end + end +end -- cgit v1.2.1 From 669c34db6c75d826b6b692232f235f9dcc492082 Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Fri, 12 Jan 2018 10:22:35 +0000 Subject: Add relevant element for push event button --- qa/qa/page/activity/activity.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/qa/qa/page/activity/activity.rb b/qa/qa/page/activity/activity.rb index fc885deedf1..7970d8186c6 100644 --- a/qa/qa/page/activity/activity.rb +++ b/qa/qa/page/activity/activity.rb @@ -2,15 +2,12 @@ module QA module Page module Activity class Activity < Page::Base - ## - # TODO, define all selectors required by this page object - # - # See gitlab-org/gitlab-qa#155 - # - view 'app/views/projects/activity.html.haml' + view 'app/views/projects/activity.html.haml' do + element :push_events_button, 'Push events' + end def go_to_push_events - click_button 'Push events' + click_button :push_events_button end end end -- cgit v1.2.1 From d0a4ab21f0927fa602e1bab972f545e29d8cf206 Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Fri, 12 Jan 2018 16:45:00 +0000 Subject: improvements after CR --- qa/qa/page/activity/activity.rb | 15 --------------- qa/qa/page/project/activity.rb | 19 +++++++++++++++++++ qa/qa/specs/features/activity/activity_spec.rb | 24 ------------------------ qa/qa/specs/features/project/activity_spec.rb | 19 +++++++++++++++++++ 4 files changed, 38 insertions(+), 39 deletions(-) delete mode 100644 qa/qa/page/activity/activity.rb create mode 100644 qa/qa/page/project/activity.rb delete mode 100644 qa/qa/specs/features/activity/activity_spec.rb create mode 100644 qa/qa/specs/features/project/activity_spec.rb diff --git a/qa/qa/page/activity/activity.rb b/qa/qa/page/activity/activity.rb deleted file mode 100644 index 7970d8186c6..00000000000 --- a/qa/qa/page/activity/activity.rb +++ /dev/null @@ -1,15 +0,0 @@ -module QA - module Page - module Activity - class Activity < Page::Base - view 'app/views/projects/activity.html.haml' do - element :push_events_button, 'Push events' - end - - def go_to_push_events - click_button :push_events_button - end - end - end - end -end diff --git a/qa/qa/page/project/activity.rb b/qa/qa/page/project/activity.rb new file mode 100644 index 00000000000..c343266f01d --- /dev/null +++ b/qa/qa/page/project/activity.rb @@ -0,0 +1,19 @@ +module QA + module Page + module Project + class Activity < Page::Base + view 'app/views/shared/_event_filter.html.haml' do + element :push_events_button, 'Push events' + end + + def go_to_push_events + click_link :push_events_button + end + + def self.path + '/activity' + end + end + end + end +end diff --git a/qa/qa/specs/features/activity/activity_spec.rb b/qa/qa/specs/features/activity/activity_spec.rb deleted file mode 100644 index 5eab95c95f3..00000000000 --- a/qa/qa/specs/features/activity/activity_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -module QA - feature 'activity page', :core do - scenario 'push creates an event in the activity page' do - Runtime::Browser.visit(:gitlab, Page::Main::Login) - Page::Main::Login.act { sign_in_using_credentials } - - Factory::Resource::Project.fabricate! do |project| - project.name = 'awesome-project' - project.description = 'create awesome project test' - end - - Factory::Repository::Push.fabricate! do |push| - push.file_name = 'README.md' - push.file_content = '# This is a test project' - push.commit_message = 'Add README.md' - end - - Page::Activity::Activity.act { go_to_push_events } - - expect(page).to have_content('Add README.md') - expect(page).to have_content('pushed to branch master') - end - end -end diff --git a/qa/qa/specs/features/project/activity_spec.rb b/qa/qa/specs/features/project/activity_spec.rb new file mode 100644 index 00000000000..3dd82bb0587 --- /dev/null +++ b/qa/qa/specs/features/project/activity_spec.rb @@ -0,0 +1,19 @@ +module QA + feature 'activity page', :core do + scenario 'push creates an event in the activity page' do + Runtime::Browser.visit(:gitlab, Page::Main::Login) + Page::Main::Login.act { sign_in_using_credentials } + + Factory::Repository::Push.fabricate! do |push| + push.file_name = 'README.md' + push.file_content = '# This is a test project' + push.commit_message = 'Add README.md' + end + + Page::Project::Activity.act { go_to_push_events } + + expect(page).to have_content('Add README.md') + expect(page).to have_content('pushed to branch master') + end + end +end -- cgit v1.2.1 From a1a5d142981379087ca7183d402300a3a3b6ad52 Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Fri, 12 Jan 2018 17:43:13 +0000 Subject: improvement after CR - test reaches Activity page - the actual git push seems to be failing - had problems with defining selectors --- qa/qa.rb | 2 ++ qa/qa/page/project/activity.rb | 15 +++++++-------- qa/qa/page/project/sidebar.rb | 18 ++++++++++++++++++ qa/qa/specs/features/project/activity_spec.rb | 2 ++ 4 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 qa/qa/page/project/sidebar.rb diff --git a/qa/qa.rb b/qa/qa.rb index 4803432aeee..5562d59abe4 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -100,6 +100,8 @@ module QA module Project autoload :New, 'qa/page/project/new' autoload :Show, 'qa/page/project/show' + autoload :Sidebar, 'qa/page/project/sidebar' + autoload :Activity, 'qa/page/project/activity' module Settings autoload :Common, 'qa/page/project/settings/common' diff --git a/qa/qa/page/project/activity.rb b/qa/qa/page/project/activity.rb index c343266f01d..47bfca087fb 100644 --- a/qa/qa/page/project/activity.rb +++ b/qa/qa/page/project/activity.rb @@ -2,16 +2,15 @@ module QA module Page module Project class Activity < Page::Base - view 'app/views/shared/_event_filter.html.haml' do - element :push_events_button, 'Push events' - end + ## + # TODO, define all selectors required by this page object + # + # See gitlab-org/gitlab-qa#155 + # + view 'app/views/shared/_event_filter.html.haml' def go_to_push_events - click_link :push_events_button - end - - def self.path - '/activity' + click_on 'Push events' end end end diff --git a/qa/qa/page/project/sidebar.rb b/qa/qa/page/project/sidebar.rb new file mode 100644 index 00000000000..3e4f783f105 --- /dev/null +++ b/qa/qa/page/project/sidebar.rb @@ -0,0 +1,18 @@ +module QA + module Page + module Project + class Sidebar < Page::Base + ## + # TODO, define all selectors required by this page object + # + # See gitlab-org/gitlab-qa#155 + # + view 'app/views/layouts/nav/sidebar/_project.html.haml' + + def go_to_activity + click_on class: 'shortcuts-project-activity' + end + end + end + end +end diff --git a/qa/qa/specs/features/project/activity_spec.rb b/qa/qa/specs/features/project/activity_spec.rb index 3dd82bb0587..8934a61b76b 100644 --- a/qa/qa/specs/features/project/activity_spec.rb +++ b/qa/qa/specs/features/project/activity_spec.rb @@ -10,6 +10,8 @@ module QA push.commit_message = 'Add README.md' end + Page::Project::Sidebar.act { go_to_activity } + Page::Project::Activity.act { go_to_push_events } expect(page).to have_content('Add README.md') -- cgit v1.2.1 From d7caa2f8ccf554cdd0763db0cca1dc1c39ba30df Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Tue, 16 Jan 2018 20:20:57 +0000 Subject: improvements after CR + move activity click to side.rb + add element check on activity.rb + minor fixes --- qa/qa.rb | 1 - qa/qa/page/menu/side.rb | 5 +++++ qa/qa/page/project/activity.rb | 13 +++++++------ qa/qa/page/project/sidebar.rb | 18 ------------------ qa/qa/specs/features/project/activity_spec.rb | 5 ++--- 5 files changed, 14 insertions(+), 28 deletions(-) delete mode 100644 qa/qa/page/project/sidebar.rb diff --git a/qa/qa.rb b/qa/qa.rb index 5562d59abe4..2247098b997 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -100,7 +100,6 @@ module QA module Project autoload :New, 'qa/page/project/new' autoload :Show, 'qa/page/project/show' - autoload :Sidebar, 'qa/page/project/sidebar' autoload :Activity, 'qa/page/project/activity' module Settings diff --git a/qa/qa/page/menu/side.rb b/qa/qa/page/menu/side.rb index 1df4e0c2429..3361fd188cb 100644 --- a/qa/qa/page/menu/side.rb +++ b/qa/qa/page/menu/side.rb @@ -6,6 +6,7 @@ module QA element :settings_item element :repository_link, "title: 'Repository'" element :top_level_items, '.sidebar-top-level-items' + element :activity_link, "title: 'Activity'" end def click_repository_setting @@ -29,6 +30,10 @@ module QA yield end end + + def go_to_activity + click_on class: 'shortcuts-project-activity' + end end end end diff --git a/qa/qa/page/project/activity.rb b/qa/qa/page/project/activity.rb index 47bfca087fb..d766dbfb8f6 100644 --- a/qa/qa/page/project/activity.rb +++ b/qa/qa/page/project/activity.rb @@ -2,12 +2,13 @@ module QA module Page module Project class Activity < Page::Base - ## - # TODO, define all selectors required by this page object - # - # See gitlab-org/gitlab-qa#155 - # - view 'app/views/shared/_event_filter.html.haml' + view 'app/views/shared/_event_filter.html.haml' do + ## + # TODO, This needs improvement, _event_filter.html.haml + # doesn't have proper elements defined + # + element :push_events, '.event-filter' + end def go_to_push_events click_on 'Push events' diff --git a/qa/qa/page/project/sidebar.rb b/qa/qa/page/project/sidebar.rb deleted file mode 100644 index 3e4f783f105..00000000000 --- a/qa/qa/page/project/sidebar.rb +++ /dev/null @@ -1,18 +0,0 @@ -module QA - module Page - module Project - class Sidebar < Page::Base - ## - # TODO, define all selectors required by this page object - # - # See gitlab-org/gitlab-qa#155 - # - view 'app/views/layouts/nav/sidebar/_project.html.haml' - - def go_to_activity - click_on class: 'shortcuts-project-activity' - end - end - end - end -end diff --git a/qa/qa/specs/features/project/activity_spec.rb b/qa/qa/specs/features/project/activity_spec.rb index 8934a61b76b..ba94ce8cf28 100644 --- a/qa/qa/specs/features/project/activity_spec.rb +++ b/qa/qa/specs/features/project/activity_spec.rb @@ -10,12 +10,11 @@ module QA push.commit_message = 'Add README.md' end - Page::Project::Sidebar.act { go_to_activity } + Page::Menu::Side.act { go_to_activity } Page::Project::Activity.act { go_to_push_events } - expect(page).to have_content('Add README.md') - expect(page).to have_content('pushed to branch master') + expect(page).to have_content('pushed new branch master') end end end -- cgit v1.2.1 From 4f4e123e2ecbf2f3c0284e10c625ca8a832de0e2 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Wed, 17 Jan 2018 14:27:06 +0000 Subject: Fix docs for GIT_CHECKOUT Gitlab Runner configuration Should fix https://gitlab.com/gitlab-org/gitlab-runner/issues/2652 --- doc/ci/yaml/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index ae0b5c0a2ba..56eb65c003a 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -1293,7 +1293,7 @@ to the CI pipeline: ```yaml variables: GIT_STRATEGY: clone - GIT_CHECKOUT: false + GIT_CHECKOUT: "false" script: - git checkout master - git merge $CI_BUILD_REF_NAME -- cgit v1.2.1 From cd54479406edefea3bd292a9148b650507194583 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Thu, 18 Jan 2018 09:26:03 +0000 Subject: typo fix --- lib/tasks/gitlab/check.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 31cd6bfe6e1..a584eb97cf5 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -427,7 +427,7 @@ namespace :gitlab do namespace :user do desc "GitLab | Check the integrity of a specific user's repositories" task :check_repos, [:username] => :environment do |t, args| - username = args[:username] || prompt("Check repository integrity for fsername? ".color(:blue)) + username = args[:username] || prompt("Check repository integrity for username? ".color(:blue)) user = User.find_by(username: username) if user repo_dirs = user.authorized_projects.map do |p| -- cgit v1.2.1 From 86bc36c547439011f11c2a1c9a3f853254486ee7 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Thu, 18 Jan 2018 17:33:06 +0000 Subject: Move mr_widget_auto_merge_failed component into a vue file --- .../states/mr_widget_auto_merge_failed.js | 47 ------------------ .../states/mr_widget_auto_merge_failed.vue | 52 ++++++++++++++++++++ .../vue_merge_request_widget/dependencies.js | 2 +- .../javascripts/vue_merge_request_widget/index.js | 3 ++ .../states/mr_widget_auto_merge_failed_spec.js | 57 ++++++++++++++-------- 5 files changed, 92 insertions(+), 69 deletions(-) delete mode 100644 app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.js create mode 100644 app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.js deleted file mode 100644 index 5648208f7b1..00000000000 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.js +++ /dev/null @@ -1,47 +0,0 @@ -import eventHub from '../../event_hub'; -import statusIcon from '../mr_widget_status_icon'; - -export default { - name: 'MRWidgetAutoMergeFailed', - props: { - mr: { type: Object, required: true }, - }, - data() { - return { - isRefreshing: false, - }; - }, - components: { - statusIcon, - }, - methods: { - refreshWidget() { - this.isRefreshing = true; - eventHub.$emit('MRWidgetUpdateRequested', () => { - this.isRefreshing = false; - }); - }, - }, - template: ` -
- -
- - - This merge request failed to be merged automatically - -