Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/features/source_editor_spec_helpers.rb')
-rw-r--r--spec/support/helpers/features/source_editor_spec_helpers.rb26
1 files changed, 10 insertions, 16 deletions
diff --git a/spec/support/helpers/features/source_editor_spec_helpers.rb b/spec/support/helpers/features/source_editor_spec_helpers.rb
index f7eb2a52507..e20ded60b01 100644
--- a/spec/support/helpers/features/source_editor_spec_helpers.rb
+++ b/spec/support/helpers/features/source_editor_spec_helpers.rb
@@ -2,24 +2,18 @@
# These helpers help you interact within the Source Editor (single-file editor, snippets, etc.).
#
-module Spec
- module Support
- module Helpers
- module Features
- module SourceEditorSpecHelpers
- include ActionView::Helpers::JavaScriptHelper
+module Features
+ module SourceEditorSpecHelpers
+ include ActionView::Helpers::JavaScriptHelper
- def editor_set_value(value)
- editor = find('.monaco-editor')
- uri = editor['data-uri']
- execute_script("localMonaco.getModel('#{uri}').setValue('#{escape_javascript(value)}')")
+ 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
+ # 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