Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display current filters #81

Merged
merged 10 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions assets/js/initMOJFilterPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ new MOJFrontend.FilterToggleButton({
container: $('.moj-filter'),
},
})

function moveFilterTagsToResults() {
var newContainer = $('.moj-action-bar__filterTagsContainer')
var tagsContainer = $('.moj-filter__selected')
tagsContainer.appendTo(newContainer)
}

moveFilterTagsToResults()
2 changes: 1 addition & 1 deletion helm_deploy/hmpps-authorization/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ dependencies:
version: "2.9"
repository: https://ministryofjustice.github.io/hmpps-helm-charts
- name: generic-prometheus-alerts
version: "1.3"
version: "1.4"
repository: https://ministryofjustice.github.io/hmpps-helm-charts
6 changes: 3 additions & 3 deletions integration_tests/e2e/edit-base-client-deployment.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Page from '../pages/page'
import ViewBaseClientPage from '../pages/viewBaseClient'
import EditBaseClientDeploymentDetailsPage from '../pages/editBaseClientDeploymentDetails'
import { GrantTypes } from '../../server/data/enums/grantTypes'
import { GrantType } from '../../server/data/enums/grantType'
import AuthSignInPage from '../pages/authSignIn'
import AuthErrorPage from '../pages/authError'

Expand All @@ -16,7 +16,7 @@ context('Edit base client deployment: Auth', () => {
cy.task('stubSignIn')
cy.task('stubManageUser')
cy.task('stubListBaseClients')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubGetListClientInstancesList')
})

Expand All @@ -41,7 +41,7 @@ context('Edit base client deployment details page', () => {
cy.task('stubSignIn')
cy.task('stubManageUser')
cy.task('stubListBaseClients')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubGetListClientInstancesList')
editBaseClientDeploymentDetailsPage = visitEditBaseClientDeploymentDetailsPage()
})
Expand Down
8 changes: 4 additions & 4 deletions integration_tests/e2e/edit-base-client-details.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Page from '../pages/page'
import EditBaseClientDetailsPage from '../pages/editBaseClientDetails'
import ViewBaseClientPage from '../pages/viewBaseClient'
import { GrantTypes } from '../../server/data/enums/grantTypes'
import { GrantType } from '../../server/data/enums/grantType'
import AuthSignInPage from '../pages/authSignIn'
import AuthErrorPage from '../pages/authError'

Expand All @@ -16,7 +16,7 @@ context('Edit base client details: Auth', () => {
cy.task('stubSignIn')
cy.task('stubManageUser')
cy.task('stubListBaseClients')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubGetListClientInstancesList')
})

Expand All @@ -41,7 +41,7 @@ context('Edit base client details page - client-credentials flow', () => {
cy.task('stubSignIn')
cy.task('stubManageUser')
cy.task('stubListBaseClients')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubGetListClientInstancesList')
cy.task('stubAuthManageDetails')
editBaseClientDetailsPage = visitEditBaseClientDetailsPage()
Expand Down Expand Up @@ -126,7 +126,7 @@ context('Edit base client details page - authorization-code flow', () => {
cy.task('stubSignIn')
cy.task('stubManageUser')
cy.task('stubListBaseClients')
cy.task('stubGetBaseClient', { grantType: GrantTypes.AuthorizationCode })
cy.task('stubGetBaseClient', { grantType: GrantType.AuthorizationCode })
cy.task('stubGetListClientInstancesList')
editBaseClientDetailsPage = visitEditBaseClientDetailsPage()
})
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/e2e/edit-client-instances.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Page from '../pages/page'
import ViewBaseClientPage from '../pages/viewBaseClient'
import ViewClientSecretsPage from '../pages/viewClientSecrets'
import ConfirmDeleteClientPage from '../pages/confirmDeleteClient'
import { GrantTypes } from '../../server/data/enums/grantTypes'
import { GrantType } from '../../server/data/enums/grantType'

const visitBaseClientPage = (): ViewBaseClientPage => {
cy.signIn({ failOnStatusCode: true, redirectPath: '/base-clients/base_client_id_1' })
Expand All @@ -21,7 +21,7 @@ context('Base client page - client instances', () => {
beforeEach(() => {
cy.task('reset')
cy.task('stubSignIn')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubManageUser')
cy.task('stubGetListClientInstancesList')
})
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/e2e/login.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import IndexPage from '../pages/index'
import AuthSignInPage from '../pages/authSignIn'
import Page from '../pages/page'
import AuthManageDetailsPage from '../pages/authManageDetails'
import { GrantTypes } from '../../server/data/enums/grantTypes'
import { GrantType } from '../../server/data/enums/grantType'
import AuthErrorPage from '../pages/authError'

context('SignIn', () => {
beforeEach(() => {
cy.task('reset')
cy.task('stubSignIn', ['ROLE_OAUTH_ADMIN'])
cy.task('stubListBaseClients')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubManageUser')
cy.task('stubAuthManageDetails')
})
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/e2e/view-base-client-list.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Page from '../pages/page'
import ViewBaseClientListPage from '../pages/viewBaseClientList'
import ViewBaseClientPage from '../pages/viewBaseClient'
import NewBaseClientGrantPage from '../pages/newBaseClientGrant'
import { GrantTypes } from '../../server/data/enums/grantTypes'
import { GrantType } from '../../server/data/enums/grantType'
import AuthSignInPage from '../pages/authSignIn'
import AuthErrorPage from '../pages/authError'

Expand All @@ -17,7 +17,7 @@ context('Homepage - Auth', () => {
cy.task('reset')
cy.task('stubSignIn')
cy.task('stubListBaseClients')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubManageUser')
cy.task('stubGetListClientInstancesList')
})
Expand All @@ -42,7 +42,7 @@ context('Homepage - list base-clients', () => {
cy.task('reset')
cy.task('stubSignIn')
cy.task('stubListBaseClients')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubManageUser')
cy.task('stubGetListClientInstancesList')

Expand Down
8 changes: 4 additions & 4 deletions integration_tests/e2e/view-base-client.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ViewClientSecretsPage from '../pages/viewClientSecrets'
import ConfirmDeleteClientPage from '../pages/confirmDeleteClient'
import EditBaseClientDetailsPage from '../pages/editBaseClientDetails'
import EditBaseClientDeploymentDetailsPage from '../pages/editBaseClientDeploymentDetails'
import { GrantTypes } from '../../server/data/enums/grantTypes'
import { GrantType } from '../../server/data/enums/grantType'
import AuthSignInPage from '../pages/authSignIn'
import AuthErrorPage from '../pages/authError'

Expand All @@ -17,7 +17,7 @@ context('Base client page - Auth', () => {
beforeEach(() => {
cy.task('reset')
cy.task('stubSignIn')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubManageUser')
cy.task('stubGetListClientInstancesList')
cy.task('stubAddClientInstance')
Expand All @@ -42,7 +42,7 @@ context('Base client page - client credentials flow', () => {
beforeEach(() => {
cy.task('reset')
cy.task('stubSignIn')
cy.task('stubGetBaseClient', { grantType: GrantTypes.ClientCredentials })
cy.task('stubGetBaseClient', { grantType: GrantType.ClientCredentials })
cy.task('stubManageUser')
cy.task('stubGetListClientInstancesList')
cy.task('stubAddClientInstance')
Expand Down Expand Up @@ -115,7 +115,7 @@ context('Base client page - authorization-code flow', () => {
beforeEach(() => {
cy.task('reset')
cy.task('stubSignIn')
cy.task('stubGetBaseClient', { grantType: GrantTypes.AuthorizationCode })
cy.task('stubGetBaseClient', { grantType: GrantType.AuthorizationCode })
cy.task('stubManageUser')
cy.task('stubGetListClientInstancesList')
cy.task('stubAddClientInstance')
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/mockApis/baseClientsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getListClientInstancesResponseMock,
getSecretsResponseMock,
} from '../../server/data/localMockData/baseClientsResponseMock'
import { GrantTypes } from '../../server/data/enums/grantTypes'
import { GrantType } from '../../server/data/enums/grantType'

export default {
stubListBaseClients: () => {
Expand All @@ -24,7 +24,7 @@ export default {
})
},

stubGetBaseClient: (config: { grantType: GrantTypes }) => {
stubGetBaseClient: (config: { grantType: GrantType }) => {
return stubFor({
request: {
method: 'GET',
Expand Down
Loading