Commit 82c8b065 authored by lauraMon's avatar lauraMon Committed by Tristan Read

Adds spec and fixes linting

parent 1465f858
......@@ -102,7 +102,7 @@ export default {
type: Boolean,
required: true,
},
projectPath: {
projectPath: {
type: String,
required: true,
},
......@@ -184,7 +184,11 @@ export default {
return `/${this.projectPath}/-/error_tracking/${errorId}.json`;
},
updateIssueStatus(errorId, status) {
this.updateStatus({ endpoint: this.getIssueUpdatePath(errorId), redirectUrl: this.listPath, status });
this.updateStatus({
endpoint: this.getIssueUpdatePath(errorId),
redirectUrl: this.listPath,
status,
});
},
},
};
......@@ -321,7 +325,7 @@ export default {
</template>
<template v-slot:ignore="errors">
<gl-button @click="updateIssueStatus(errors.item.id, 'ignored')">
<gl-icon name="eye-slash" :size=12 />
<gl-icon name="eye-slash" :size="12" />
</gl-button>
</template>
<template v-slot:details="errors">
......
......@@ -11,6 +11,8 @@ describe Projects::ErrorTrackingHelper do
describe '#error_tracking_data' do
let(:can_enable_error_tracking) { true }
let(:setting_path) { project_settings_operations_path(project) }
let(:list_path) { project_error_tracking_index_path(project) }
let(:project_path) { project.full_path }
let(:index_path) do
project_error_tracking_index_path(project, format: :json)
......@@ -30,6 +32,8 @@ describe Projects::ErrorTrackingHelper do
'user-can-enable-error-tracking' => 'true',
'enable-error-tracking-link' => setting_path,
'error-tracking-enabled' => 'false',
'list-path' => list_path,
'project-path' => project_path,
'illustration-path' => match_asset_path('/assets/illustrations/cluster_popover.svg')
)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment