Skip to content

Commit

Permalink
showing new data in the dashboard and design qa changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kth13 committed Jun 14, 2023
1 parent b569dc7 commit b59c340
Show file tree
Hide file tree
Showing 24 changed files with 390 additions and 394 deletions.
8 changes: 8 additions & 0 deletions assets/sass/components/_accessible_autocomplete.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.autocomplete__option {
font-family: 'GDS Transport';
}

.autocomplete__input {
width:70% !important;
}

.autocomplete__menu {
width: calc(70% - 4px) !important;
}
119 changes: 56 additions & 63 deletions integration_tests/integration/dashboards.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,10 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -274,12 +273,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -293,12 +291,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
cy.stubGetSentReferralsForUserTokenPaged(pageFactory.pageContent([]).build())
Expand All @@ -312,12 +309,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -342,12 +338,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -362,12 +357,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -383,11 +377,12 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Expected release date': 'N/A',
Location: 'London',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -401,11 +396,12 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Expected release date': 'N/A',
Location: 'London',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
cy.stubGetSentReferralsForUserTokenPaged(pageFactory.pageContent([]).build())
Expand All @@ -419,11 +415,12 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Expected release date': 'N/A',
Location: 'London',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -447,11 +444,12 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Expected release date': 'N/A',
Location: 'London',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -467,12 +465,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -486,12 +483,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
cy.stubGetSentReferralsForUserTokenPaged(pageFactory.pageContent([]).build())
Expand All @@ -505,12 +501,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -534,12 +529,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -555,12 +549,11 @@ describe('Dashboards', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
Referral: 'REFERRAL_REF',
Person: 'Jenny Jones',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'REFERRAL_REF',
'Intervention type': 'Accommodation Services - West Midlands',
Caseworker: 'UserABC',
Action: 'View',
'Date received': '26 Jan 2021',
},
])
})
Expand All @@ -577,7 +570,7 @@ describe('Dashboards', () => {
},
},
() => {
const headings = ['Date received', 'Referral', 'Person', 'Intervention type', 'Caseworker']
const headings = ['Name/CRN', 'Referral number', 'Intervention type', 'Caseworker', 'Date received']
headings.forEach(heading => {
it(`should set headings correctly when sorting by ${heading}`, () => {
cy.login()
Expand Down Expand Up @@ -620,11 +613,11 @@ describe('Dashboards', () => {
},
{
dashboardType: 'Unassigned cases',
sortField: 'Person',
sortField: 'Name/CRN',
},
{
dashboardType: 'Completed cases',
sortField: 'Referral',
sortField: 'Referral number',
},
]

Expand Down
49 changes: 20 additions & 29 deletions integration_tests/integration/referral.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ describe('Referral form', () => {
cy.contains('Probation practitioner details')
.parent()
.next()
.should('contain', 'PDU (probation delivery unit)')
.should('contain', 'PDU (Probation Delivery Unit)')
.should('contain', 'London')
.contains('Change')
.should(
Expand Down Expand Up @@ -521,6 +521,25 @@ describe('Referral form', () => {
.next()
.contains('Change')
.should('have.attr', 'href', `/referrals/${draftReferral.id}/relevant-sentence`)
cy.contains('Maximum number of enforceable days')
.next()
.should('contain', '10')
.next()
.contains('Change')
.should('have.attr', 'href', `/referrals/${draftReferral.id}/enforceable-days`)
cy.contains('Date intervention to be completed by')
.next()
.contains('24 August 2021')
.parent()
.next()
.contains('Change')
.should('have.attr', 'href', `/referrals/${draftReferral.id}/completion-deadline`)
cy.contains('Further information for the service provider')
.next()
.should('contain', 'Some information about Alex')
.next()
.contains('Change')
.should('have.attr', 'href', `/referrals/${draftReferral.id}/further-information`)

// Accommodation referral details
cy.contains('Accommodation referral details')
Expand All @@ -546,34 +565,6 @@ describe('Referral form', () => {
'href',
`/referrals/${draftReferral.id}/service-category/428ee70f-3001-4399-95a6-ad25eaaede16/desired-outcomes`
)

cy.contains('Enforceable days')
cy.contains('Maximum number of enforceable days')
.next()
.should('contain', '10')
.next()
.contains('Change')
.should('have.attr', 'href', `/referrals/${draftReferral.id}/enforceable-days`)

cy.contains('Accommodation completion date')
.parent()
.next()
.contains('Date')
.next()
.contains('24 August 2021')
.parent()
.next()
.contains('Change')
.should('have.attr', 'href', `/referrals/${draftReferral.id}/completion-deadline`)

cy.contains('Further information')
cy.contains('Further information for the provider')
.next()
.should('contain', 'Some information about Alex')
.next()
.contains('Change')
.should('have.attr', 'href', `/referrals/${draftReferral.id}/further-information`)

cy.contains('Submit referral').click()
cy.location('pathname').should('equal', `/referrals/${sentReferral.id}/confirmation`)

Expand Down
22 changes: 8 additions & 14 deletions integration_tests/integration/serviceProviderReferrals.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,26 +213,22 @@ describe('Service provider referrals dashboard', () => {
.getTable()
.should('deep.equal', [
{
'Date received': '26 Jan 2021',
'Name/CRN': 'George Michael\n X123456',
'Referral number': 'ABCABCA1',
'Intervention type': 'Social Inclusion - West Midlands',
Referral: 'ABCABCA1',
Person: 'George Michael',
Caseworker: '',
Action: 'View',
'Date received': '26 Jan 2021',
},
{
'Date received': '13 Dec 2020',
'Name/CRN': 'Jenny Jones\n X123456',
'Referral number': 'ABCABCA2',
'Intervention type': 'Personal Wellbeing - West Midlands',
Referral: 'ABCABCA2',
Person: 'Jenny Jones',
Caseworker: '',
Action: 'View',
'Date received': '13 Dec 2020',
},
])

cy.contains('.govuk-table__row', 'Jenny Jones').within(() => {
cy.contains('View').click()
})
cy.contains('Jenny Jones').click()
cy.location('pathname').should('equal', `/service-provider/referrals/${referralToSelect.id}/details`)
cy.get('h2').contains('Who do you want to assign this referral to?')
cy.contains('jenny.jones@example.com')
Expand Down Expand Up @@ -3066,9 +3062,7 @@ describe('Service provider referrals dashboard', () => {

cy.contains('Next').click()

cy.contains('.govuk-table__row', 'Jenny Jones').within(() => {
cy.contains('View').click()
})
cy.contains('Jenny Jones').click()
cy.location('pathname').should('equal', `/service-provider/referrals/${referralToSelect.id}/details`)

cy.contains('Back').click()
Expand Down
1 change: 1 addition & 0 deletions server/models/dashboardDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export default interface DashboardDetails {
displayText: string
isSearchable: boolean
showAssignedCaseworker: boolean
showReleaseDateAndLocation: boolean
}
Loading

0 comments on commit b59c340

Please sign in to comment.