Skip to content
代码片段 群组 项目
未验证 提交 6a3f81b6 编辑于 作者: Ramya Authappan's avatar Ramya Authappan 提交者: GitLab
浏览文件

Merge branch 'jmc-improve-cs-wedide-error-message' into 'master'

E2E test: check for code suggestion error in webide test

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143621



Merged-by: default avatarRamya Authappan <rauthappan@gitlab.com>
Approved-by: default avatarRamya Authappan <rauthappan@gitlab.com>
Approved-by: default avatarWill Meek <wmeek@gitlab.com>
Co-authored-by: default avatarJay McCure <jmccure@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -255,17 +255,14 @@ def add_prompt_into_a_file(file_name, prompt_data)
end
def wait_until_code_suggestions_enabled
wait_until(max_duration: 30, message: 'Wait for Code Suggestions extension to be enabled') do
wait_until(max_duration: 30, skip_finished_loading_check_on_refresh: true,
message: 'Wait for Code Suggestions extension to be enabled') do
raise code_suggestions_error if has_code_suggestions_error?
has_code_suggestions_status?('enabled')
end
end
def has_code_suggestions_status?(status)
page.document.has_css?(
"#GitLab\\.gitlab-workflow\\.gl\\.status\\.code_suggestions[aria-label*=#{status.downcase}]"
)
end
def wait_for_code_suggestion
within_vscode_editor do
within_file_editor do
......@@ -316,6 +313,22 @@ def create_item(click_item, item_name)
end
end
end
def code_suggestions_icon_selector(status)
"#GitLab\\.gitlab-workflow\\.gl\\.status\\.code_suggestions[aria-label*=#{status.downcase}]"
end
def has_code_suggestions_status?(status)
page.document.has_css?(code_suggestions_icon_selector(status))
end
def has_code_suggestions_error?
!page.document.has_no_css?(code_suggestions_icon_selector('error'))
end
def code_suggestions_error
page.document.find(code_suggestions_icon_selector('error'))['aria-label']
end
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册