Skip to content
Snippets Groups Projects
Commit 66ce6a78 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 1c23b3f1
No related branches found
No related tags found
No related merge requests found
Showing
with 95 additions and 46 deletions
Loading
Loading
@@ -9,6 +9,7 @@ module QA::Page
 
view 'app/assets/javascripts/pipelines/components/pipelines_table_row.vue' do
element :pipeline_commit_status
element :pipeline_retry_button
end
 
def click_on_latest_pipeline
Loading
Loading
@@ -18,10 +19,25 @@ module QA::Page
end
 
def wait_for_latest_pipeline_success
wait_for_latest_pipeline_status { has_text?('passed') }
end
def wait_for_latest_pipeline_completion
wait_for_latest_pipeline_status { has_text?('passed') || has_text?('failed') }
end
def wait_for_latest_pipeline_status
wait_until(reload: false, max_duration: 300) do
within_element_by_index(:pipeline_commit_status, 0) do
has_text?('passed')
end
within_element_by_index(:pipeline_commit_status, 0) { yield }
end
end
def wait_for_latest_pipeline_success_or_retry
wait_for_latest_pipeline_completion
if has_text?('failed')
click_element :pipeline_retry_button
wait_for_latest_pipeline_success
end
end
end
Loading
Loading
Loading
Loading
@@ -12,6 +12,7 @@ module QA
view 'app/views/layouts/nav/sidebar/_project.html.haml' do
element :link_operations
element :operations_environments_link
element :operations_metrics_link
end
end
end
Loading
Loading
@@ -24,6 +25,14 @@ module QA
end
end
 
def go_to_operations_metrics
hover_operations do
within_submenu do
click_element(:operations_metrics_link)
end
end
end
def go_to_operations_kubernetes
hover_operations do
within_submenu do
Loading
Loading
Loading
Loading
@@ -4,8 +4,8 @@ module QA
context 'Non-devops' do
describe 'Performance bar display', :requires_admin do
context 'when logged in as an admin user' do
# 4 metrics: pg, gitaly, redis, total
let(:metrics_count) { 4 }
# performance metrics: pg, gitaly, redis, rugged (feature flagged), total (not always provided)
let(:minimum_metrics_count) { 3 }
 
before do
Flow::Login.sign_in_as_admin
Loading
Loading
@@ -28,7 +28,7 @@ module QA
 
Page::Layout::PerformanceBar.perform do |bar_component|
expect(bar_component).to have_performance_bar
expect(bar_component).to have_detailed_metrics(metrics_count)
expect(bar_component).to have_detailed_metrics(minimum_metrics_count)
expect(bar_component).to have_request_for('realtime_changes') # Always requested on issue pages
end
end
Loading
Loading
Loading
Loading
@@ -8,16 +8,15 @@ describe 'User activates issue tracker', :js do
 
let(:url) { 'http://tracker.example.com' }
 
def fill_short_form(active = true)
check 'Active' if active
def fill_short_form(disabled: false)
uncheck 'Active' if disabled
 
fill_in 'service_project_url', with: url
fill_in 'service_issues_url', with: "#{url}/:id"
end
 
def fill_full_form(active = true)
fill_short_form(active)
check 'Active' if active
def fill_full_form(disabled: false)
fill_short_form(disabled: disabled)
 
fill_in 'service_new_issue_url', with: url
end
Loading
Loading
@@ -86,14 +85,14 @@ describe 'User activates issue tracker', :js do
end
end
 
describe 'user sets the service but keeps it disabled' do
describe 'user disables the service' do
before do
click_link(tracker)
 
if skip_new_issue_url
fill_short_form(false)
fill_short_form(disabled: true)
else
fill_full_form(false)
fill_full_form(disabled: true)
end
 
click_button('Save changes')
Loading
Loading
Loading
Loading
@@ -9,8 +9,8 @@ describe 'User activates Jira', :js do
let(:url) { 'http://jira.example.com' }
let(:test_url) { 'http://jira.example.com/rest/api/2/serverInfo' }
 
def fill_form(active = true)
check 'Active' if active
def fill_form(disabled: false)
uncheck 'Active' if disabled
 
fill_in 'service_url', with: url
fill_in 'service_username', with: 'username'
Loading
Loading
@@ -83,10 +83,10 @@ describe 'User activates Jira', :js do
end
end
 
describe 'user sets Jira Service but keeps it disabled' do
describe 'user disables the Jira Service' do
before do
click_link('Jira')
fill_form(false)
fill_form(disabled: true)
click_button('Save changes')
end
 
Loading
Loading
Loading
Loading
@@ -8,8 +8,8 @@ describe 'User activates issue tracker', :js do
 
let(:url) { 'http://tracker.example.com' }
 
def fill_form(active = true)
check 'Active' if active
def fill_form(disabled: false)
uncheck 'Active' if disabled
 
fill_in 'service_project_url', with: url
fill_in 'service_issues_url', with: "#{url}/:id"
Loading
Loading
@@ -67,10 +67,10 @@ describe 'User activates issue tracker', :js do
end
end
 
describe 'user sets the service but keeps it disabled' do
describe 'user disables the service' do
before do
click_link(tracker)
fill_form(false)
fill_form(disabled: true)
click_button('Save changes')
end
 
Loading
Loading
Loading
Loading
@@ -46,6 +46,13 @@ describe 'Multi-file editor new directory', :js do
 
find('.js-ide-commit-mode').click
 
# Compact mode depends on the size of window. If it is shorter than MAX_WINDOW_HEIGHT_COMPACT,
# (as it is with CHROME_HEADLESS=0), this initial commit button will exist. Otherwise, if it is
# taller (as it is by default with chrome headless) then the button will not exist.
if page.has_css?('.qa-begin-commit-button')
find('.qa-begin-commit-button').click
end
fill_in('commit-message', with: 'commit message ide')
 
find(:css, ".js-ide-commit-new-mr input").set(false)
Loading
Loading
Loading
Loading
@@ -36,6 +36,13 @@ describe 'Multi-file editor new file', :js do
 
find('.js-ide-commit-mode').click
 
# Compact mode depends on the size of window. If it is shorter than MAX_WINDOW_HEIGHT_COMPACT,
# (as it is with CHROME_HEADLESS=0), this initial commit button will exist. Otherwise, if it is
# taller (as it is by default with chrome headless) then the button will not exist.
if page.has_css?('.qa-begin-commit-button')
find('.qa-begin-commit-button').click
end
fill_in('commit-message', with: 'commit message ide')
 
find(:css, ".js-ide-commit-new-mr input").set(false)
Loading
Loading
/* global ListAssignee, ListLabel, ListIssue */
import { mount } from '@vue/test-utils';
import _ from 'underscore';
import { range } from 'lodash';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/issue';
Loading
Loading
@@ -222,7 +222,7 @@ describe('Issue card component', () => {
it('renders 99+ avatar counter', done => {
const assignees = [
...wrapper.props('issue').assignees,
..._.range(5, 103).map(
...range(5, 103).map(
i =>
new ListAssignee({
id: i,
Loading
Loading
import _ from 'underscore';
import { pick, clone } from 'lodash';
import Vuex from 'vuex';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
Loading
Loading
@@ -15,7 +15,7 @@ describe('error tracking settings project dropdown', () => {
wrapper = shallowMount(ProjectDropdown, {
localVue,
propsData: {
..._.pick(
...pick(
defaultProps,
'dropdownLabel',
'invalidProjectLabel',
Loading
Loading
@@ -65,7 +65,7 @@ describe('error tracking settings project dropdown', () => {
 
describe('populated project list', () => {
beforeEach(() => {
wrapper.setProps({ projects: _.clone(projectList), hasProjects: true });
wrapper.setProps({ projects: clone(projectList), hasProjects: true });
 
return wrapper.vm.$nextTick();
});
Loading
Loading
@@ -82,10 +82,10 @@ describe('error tracking settings project dropdown', () => {
});
 
describe('selected project', () => {
const selectedProject = _.clone(projectList[0]);
const selectedProject = clone(projectList[0]);
 
beforeEach(() => {
wrapper.setProps({ projects: _.clone(projectList), selectedProject, hasProjects: true });
wrapper.setProps({ projects: clone(projectList), selectedProject, hasProjects: true });
return wrapper.vm.$nextTick();
});
 
Loading
Loading
@@ -98,7 +98,7 @@ describe('error tracking settings project dropdown', () => {
describe('invalid project selected', () => {
beforeEach(() => {
wrapper.setProps({
projects: _.clone(projectList),
projects: clone(projectList),
selectedProject: staleProject,
isProjectInvalid: true,
});
Loading
Loading
/* eslint-disable import/no-commonjs, no-new */
 
import $ from 'jquery';
import _ from 'underscore';
import MockAdapter from 'axios-mock-adapter';
import '~/behaviors/markdown/render_gfm';
import { createSpyObj } from 'helpers/jest_helpers';
Loading
Loading
@@ -792,14 +791,11 @@ describe('Old Notes (~/notes.js)', () => {
});
 
it('should return form metadata with sanitized formContent from form reference', () => {
jest.spyOn(_, 'escape');
sampleComment = '<script>alert("Boom!");</script>';
$form.find('textarea.js-note-text').val(sampleComment);
 
const { formContent } = notes.getFormData($form);
 
expect(_.escape).toHaveBeenCalledWith(sampleComment);
expect(formContent).toEqual('&lt;script&gt;alert(&quot;Boom!&quot;);&lt;/script&gt;');
});
});
Loading
Loading
@@ -990,7 +986,6 @@ describe('Old Notes (~/notes.js)', () => {
 
beforeEach(() => {
notes = new Notes('', []);
jest.spyOn(_, 'escape');
});
 
it('should return constructed placeholder element for system note based on form contents', () => {
Loading
Loading
import _ from 'underscore';
import { each } from 'lodash';
import { trimText } from 'helpers/text_helper';
import { shallowMount } from '@vue/test-utils';
import { GlLink } from '@gitlab/ui';
Loading
Loading
@@ -58,7 +58,7 @@ describe('User Avatar Link Component', () => {
});
 
it('should return necessary props as defined', () => {
_.each(defaultProps, (val, key) => {
each(defaultProps, (val, key) => {
expect(wrapper.vm[key]).toBeDefined();
});
});
Loading
Loading
Loading
Loading
@@ -122,12 +122,12 @@
dependencies:
"@babel/types" "^7.5.5"
 
"@babel/helper-module-imports@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d"
integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==
"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.0.0-beta.49":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498"
integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==
dependencies:
"@babel/types" "^7.0.0"
"@babel/types" "^7.8.3"
 
"@babel/helper-module-transforms@^7.1.0", "@babel/helper-module-transforms@^7.4.4":
version "7.5.5"
Loading
Loading
@@ -683,10 +683,10 @@
globals "^11.1.0"
lodash "^4.17.13"
 
"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0":
version "7.6.1"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648"
integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==
"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0", "@babel/types@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c"
integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==
dependencies:
esutils "^2.0.2"
lodash "^4.17.13"
Loading
Loading
@@ -1890,6 +1890,17 @@ babel-plugin-jest-hoist@^24.6.0:
dependencies:
"@types/babel__traverse" "^7.0.6"
 
babel-plugin-lodash@^3.3.4:
version "3.3.4"
resolved "https://registry.yarnpkg.com/babel-plugin-lodash/-/babel-plugin-lodash-3.3.4.tgz#4f6844358a1340baed182adbeffa8df9967bc196"
integrity sha512-yDZLjK7TCkWl1gpBeBGmuaDIFhZKmkoL+Cu2MUUjv5VxUZx/z7tBGBCBcQs5RI1Bkz5LLmNdjx7paOyQtMovyg==
dependencies:
"@babel/helper-module-imports" "^7.0.0-beta.49"
"@babel/types" "^7.0.0-beta.49"
glob "^7.1.1"
lodash "^4.17.10"
require-package-name "^2.0.1"
babel-plugin-rewire@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/babel-plugin-rewire/-/babel-plugin-rewire-1.2.0.tgz#822562d72ed2c84e47c0f95ee232c920853e9d89"
Loading
Loading
@@ -9725,6 +9736,11 @@ require-main-filename@^2.0.0:
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
 
require-package-name@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/require-package-name/-/require-package-name-2.0.1.tgz#c11e97276b65b8e2923f75dabf5fb2ef0c3841b9"
integrity sha1-wR6XJ2tluOKSP3Xav1+y7ww4Qbk=
require-uncached@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment