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:
authorFilipa Lacerda <filipa@gitlab.com>2018-08-01 17:57:05 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-08-02 19:59:25 +0300
commit15511ed14f595b30de90f32b3751c8599550e4c7 (patch)
treef1d69b6510ebcdc5d1c2b5c4007f693871c053f5 /spec/javascripts
parentd40ef4c83e90823221a66c746f414faf7da442e8 (diff)
Changes after review:
- Cleans up CSS to use common classes - Removes getters to use mapState instead - Makes the first request even when tab is not visible - Show loading state in 204
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/reports/components/grouped_test_reports_app_spec.js20
-rw-r--r--spec/javascripts/reports/components/test_issue_body_spec.js1
-rw-r--r--spec/javascripts/reports/store/mutations_spec.js14
3 files changed, 23 insertions, 12 deletions
diff --git a/spec/javascripts/reports/components/grouped_test_reports_app_spec.js b/spec/javascripts/reports/components/grouped_test_reports_app_spec.js
index 6ca03620ca3..d86e565036c 100644
--- a/spec/javascripts/reports/components/grouped_test_reports_app_spec.js
+++ b/spec/javascripts/reports/components/grouped_test_reports_app_spec.js
@@ -49,6 +49,26 @@ describe('Grouped Test Reports App', () => {
});
});
+ describe('with 204 result', () => {
+ beforeEach(() => {
+ mock.onGet('test_results.json').reply(204, {}, {});
+ vm = mountComponent(Component, {
+ endpoint: 'test_results.json',
+ });
+ });
+
+ it('renders success summary text', done => {
+ setTimeout(() => {
+ expect(vm.$el.querySelector('.fa-spinner')).not.toBeNull();
+ expect(vm.$el.querySelector('.js-code-text').textContent.trim()).toEqual(
+ 'Test summary results are being parsed',
+ );
+
+ done();
+ }, 0);
+ });
+ });
+
describe('with new failed result', () => {
beforeEach(() => {
mock.onGet('test_results.json').reply(200, newFailedTestReports, {});
diff --git a/spec/javascripts/reports/components/test_issue_body_spec.js b/spec/javascripts/reports/components/test_issue_body_spec.js
index 242eed114d9..0ea81f714e7 100644
--- a/spec/javascripts/reports/components/test_issue_body_spec.js
+++ b/spec/javascripts/reports/components/test_issue_body_spec.js
@@ -31,7 +31,6 @@ describe('Test Issue body', () => {
vm.$el.querySelector('button').click();
expect(vm.openModal).toHaveBeenCalledWith({
issue: commonProps.issue,
- status: commonProps.status,
});
});
});
diff --git a/spec/javascripts/reports/store/mutations_spec.js b/spec/javascripts/reports/store/mutations_spec.js
index c3e2bb8e00c..8f99d2675a5 100644
--- a/spec/javascripts/reports/store/mutations_spec.js
+++ b/spec/javascripts/reports/store/mutations_spec.js
@@ -43,24 +43,21 @@ describe('Reports Store Mutations', () => {
{
name: 'StringHelper#concatenate when a is git and b is lab returns summary',
execution_time: 0.0092435,
- system_output:
- 'Failure/Error: is_expected.to eq(\'gitlab\')',
+ system_output: "Failure/Error: is_expected.to eq('gitlab')",
},
],
resolved_failures: [
{
name: 'StringHelper#concatenate when a is git and b is lab returns summary',
execution_time: 0.009235,
- system_output:
- 'Failure/Error: is_expected.to eq(\'gitlab\')',
+ system_output: "Failure/Error: is_expected.to eq('gitlab')",
},
],
existing_failures: [
{
name: 'StringHelper#concatenate when a is git and b is lab returns summary',
execution_time: 1232.08,
- system_output:
- 'Failure/Error: is_expected.to eq(\'gitlab\')',
+ system_output: "Failure/Error: is_expected.to eq('gitlab')",
},
],
},
@@ -108,7 +105,6 @@ describe('Reports Store Mutations', () => {
beforeEach(() => {
mutations[types.SET_ISSUE_MODAL_DATA](stateCopy, {
issue,
- status: 'failed',
});
});
@@ -116,10 +112,6 @@ describe('Reports Store Mutations', () => {
expect(stateCopy.modal.title).toEqual(issue.name);
});
- it('should set modal status', () => {
- expect(stateCopy.modal.status).toEqual('failed');
- });
-
it('should set modal data', () => {
expect(stateCopy.modal.data.execution_time.value).toEqual(issue.execution_time);
expect(stateCopy.modal.data.system_output.value).toEqual(issue.system_output);