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

Chore/update v2 manage integration test pages #1961

Merged
merged 4 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 3 additions & 6 deletions e2e/pages/manage/markBedOutOfServicePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ export class MarkBedOutOfServicePage extends BasePage {

async enterStartDate() {
const aDateNextYear = addYears(new Date(), 1)
await this.page.getByRole('group', { name: 'Start date' }).getByLabel('Day').fill(getDate(aDateNextYear).toString())
await this.page
.getByRole('group', { name: 'Out of service from' })
.getByLabel('Day')
.fill(getDate(aDateNextYear).toString())
await this.page
.getByRole('group', { name: 'Out of service from' })
.getByRole('group', { name: 'Start date' })
.getByLabel('Month')
.fill(getMonth(aDateNextYear).toString())
.toString()
await this.page
.getByRole('group', { name: 'Out of service from' })
.getByRole('group', { name: 'Start date' })
.getByLabel('Year')
.fill(getYear(aDateNextYear).toString())
}
Expand Down
4 changes: 2 additions & 2 deletions server/utils/outOfServiceBedUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('outOfServiceBedUtils', () => {
text: 'Room',
},
{
text: 'Out of service from',
text: 'Start date',
patrickjfl marked this conversation as resolved.
Show resolved Hide resolved
},
{
text: 'Out of service until',
Expand Down Expand Up @@ -113,7 +113,7 @@ describe('outOfServiceBedUtils', () => {
text: 'Room',
},
{
text: 'Out of service from',
text: 'Start date',
},
{
text: 'Out of service until',
Expand Down
2 changes: 1 addition & 1 deletion server/utils/outOfServiceBedUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const outOfServiceBedTableHeaders = (user: UserDetails) => {
text: 'Room',
},
{
text: 'Out of service from',
text: 'Start date',
},
{
text: 'Out of service until',
Expand Down
2 changes: 1 addition & 1 deletion server/views/lostBeds/new.njk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
errorMessage: errors.startDate,
fieldset: {
legend: {
text: "Out of service from",
text: "Start date",
classes: "govuk-fieldset__legend--s"
}
}
Expand Down
4 changes: 2 additions & 2 deletions server/views/outOfServiceBeds/new.njk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
errorMessage: errors.startDate,
fieldset: {
legend: {
text: "Out of service from",
text: "Start date",
classes: "govuk-fieldset__legend--s"
}
}
Expand All @@ -50,7 +50,7 @@
errorMessage: errors.endDate,
fieldset: {
legend: {
text: "Out of service to",
text: "End date",
classes: "govuk-fieldset__legend--s"
}
}
Expand Down
6 changes: 3 additions & 3 deletions server/views/outOfServiceBeds/show.njk
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
},
{
key: {
text: "Out of service from"
text: "Start date"
},
value: {
text: formatDate(outOfServiceBed.startDate, {format: 'long'})
}
},
{
key: {
text: "Out of service to"
text: "End date"
},
value: {
text: formatDate(outOfServiceBed.endDate, {format: 'long'})
Expand Down Expand Up @@ -97,7 +97,7 @@
},
fieldset: {
legend: {
text: "Out of service to",
text: "End date",
classes: "govuk-fieldset__legend--s"
}
}
Expand Down