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-15 00:09:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-15 00:09:55 +0300
commitcde60c9291a22ff0921f703568c4daef4a65ead7 (patch)
tree15d6d3f5cbe339c00a39a60e7f8b7be295c8a739 /spec/frontend/pipelines
parent6d2fcd332783033432e4de1d8b1de6720e20f557 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipelines')
-rw-r--r--spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js6
-rw-r--r--spec/frontend/pipelines/components/jobs/jobs_app_spec.js9
-rw-r--r--spec/frontend/pipelines/graph/graph_view_selector_spec.js1
-rw-r--r--spec/frontend/pipelines/graph/job_group_dropdown_spec.js2
-rw-r--r--spec/frontend/pipelines/graph/linked_pipeline_spec.js2
-rw-r--r--spec/frontend/pipelines/pipelines_spec.js1
6 files changed, 11 insertions, 10 deletions
diff --git a/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js b/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js
index 3b5632a8a4e..bfbb5f934b9 100644
--- a/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js
+++ b/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js
@@ -49,15 +49,15 @@ describe('Failed Jobs App', () => {
});
describe('loading spinner', () => {
- beforeEach(() => {
+ it('displays loading spinner when fetching failed jobs', () => {
createComponent(resolverSpy);
- });
- it('displays loading spinner when fetching failed jobs', () => {
expect(findLoadingSpinner().exists()).toBe(true);
});
it('hides loading spinner after the failed jobs have been fetched', async () => {
+ createComponent(resolverSpy);
+
await waitForPromises();
expect(findLoadingSpinner().exists()).toBe(false);
diff --git a/spec/frontend/pipelines/components/jobs/jobs_app_spec.js b/spec/frontend/pipelines/components/jobs/jobs_app_spec.js
index 81e19a6c221..89b6f764b2f 100644
--- a/spec/frontend/pipelines/components/jobs/jobs_app_spec.js
+++ b/spec/frontend/pipelines/components/jobs/jobs_app_spec.js
@@ -50,20 +50,23 @@ describe('Jobs app', () => {
});
describe('loading spinner', () => {
- beforeEach(async () => {
+ const setup = async () => {
createComponent(resolverSpy);
await waitForPromises();
triggerInfiniteScroll();
- });
+ };
+
+ it('displays loading spinner when fetching more jobs', async () => {
+ await setup();
- it('displays loading spinner when fetching more jobs', () => {
expect(findLoadingSpinner().exists()).toBe(true);
expect(findSkeletonLoader().exists()).toBe(false);
});
it('hides loading spinner after jobs have been fetched', async () => {
+ await setup();
await waitForPromises();
expect(findLoadingSpinner().exists()).toBe(false);
diff --git a/spec/frontend/pipelines/graph/graph_view_selector_spec.js b/spec/frontend/pipelines/graph/graph_view_selector_spec.js
index f574f4dccc5..4e79c7e73cc 100644
--- a/spec/frontend/pipelines/graph/graph_view_selector_spec.js
+++ b/spec/frontend/pipelines/graph/graph_view_selector_spec.js
@@ -91,7 +91,6 @@ describe('the graph view selector component', () => {
describe('events', () => {
beforeEach(() => {
- jest.useFakeTimers();
createComponent({
mountFn: mount,
props: {
diff --git a/spec/frontend/pipelines/graph/job_group_dropdown_spec.js b/spec/frontend/pipelines/graph/job_group_dropdown_spec.js
index 5d8e70bac31..d8afb33e148 100644
--- a/spec/frontend/pipelines/graph/job_group_dropdown_spec.js
+++ b/spec/frontend/pipelines/graph/job_group_dropdown_spec.js
@@ -79,7 +79,7 @@ describe('job group dropdown component', () => {
it('renders button with group name and size', () => {
expect(findButton().text()).toContain(group.name);
- expect(findButton().text()).toContain(group.size);
+ expect(findButton().text()).toContain(group.size.toString());
});
it('renders dropdown with jobs', () => {
diff --git a/spec/frontend/pipelines/graph/linked_pipeline_spec.js b/spec/frontend/pipelines/graph/linked_pipeline_spec.js
index fd97c2dbe77..cdeaa0db61d 100644
--- a/spec/frontend/pipelines/graph/linked_pipeline_spec.js
+++ b/spec/frontend/pipelines/graph/linked_pipeline_spec.js
@@ -103,7 +103,7 @@ describe('Linked pipeline', () => {
expect(findCardTooltip().text()).toContain(mockPipeline.project.name);
expect(findCardTooltip().text()).toContain(mockPipeline.status.label);
expect(findCardTooltip().text()).toContain(mockPipeline.sourceJob.name);
- expect(findCardTooltip().text()).toContain(mockPipeline.id);
+ expect(findCardTooltip().text()).toContain(mockPipeline.id.toString());
});
it('should display multi-project label when pipeline project id is not the same as triggered pipeline project id', () => {
diff --git a/spec/frontend/pipelines/pipelines_spec.js b/spec/frontend/pipelines/pipelines_spec.js
index de9f394db43..ad6d650670a 100644
--- a/spec/frontend/pipelines/pipelines_spec.js
+++ b/spec/frontend/pipelines/pipelines_spec.js
@@ -665,7 +665,6 @@ describe('Pipelines', () => {
it('stops polling & restarts polling', async () => {
findStagesDropdownToggle().trigger('click');
-
await waitForPromises();
expect(cancelMock).not.toHaveBeenCalled();