Commit 6c7c6440 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-01-26

# Conflicts:
#	app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue
#	config/gitlab.yml.example
#	config/initializers/0_post_deployment_migrations.rb

[ci skip]
parents a9efdb8f 4376be84
......@@ -22,3 +22,11 @@ axios.interceptors.response.use((config) => {
});
export default axios;
/**
* @return The adapter that axios uses for dispatching requests. This may be overwritten in tests.
*
* @see https://github.com/axios/axios/tree/master/lib/adapters
* @see https://github.com/ctimmerm/axios-mock-adapter/blob/v1.12.0/src/index.js#L39
*/
export const getDefaultAdapter = () => axios.defaults.adapter;
......@@ -84,9 +84,15 @@
<div class="media-body">
<h4 class="flex-container-block">
<span class="append-right-10">
<<<<<<< HEAD
Set by
<mr-widget-author :author="mr.setToMWPSBy" />
to be merged automatically when the pipeline succeeds
=======
{{ s__("mrWidget|Set by") }}
<mr-widget-author :author="mr.setToMWPSBy" />
{{ s__("mrWidget|to be merged automatically when the pipeline succeeds") }}
>>>>>>> upstream/master
</span>
<a
v-if="mr.canCancelAutomaticMerge"
......
......@@ -756,6 +756,7 @@ test:
enabled: true
lfs:
enabled: false
<<<<<<< HEAD
# The location where LFS objects are stored (default: shared/lfs-objects).
# storage_path: shared/lfs-objects
object_store:
......@@ -780,6 +781,10 @@ test:
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
region: eu-central-1
=======
artifacts:
path: tmp/tests/artifacts
>>>>>>> upstream/master
gitlab:
host: localhost
port: 80
......
......@@ -11,6 +11,7 @@ unless ENV['SKIP_POST_DEPLOYMENT_MIGRATIONS']
# path just yet. As such we must also update the following list of paths.
ActiveRecord::Migrator.migrations_paths << path
end
<<<<<<< HEAD
end
migrate_paths = Rails.application.config.paths['db/migrate'].to_a
......@@ -20,4 +21,6 @@ migrate_paths.each do |migrate_path|
Rails.application.config.paths['db/migrate'] << ee_migrate_path.to_s
ActiveRecord::Migrator.migrations_paths << ee_migrate_path.to_s
=======
>>>>>>> upstream/master
end
......@@ -107,6 +107,12 @@ module QA
module Project
autoload :New, 'qa/page/project/new'
autoload :Show, 'qa/page/project/show'
autoload :Activity, 'qa/page/project/activity'
module Pipeline
autoload :Index, 'qa/page/project/pipeline/index'
autoload :Show, 'qa/page/project/pipeline/show'
end
module Pipeline
autoload :Index, 'qa/page/project/pipeline/index'
......
......@@ -8,6 +8,7 @@ module QA
element :repository_link, "title: 'Repository'"
element :pipelines_settings_link, "title: 'CI / CD'"
element :top_level_items, '.sidebar-top-level-items'
element :activity_link, "title: 'Activity'"
end
view 'app/assets/javascripts/fly_out_nav.js' do
......@@ -58,6 +59,12 @@ module QA
end
end
def go_to_activity
within_sidebar do
click_on 'Activity'
end
end
def within_submenu
page.within('.fly-out-list') do
yield
......
module QA
module Page
module Project
class Activity < Page::Base
view 'app/views/shared/_event_filter.html.haml' do
element :push_events, "event_filter_link EventFilter.push, _('Push events')"
end
def go_to_push_events
click_on 'Push events'
end
end
end
end
end
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::Menu::Side.act { go_to_activity }
Page::Project::Activity.act { go_to_push_events }
expect(page).to have_content('pushed new branch master')
end
end
end
......@@ -5,6 +5,8 @@ import '~/commons';
import Vue from 'vue';
import VueResource from 'vue-resource';
import { getDefaultAdapter } from '~/lib/utils/axios_utils';
const isHeadlessChrome = /\bHeadlessChrome\//.test(navigator.userAgent);
Vue.config.devtools = !isHeadlessChrome;
Vue.config.productionTip = false;
......@@ -58,6 +60,8 @@ beforeEach(() => {
Vue.http.interceptors = builtinVueHttpInterceptors.slice();
});
const axiosDefaultAdapter = getDefaultAdapter();
// render all of our tests
const testsContext = require.context('.', true, /_spec$/);
testsContext.keys().forEach(function (path) {
......@@ -93,6 +97,12 @@ describe('test errors', () => {
it('has no Vue error', () => {
expect(hasVueErrors).toBe(false);
});
it('restores axios adapter after mocking', () => {
if (getDefaultAdapter() !== axiosDefaultAdapter) {
fail('axios adapter is not restored! Did you forget a restore() on MockAdapter?');
}
});
});
// if we're generating coverage reports, make sure to include all files so
......
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