diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-13 21:09:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-13 21:09:31 +0000 |
commit | c19dce027b11e8172105685f2a306be51fdac8d3 (patch) | |
tree | fc613edfe02d94caceb5cf58d933828480172259 /spec/frontend | |
parent | feb61d56e7ce9ab2cd994486bbad9887c3c023f5 (diff) | |
download | gitlab-ce-c19dce027b11e8172105685f2a306be51fdac8d3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
9 files changed, 32 insertions, 10 deletions
diff --git a/spec/frontend/blob/components/blob_header_filepath_spec.js b/spec/frontend/blob/components/blob_header_filepath_spec.js index 43057353051..067a4ae61a0 100644 --- a/spec/frontend/blob/components/blob_header_filepath_spec.js +++ b/spec/frontend/blob/components/blob_header_filepath_spec.js @@ -65,7 +65,7 @@ describe('Blob Header Filepath', () => { {}, { scopedSlots: { - filepathPrepend: `<span>${slotContent}</span>`, + 'filepath-prepend': `<span>${slotContent}</span>`, }, }, ); diff --git a/spec/frontend/clusters/components/__snapshots__/applications_spec.js.snap b/spec/frontend/clusters/components/__snapshots__/applications_spec.js.snap index b6e89281fef..744ef318260 100644 --- a/spec/frontend/clusters/components/__snapshots__/applications_spec.js.snap +++ b/spec/frontend/clusters/components/__snapshots__/applications_spec.js.snap @@ -73,7 +73,7 @@ exports[`Applications Ingress application shows the correct warning message 1`] exports[`Applications Knative application shows the correct description 1`] = ` <span - data-testid="installedVia" + data-testid="installed-via" > installed via <a diff --git a/spec/frontend/clusters/components/applications_spec.js b/spec/frontend/clusters/components/applications_spec.js index e0ccf36e868..5438f3053a8 100644 --- a/spec/frontend/clusters/components/applications_spec.js +++ b/spec/frontend/clusters/components/applications_spec.js @@ -429,7 +429,7 @@ describe('Applications', () => { await wrapper.vm.$nextTick(); - expect(findByTestId('installedVia').element).toMatchSnapshot(); + expect(findByTestId('installed-via').element).toMatchSnapshot(); }); it('emits saveKnativeDomain event when knative domain editor emits save event', () => { diff --git a/spec/frontend/import_projects/store/actions_spec.js b/spec/frontend/import_projects/store/actions_spec.js index f8af9f40f4c..06afb20c6a2 100644 --- a/spec/frontend/import_projects/store/actions_spec.js +++ b/spec/frontend/import_projects/store/actions_spec.js @@ -69,6 +69,7 @@ describe('import_projects store actions', () => { importStatus: STATUSES.NONE, }, ], + provider: 'provider', }; localState.getImportTarget = getImportTarget(localState); @@ -150,7 +151,28 @@ describe('import_projects store actions', () => { ); }); - describe('when /home/xanf/projects/gdk/gitlab/spec/frontend/import_projects/store/actions_spec.jsfiltered', () => { + describe('when rate limited', () => { + it('commits RECEIVE_REPOS_ERROR and shows rate limited error message', async () => { + mock.onGet(`${TEST_HOST}/endpoint.json?filter=filter`).reply(429); + + await testAction( + fetchRepos, + null, + { ...localState, filter: 'filter' }, + [ + { type: SET_PAGE, payload: 1 }, + { type: REQUEST_REPOS }, + { type: SET_PAGE, payload: 0 }, + { type: RECEIVE_REPOS_ERROR }, + ], + [], + ); + + expect(createFlash).toHaveBeenCalledWith('Provider rate limit exceeded. Try again later'); + }); + }); + + describe('when filtered', () => { it('fetches repos with filter applied', () => { mock.onGet(`${TEST_HOST}/endpoint.json?filter=filter`).reply(200, payload); diff --git a/spec/frontend/issuable/related_issues/components/related_issues_block_spec.js b/spec/frontend/issuable/related_issues/components/related_issues_block_spec.js index b758b85beef..dd05f49b458 100644 --- a/spec/frontend/issuable/related_issues/components/related_issues_block_spec.js +++ b/spec/frontend/issuable/related_issues/components/related_issues_block_spec.js @@ -56,7 +56,7 @@ describe('RelatedIssuesBlock', () => { pathIdSeparator: PathIdSeparator.Issue, issuableType: 'issue', }, - slots: { headerText }, + slots: { 'header-text': headerText }, }); expect(wrapper.find('.card-title').html()).toContain(headerText); @@ -72,7 +72,7 @@ describe('RelatedIssuesBlock', () => { pathIdSeparator: PathIdSeparator.Issue, issuableType: 'issue', }, - slots: { headerActions }, + slots: { 'header-actions': headerActions }, }); expect(wrapper.find('[data-testid="custom-button"]').html()).toBe(headerActions); diff --git a/spec/frontend/monitoring/components/dashboard_panel_spec.js b/spec/frontend/monitoring/components/dashboard_panel_spec.js index ee0e1fd3176..1808faf8f0e 100644 --- a/spec/frontend/monitoring/components/dashboard_panel_spec.js +++ b/spec/frontend/monitoring/components/dashboard_panel_spec.js @@ -106,7 +106,7 @@ describe('Dashboard Panel', () => { {}, { slots: { - topLeft: `<div class="top-left-content">OK</div>`, + 'top-left': `<div class="top-left-content">OK</div>`, }, }, ); diff --git a/spec/frontend/monitoring/components/dashboard_spec.js b/spec/frontend/monitoring/components/dashboard_spec.js index b7a0ea46b61..27e479ba498 100644 --- a/spec/frontend/monitoring/components/dashboard_spec.js +++ b/spec/frontend/monitoring/components/dashboard_spec.js @@ -508,7 +508,7 @@ describe('Dashboard', () => { const mockKeyup = key => window.dispatchEvent(new KeyboardEvent('keyup', { key })); const MockPanel = { - template: `<div><slot name="topLeft"/></div>`, + template: `<div><slot name="top-left"/></div>`, }; beforeEach(() => { diff --git a/spec/frontend/reports/components/report_section_spec.js b/spec/frontend/reports/components/report_section_spec.js index a620b5d9afc..2d228313a9b 100644 --- a/spec/frontend/reports/components/report_section_spec.js +++ b/spec/frontend/reports/components/report_section_spec.js @@ -244,7 +244,7 @@ describe('Report section', () => { hasIssues: true, }, slots: { - actionButtons: ['Action!'], + 'action-buttons': ['Action!'], }, }); }); diff --git a/spec/frontend/vue_shared/components/paginated_table_with_search_and_tabs/paginated_table_with_search_and_tabs_spec.js b/spec/frontend/vue_shared/components/paginated_table_with_search_and_tabs/paginated_table_with_search_and_tabs_spec.js index d943aaf3e5f..0f7c8e97635 100644 --- a/spec/frontend/vue_shared/components/paginated_table_with_search_and_tabs/paginated_table_with_search_and_tabs_spec.js +++ b/spec/frontend/vue_shared/components/paginated_table_with_search_and_tabs/paginated_table_with_search_and_tabs_spec.js @@ -70,7 +70,7 @@ describe('AlertManagementEmptyState', () => { ...props, }, slots: { - 'emtpy-state': EmptyStateSlot, + 'empty-state': EmptyStateSlot, 'header-actions': HeaderActionsSlot, title: TitleSlot, table: TableSlot, |