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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-09 21:07:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-09 21:07:58 +0300
commitb3986e06460cc2bff35c1c1e7902579b46c1d4c6 (patch)
tree3646975b83dd94a772a5a943ca1c5e7872646813 /spec/helpers/ide_helper_spec.rb
parentfa0535cda4c99da0ca078882c610fd3b3564f991 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/ide_helper_spec.rb')
-rw-r--r--spec/helpers/ide_helper_spec.rb33
1 files changed, 29 insertions, 4 deletions
diff --git a/spec/helpers/ide_helper_spec.rb b/spec/helpers/ide_helper_spec.rb
index 7f657caa986..47500b8e21e 100644
--- a/spec/helpers/ide_helper_spec.rb
+++ b/spec/helpers/ide_helper_spec.rb
@@ -103,10 +103,7 @@ RSpec.describe IdeHelper, feature_category: :web_ide do
'new-web-ide-help-page-path' =>
help_page_path('user/project/web_ide/index.md', anchor: 'vscode-reimplementation'),
'csp-nonce' => 'test-csp-nonce',
- 'ide-remote-path' => ide_remote_path(remote_host: ':remote_host', remote_path: ':remote_path'),
- 'editor-font-family' => 'GitLab Mono',
- 'editor-font-format' => 'woff2',
- 'editor-font-src-url' => a_string_matching(%r{gitlab-mono/GitLabMono})
+ 'ide-remote-path' => ide_remote_path(remote_host: ':remote_host', remote_path: ':remote_path')
}
end
@@ -119,6 +116,34 @@ RSpec.describe IdeHelper, feature_category: :web_ide do
.to include(base_data)
end
+ it 'includes editor font configuration' do
+ ide_data = helper.ide_data(project: nil, fork_info: fork_info, params: params)
+ editor_font = ::Gitlab::Json.parse(ide_data.fetch('editor-font'), symbolize_names: true)
+
+ expect(editor_font).to include({
+ fallback_font_family: 'monospace',
+ font_faces: [
+ {
+ family: 'GitLab Mono',
+ display: 'block',
+ src: [{
+ url: a_string_matching(%r{gitlab-mono/GitLabMono-[^I]}),
+ format: 'woff2'
+ }]
+ },
+ {
+ family: 'GitLab Mono',
+ display: 'block',
+ style: 'italic',
+ src: [{
+ url: a_string_matching(%r{gitlab-mono/GitLabMono-Italic}),
+ format: 'woff2'
+ }]
+ }
+ ]
+ })
+ end
+
it 'does not use new web ide if feature flag is disabled' do
stub_feature_flags(vscode_web_ide: false)