Commit 91d99721 authored by Fernando's avatar Fernando

Add sort and order for policy violations

* Add params for sorting by classification

Update unit tests
parent 907466b6
...@@ -21,6 +21,8 @@ export const fetchLicenses = ({ state, dispatch }, params = {}) => { ...@@ -21,6 +21,8 @@ export const fetchLicenses = ({ state, dispatch }, params = {}) => {
params: { params: {
per_page: 10, per_page: 10,
page: state.pageInfo.page || 1, page: state.pageInfo.page || 1,
sort_by: 'classifcation',
sort_direction: 'desc',
...params, ...params,
}, },
}) })
......
---
title: Sort license policy violations first
merge_request: 30564
author:
type: changed
...@@ -141,6 +141,8 @@ describe('Licenses actions', () => { ...@@ -141,6 +141,8 @@ describe('Licenses actions', () => {
const paramsDefault = { const paramsDefault = {
page: state.pageInfo.page, page: state.pageInfo.page,
per_page: 10, per_page: 10,
sort_by: 'classifcation',
sort_direction: 'desc',
}; };
mock mock
...@@ -174,6 +176,8 @@ describe('Licenses actions', () => { ...@@ -174,6 +176,8 @@ describe('Licenses actions', () => {
const paramsSent = { const paramsSent = {
...paramsGiven, ...paramsGiven,
per_page: 10, per_page: 10,
sort_by: 'classifcation',
sort_direction: 'desc',
}; };
beforeEach(() => { beforeEach(() => {
......
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