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:
Diffstat (limited to 'spec/frontend/import_entities/import_projects/store/mutations_spec.js')
-rw-r--r--spec/frontend/import_entities/import_projects/store/mutations_spec.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/frontend/import_entities/import_projects/store/mutations_spec.js b/spec/frontend/import_entities/import_projects/store/mutations_spec.js
index e062d889325..77fae951300 100644
--- a/spec/frontend/import_entities/import_projects/store/mutations_spec.js
+++ b/spec/frontend/import_entities/import_projects/store/mutations_spec.js
@@ -232,6 +232,35 @@ describe('import_projects store mutations', () => {
updatedProjects[0].importStatus,
);
});
+
+ it('updates import stats of project', () => {
+ const repoId = 1;
+ state = {
+ repositories: [
+ { importedProject: { id: repoId, stats: {} }, importStatus: STATUSES.STARTED },
+ ],
+ };
+ const newStats = {
+ fetched: {
+ label: 10,
+ },
+ imported: {
+ label: 1,
+ },
+ };
+
+ const updatedProjects = [
+ {
+ id: repoId,
+ importStatus: STATUSES.FINISHED,
+ stats: newStats,
+ },
+ ];
+
+ mutations[types.RECEIVE_JOBS_SUCCESS](state, updatedProjects);
+
+ expect(state.repositories[0].importedProject.stats).toStrictEqual(newStats);
+ });
});
describe(`${types.REQUEST_NAMESPACES}`, () => {