Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-16 15:08:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-16 15:08:40 +0300
commitd43cb0f90723230c4aa617cb17a0cb6fb099f47e (patch)
treea8116eeba909c07909ccc030e8d40ab40d198aa3 /spec/frontend/import_entities
parentc8278708638ed998a8ecfeac26e7d9561b6125f8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/import_entities')
-rw-r--r--spec/frontend/import_entities/import_groups/components/import_table_spec.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/frontend/import_entities/import_groups/components/import_table_spec.js b/spec/frontend/import_entities/import_groups/components/import_table_spec.js
index 24881237b85..cdc508a0033 100644
--- a/spec/frontend/import_entities/import_groups/components/import_table_spec.js
+++ b/spec/frontend/import_entities/import_groups/components/import_table_spec.js
@@ -56,7 +56,7 @@ describe('import table', () => {
const selectRow = (idx) =>
wrapper.findAll('tbody td input[type=checkbox]').at(idx).setChecked(true);
- const createComponent = ({ bulkImportSourceGroups, importGroups }) => {
+ const createComponent = ({ bulkImportSourceGroups, importGroups, defaultTargetNamespace }) => {
apolloProvider = createMockApollo([], {
Query: {
availableNamespaces: () => availableNamespacesFixture,
@@ -73,6 +73,7 @@ describe('import table', () => {
jobsPath: '/fake_job_path',
sourceUrl: SOURCE_URL,
historyPath: '/fake_history_path',
+ defaultTargetNamespace,
},
apolloProvider,
});
@@ -165,6 +166,27 @@ describe('import table', () => {
expect(targetNamespaceDropdownButton.text()).toBe('No parent');
});
+ it('respects default namespace if provided', async () => {
+ const targetNamespace = availableNamespacesFixture[1];
+
+ createComponent({
+ bulkImportSourceGroups: () => ({
+ nodes: FAKE_GROUPS,
+ pageInfo: FAKE_PAGE_INFO,
+ versionValidation: FAKE_VERSION_VALIDATION,
+ }),
+ defaultTargetNamespace: targetNamespace.id,
+ });
+
+ await waitForPromises();
+
+ const firstRow = wrapper.find('tbody tr');
+ const targetNamespaceDropdownButton = findTargetNamespaceDropdown(firstRow).find(
+ '[aria-haspopup]',
+ );
+ expect(targetNamespaceDropdownButton.text()).toBe(targetNamespace.fullPath);
+ });
+
it('does not render status string when result list is empty', async () => {
createComponent({
bulkImportSourceGroups: jest.fn().mockResolvedValue({