Commit bc0843c9 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 15d67855 d56b76a5
......@@ -163,6 +163,7 @@ export default class LazyLoader {
img.removeAttribute('data-src');
img.classList.remove('lazy');
img.classList.add('js-lazy-loaded');
img.classList.add('qa-js-lazy-loaded');
}
}
}
import initUserInternalRegexPlaceholder from '../../application_settings/account_and_limits';
document.addEventListener('DOMContentLoaded', initUserInternalRegexPlaceholder());
import initAdmin from './admin';
import initUserInternalRegexPlaceholder from './application_settings/account_and_limits';
document.addEventListener('DOMContentLoaded', () => {
initAdmin();
initUserInternalRegexPlaceholder();
});
document.addEventListener('DOMContentLoaded', initAdmin());
.row.empty-state.labels
.col-12
.svg-content
.svg-content.qa-label-svg
= image_tag 'illustrations/labels.svg'
.col-12
.text-content
......
---
title: Load initUserInternalRegexPlaceholder only when required
merge_request: 24522
author:
type: fixed
......@@ -6,7 +6,22 @@ module QA
element :label_create_new
end
view 'app/views/shared/empty_states/_labels.html.haml' do
element :label_svg
end
view 'app/assets/javascripts/lazy_loader.js' do
element :js_lazy_loaded
end
def go_to_new_label
# The 'labels.svg' takes a fraction of a second to load after which the "New label" button shifts up a bit
# This can cause webdriver to miss the hit so we wait for the svg to load (implicitly with has_element?)
# before clicking the button.
within_element(:label_svg) do
has_element?(:js_lazy_loaded)
end
click_element :label_create_new
end
end
......
......@@ -193,6 +193,7 @@ if (process.env.BABEL_ENV === 'coverage') {
'./terminal/terminal_bundle.js',
'./users/users_bundle.js',
'./issue_show/index.js',
'./pages/admin/application_settings/show/index.js',
];
describe('Uncovered files', function() {
......
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