diff options
-rw-r--r-- | app/views/import/github/new.html.haml | 4 | ||||
-rw-r--r-- | doc/user/application_security/sast/index.md | 10 | ||||
-rw-r--r-- | qa/qa/page/project/import/github.rb | 12 | ||||
-rw-r--r-- | qa/qa/resource/project_imported_from_github.rb | 1 |
4 files changed, 12 insertions, 15 deletions
diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml index 518c44cc687..e86d4236be8 100644 --- a/app/views/import/github/new.html.haml +++ b/app/views/import/github/new.html.haml @@ -21,7 +21,7 @@ = form_tag personal_access_token_import_github_path, method: :post do .form-group %label.label-bold= _('Personal Access Token') - = text_field_tag :personal_access_token, '', class: 'form-control', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' } + = text_field_tag :personal_access_token, '', class: 'form-control', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' }, data: { qa_selector: 'personal_access_token_field' } %span.form-text.text-muted = import_github_personal_access_token_message @@ -29,4 +29,4 @@ .form-actions.d-flex.justify-content-end = link_to _('Cancel'), new_project_path, class: 'btn' - = submit_tag _('Authenticate'), class: 'btn btn-success ml-2' + = submit_tag _('Authenticate'), class: 'btn btn-success ml-2', data: { qa_selector: 'authenticate_button' } diff --git a/doc/user/application_security/sast/index.md b/doc/user/application_security/sast/index.md index 95027e99c00..5693c6c50ec 100644 --- a/doc/user/application_security/sast/index.md +++ b/doc/user/application_security/sast/index.md @@ -100,7 +100,7 @@ Add the following to your `.gitlab-ci.yml` file: ```yaml include: - template: SAST.gitlab-ci.yml + - template: SAST.gitlab-ci.yml ``` The included template will create a `sast` job in your CI/CD pipeline and scan @@ -124,7 +124,7 @@ set the `SAST_GOSEC_LEVEL` variable to `2`: ```yaml include: - template: SAST.gitlab-ci.yml + - template: SAST.gitlab-ci.yml variables: SAST_GOSEC_LEVEL: 2 @@ -141,7 +141,7 @@ template inclusion and specify any additional keys under it. For example: ```yaml include: - template: SAST.gitlab-ci.yml + - template: SAST.gitlab-ci.yml sast: variables: @@ -178,7 +178,7 @@ This does not require running the executor in privileged mode. For example: ```yaml include: - template: SAST.gitlab-ci.yml + - template: SAST.gitlab-ci.yml variables: SAST_DISABLE_DIND: "true" @@ -196,7 +196,7 @@ kubesec analyzer. In `.gitlab-ci.yml`, define: ```yaml include: - template: SAST.gitlab-ci.yml + - template: SAST.gitlab-ci.yml variables: SCAN_KUBERNETES_MANIFESTS: "true" diff --git a/qa/qa/page/project/import/github.rb b/qa/qa/page/project/import/github.rb index cc0c4e1e835..e73db92de42 100644 --- a/qa/qa/page/project/import/github.rb +++ b/qa/qa/page/project/import/github.rb @@ -8,8 +8,8 @@ module QA include Page::Component::Select2 view 'app/views/import/github/new.html.haml' do - element :personal_access_token_field, 'text_field_tag :personal_access_token' # rubocop:disable QA/ElementWithPattern - element :authenticate_button, "submit_tag _('Authenticate')" # rubocop:disable QA/ElementWithPattern + element :personal_access_token_field + element :authenticate_button end view 'app/assets/javascripts/import_projects/components/provider_repo_table_row.vue' do @@ -20,11 +20,9 @@ module QA end def add_personal_access_token(personal_access_token) - fill_in 'personal_access_token', with: personal_access_token - end - - def list_repos - click_button 'List your GitHub repositories' + fill_element(:personal_access_token_field, personal_access_token) + click_element(:authenticate_button) + finished_loading? end def import!(full_path, name) diff --git a/qa/qa/resource/project_imported_from_github.rb b/qa/qa/resource/project_imported_from_github.rb index 3e25235e6b8..e5ecaeae139 100644 --- a/qa/qa/resource/project_imported_from_github.rb +++ b/qa/qa/resource/project_imported_from_github.rb @@ -23,7 +23,6 @@ module QA Page::Project::Import::Github.perform do |import_page| import_page.add_personal_access_token(@personal_access_token) - import_page.list_repos import_page.import!(@github_repository_path, @name) end end |