diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-20 15:07:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-20 15:07:25 +0300 |
commit | 07b1e2691206717206d40f9c7f0abfd1a30ecbdd (patch) | |
tree | a5b6b9655d73f158c22ecc70bcb65535226fd4ac /spec/frontend | |
parent | 65a0673d76bb86d6acca6dc3ab42dc91a04f56c2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
5 files changed, 87 insertions, 5 deletions
diff --git a/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/secrets.yml b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/secrets.yml index 14ba930b394..4baf4c6b850 100644 --- a/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/secrets.yml +++ b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/secrets.yml @@ -1,4 +1,4 @@ -job_with_secrets_without_vault: +job_with_secrets_without_any_vault_provider: script: - echo $TEST_DB_PASSWORD secrets: @@ -37,3 +37,37 @@ job_with_secrets_with_missing_required_engine_property: vault: engine: path: kv + +job_with_azure_key_vault_secrets_with_extra_properties: + script: + - echo $TEST_DB_PASSWORD + secrets: + TEST_DB_PASSWORD: + azure_key_vault: + name: mypass + extra_prop: TEST + +job_with_secrets_with_invalid_azure_key_vault_property: + script: + - echo $TEST_DB_PASSWORD + secrets: + TEST_DB_PASSWORD: + azure_key_vault: + invalid: TEST + +job_with_secrets_with_missing_required_azure_key_vault_property: + script: + - echo $TEST_DB_PASSWORD + secrets: + TEST_DB_PASSWORD: + azure_key_vault: + version: latest + +job_with_secrets_with_missing_required_name_property: + script: + - echo $TEST_DB_PASSWORD + secrets: + TEST_DB_PASSWORD: + azure_key_vault: + name: + version: latest diff --git a/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/secrets.yml b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/secrets.yml index 083cb4348ed..af3107974b9 100644 --- a/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/secrets.yml +++ b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/secrets.yml @@ -26,3 +26,20 @@ valid_job_with_secrets_with_every_vault_keyword: field: password file: true token: $TEST_TOKEN + +valid_job_with_azure_key_vault_secrets_name: + script: + - echo $TEST_DB_PASSWORD + secrets: + TEST_DB_PASSWORD: + azure_key_vault: + name: 'test' + +valid_job_with_azure_key_vault_secrets_name_and_version: + script: + - echo $TEST_DB_PASSWORD + secrets: + TEST_DB_PASSWORD: + azure_key_vault: + name: 'test' + version: 'version' diff --git a/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_jobs_list_spec.js b/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_jobs_list_spec.js index 8c47169d15f..967812cc627 100644 --- a/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_jobs_list_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_jobs_list_spec.js @@ -23,6 +23,7 @@ describe('FailedJobsList component', () => { const showToast = jest.fn(); const defaultProps = { + failedJobsCount: 0, graphqlResourceEtag: 'api/graphql', isPipelineActive: false, pipelineIid: 1, @@ -198,6 +199,34 @@ describe('FailedJobsList component', () => { }); }); + describe('When the job count changes from REST', () => { + beforeEach(() => { + mockFailedJobsResponse.mockResolvedValue(failedJobsMockEmpty); + + createComponent(); + }); + + describe('and the count is the same', () => { + it('does not re-fetch the query', async () => { + expect(mockFailedJobsResponse).toHaveBeenCalledTimes(1); + + await wrapper.setProps({ failedJobsCount: 0 }); + + expect(mockFailedJobsResponse).toHaveBeenCalledTimes(1); + }); + }); + + describe('and the count is different', () => { + it('re-fetches the query', async () => { + expect(mockFailedJobsResponse).toHaveBeenCalledTimes(1); + + await wrapper.setProps({ failedJobsCount: 10 }); + + expect(mockFailedJobsResponse).toHaveBeenCalledTimes(2); + }); + }); + }); + describe('when an error occurs loading jobs', () => { const errorMessage = "We couldn't fetch jobs for you because you are not qualified"; diff --git a/spec/frontend/snippets/components/__snapshots__/snippet_description_edit_spec.js.snap b/spec/frontend/snippets/components/__snapshots__/snippet_description_edit_spec.js.snap index 05c1a6dd11d..e783927f87b 100644 --- a/spec/frontend/snippets/components/__snapshots__/snippet_description_edit_spec.js.snap +++ b/spec/frontend/snippets/components/__snapshots__/snippet_description_edit_spec.js.snap @@ -89,10 +89,12 @@ exports[`Snippet Description Edit component rendering matches the snapshot 1`] = </div> <div - class="js-vue-md-preview md-preview-holder gl-px-5 md" + class="js-vue-md-preview md-preview-holder gl-px-5" style="display: none;" > - <div /> + <div + class="md" + /> </div> <!----> diff --git a/spec/frontend/work_items/components/work_item_assignees_spec.js b/spec/frontend/work_items/components/work_item_assignees_spec.js index ff1998ab2ed..50a8847032e 100644 --- a/spec/frontend/work_items/components/work_item_assignees_spec.js +++ b/spec/frontend/work_items/components/work_item_assignees_spec.js @@ -107,7 +107,7 @@ describe('WorkItemAssignees component', () => { it('container does not have shadow by default', () => { createComponent(); - expect(findTokenSelector().props('containerClass')).toBe('gl-shadow-none!'); + expect(findTokenSelector().props('containerClass')).toContain('gl-shadow-none!'); }); it('container has shadow after focusing token selector', async () => { @@ -415,7 +415,7 @@ describe('WorkItemAssignees component', () => { findTokenSelector().vm.$emit('input', dropdownItems); await nextTick(); - expect(findTokenSelector().props('containerClass')).toBe('gl-shadow-none!'); + expect(findTokenSelector().props('containerClass')).toContain('gl-shadow-none!'); }); it('calls the mutation for updating assignees with the correct input', async () => { |