Skip to content
Snippets Groups Projects
Commit 9653e4df authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch '370204-fix-broken-master' into 'master'

Fix logic for waiting on CI YAML content

See merge request !94969
parents e07a8bef 8d34de53
No related branches found
No related tags found
1 merge request!94969Fix logic for waiting on CI YAML content
Pipeline #608543463 failed
......@@ -16,10 +16,6 @@
visit project_ci_lint_path(project)
editor_set_value(yaml_content)
wait_for('YAML content') do
find(content_selector).text.present?
end
end
describe 'YAML parsing' do
......
......@@ -13,6 +13,10 @@ def editor_set_value(value)
editor = find('.monaco-editor')
uri = editor['data-uri']
execute_script("localMonaco.getModel('#{uri}').setValue('#{escape_javascript(value)}')")
# We only check that the first line is present because when the content is long,
# only a part of the text will be rendered in the DOM due to scrolling
page.has_selector?('.gl-source-editor .view-lines', text: value.lines.first)
end
end
end
......
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