diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-08 18:10:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-08 18:10:26 +0300 |
commit | 6e734c809b18a0470d81c78e1ecd9b3f8278de89 (patch) | |
tree | 882251dce981323bc3c6e305cbc0f41aa4c39aae /spec/frontend/import_entities | |
parent | 9157fbe06fde892c647403f477ce31c888cbc822 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/import_entities')
-rw-r--r-- | spec/frontend/import_entities/import_projects/components/import_projects_table_spec.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/spec/frontend/import_entities/import_projects/components/import_projects_table_spec.js b/spec/frontend/import_entities/import_projects/components/import_projects_table_spec.js index 2c601bcf99d..27f642d15c8 100644 --- a/spec/frontend/import_entities/import_projects/components/import_projects_table_spec.js +++ b/spec/frontend/import_entities/import_projects/components/import_projects_table_spec.js @@ -142,6 +142,29 @@ describe('ImportProjectsTable', () => { }, ); + it.each` + importingRepoCount | buttonMessage + ${1} | ${'Importing 1 repository'} + ${5} | ${'Importing 5 repositories'} + `( + 'sets the button text to "$buttonMessage" when importing repos', + ({ importingRepoCount, buttonMessage }) => { + createComponent({ + state: { + providerRepos: [providerRepo], + }, + getters: { + hasIncompatibleRepos: () => false, + importAllCount: () => 10, + isImportingAnyRepo: () => true, + importingRepoCount: () => importingRepoCount, + }, + }); + + expect(findImportAllButton().text()).toBe(buttonMessage); + }, + ); + it('renders an empty state if there are no repositories available', () => { createComponent({ state: { repositories: [] } }); @@ -168,7 +191,7 @@ describe('ImportProjectsTable', () => { }); it('shows loading spinner when import is in progress', () => { - createComponent({ getters: { isImportingAnyRepo: () => true } }); + createComponent({ getters: { isImportingAnyRepo: () => true, importallCount: () => 1 } }); expect(findImportAllButton().props().loading).toBe(true); }); |