Skip to content

Commit

Permalink
Merge pull request #3806 from hmcts/exui-1956-renamed
Browse files Browse the repository at this point in the history
Updates functional test suite
  • Loading branch information
StoneBenHMCTS committed Jul 29, 2024
2 parents 8977f37 + 7032538 commit b63106c
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 77 deletions.
9 changes: 4 additions & 5 deletions test_codecept/backendMock/services/rdLocation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class RDLocationService{
];

this.setupMockCaseManagementLocations();
}
}

setupMockCaseManagementLocations(){
this.locationsConfig.forEach(serviceConf => {
Expand All @@ -80,7 +80,7 @@ class RDLocationService{
}

const temp = this.getMockLocations();
temp.epimms_id = index + '';
temp.epimms_id = (index + 20) + '';
temp.is_case_management_location = 'Y';
temp.court_name = `${service} Court Center Wales`;
temp.venue_name = `${service} Court Center Wales`;
Expand All @@ -90,7 +90,6 @@ class RDLocationService{
temp.region = 'Wales';
temp.region_id = "7";
serviceConf.locations.push(temp)

})
}

Expand All @@ -115,7 +114,7 @@ class RDLocationService{
results.push(loc);
}
}

}
return results;
}
Expand All @@ -125,7 +124,7 @@ class RDLocationService{
const serviceWithCode = this.locationsConfig.find(service => service.serviceCode.includes(serviceCode))

console.assert(serviceWithCode, `Mock service config not found for service code ${serviceCode}`);

return {
"service_code": serviceCode,
"court_type_id": "18",
Expand Down
3 changes: 1 addition & 2 deletions test_codecept/backendMock/services/rdLocation/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ router.get('/court-venues/venue-search?', (req, res) => {
});

router.get('/court-venues/services', (req, res) => {

const service_code = req.query.service_code
userApiData.sendResponse(req, res, "onServiceLocations", () => service.getServiceLocations(service_code))


});


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class CreateHearingWorkflow{
"What stage is this hearing at?": new HearingStagePage(),
"Participant attendance": new ParticipantAttendancePage(),
"What are the hearing venue details?": new HearingVenueDetails(),
"Does this hearing need to be in Welsh?" : new HearingWelshPage(),
"Do you want a specific judge?": new HearingJudgePage(),
"Do you require a panel for this hearing?" : new HearingPanelPage(),
"Length, date and priority level of hearing" : new HearingTimingPage(),
"Will this hearing need to be linked to other hearings?": new HearingLinkPage(),
"Enter any additional instructions for the hearing": new HearingAdditionalInstructionsPage(),
"Check your answers before sending your request": new HearingCreateEditSummaryPage(),
"Hearing request submitted": new HearingSubmitConfirmationPage(),
"Does this hearing need to be in Welsh?" : new HearingWelshPage(),
"Provide a reason for changing this hearing": new HearingChangeReasonsPage()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ Feature: Create hearings workflow
| Search for a location by name | cen,IA Court Center 1 |
When I click continue in create hearing workflow

# Does this hearing need to be in Welsh?
Then I am on create hearing page "Does this hearing need to be in Welsh?"
When In hearing page "Does this hearing need to be in Welsh?", I input values
| field | value |
| Does this hearing need to be in Welsh? | No |
When I click continue in create hearing workflow


# Do you want a specific judge?
Then I am on create hearing page "Do you want a specific judge?"
Expand Down Expand Up @@ -239,7 +246,6 @@ Feature: Create hearings workflow
| Search for a location by name | cen,IA Court Center 1 |
When I click continue in create hearing workflow


# Do you want a specific judge?
Then I am on create hearing page "Do you want a specific judge?"
When In create hearing page "Do you want a specific judge?", I input values
Expand Down Expand Up @@ -528,7 +534,7 @@ Feature: Create hearings workflow
Then I am on create hearing page "What are the hearing venue details?"
When In create hearing page "What are the hearing venue details?", I input values
| field | value |
| Search for a location by name | Wal,IA Court Center Wales |
| Search for a location by name | cen,IA Court Center 2 |
When I click continue in create hearing workflow


Expand Down Expand Up @@ -556,7 +562,6 @@ Feature: Create hearings workflow

# When I click continue in create hearing workflow


# What are the hearing venue details?
Then I am on create hearing page "Length, date and priority level of hearing"
When In create hearing page "Length, date and priority level of hearing", I input values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,4 @@ Feature: Create hearings workflow navigation controls
When In create hearing check your answers page, I click change link for field "Length of hearing"
Then I am on create hearing page "Length, date and priority level of hearing"
# When In create hearing work flow, I click back link
# Then I am on create hearing page "Do you require a panel for this hearing?"

# Then I am on create hearing page "Do you require a panel for this hearing?"
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Feature: Hearings : Actuals update
# | What stage is this hearing at? | What stage is this hearing at? | Request a hearing for Mock Test case public case name |
# | Will this be a paper hearing? | Participant attendance | Request a hearing for Mock Test case public case name |
# | What are the hearing venue details? | What are the hearing venue details? | Request a hearing for Mock Test case public case name |
# # | Does this hearing need to be in Welsh? | Does this hearing need to be in Welsh? | Request a hearing for Mock Test case public case name |
# | Does this hearing need to be in Welsh? | Does this hearing need to be in Welsh? | Request a hearing for Mock Test case public case name |
# | Do you want a specific judge? | Do you want a specific judge? | Request a hearing for Mock Test case public case name |
# | Length of hearing | Length, date and priority level of hearing | Request a hearing for Mock Test case public case name |
# | Does the hearing need to take place on a specific date? | Length, date and priority level of hearing | Request a hearing for Mock Test case public case name |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"hearingLocations": [
{
"locationType": "court",
"locationId": "827534"
"locationId": "20030"
}
],
"privateHearingRequiredFlag": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"hearingLocations": [
{
"locationType": "court",
"locationId": "283922"
"locationId": "20030"
}
],
"facilitiesRequired": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Feature: Hearings CR84: Manual update labels
When In view hearing page, I click Edit hearing button
Then I validate Edit hearing page displayed


Then I validate edit hearing section heading labels
| Heading | Label |
| Stage | |
Expand All @@ -63,7 +62,7 @@ Feature: Hearings CR84: Manual update labels
Then I validate edit hearing section heading labels
| Heading | Label |
# | Additional facilities | AMENDED |
| Stage | |
| Stage | |
| Hearing venue | |
| Language requirements | |
| Judge details | |
Expand Down Expand Up @@ -98,12 +97,12 @@ Feature: Hearings CR84: Manual update labels
| Heading | Label |
# | Additional facilities | AMENDED |
| Participant attendance | AMENDED |
| Stage | |
| Hearing venue | |
| Language requirements | |
| Judge details | |
| Linked hearings | |
| Additional instructions | |
| Stage | |
| Hearing venue | |
| Language requirements | |
| Judge details | |
| Linked hearings | |
| Additional instructions | |

Then I validate fields displayed in view or edit hearing page
| field | value | changeLinkDisplay | amendedFlagDisplay |
Expand Down Expand Up @@ -145,63 +144,48 @@ Feature: Hearings CR84: Manual update labels


# Hearing venue start
When In view or edit hearing page, I click change link for field "What are the hearing venue details"
Then I am on hearings workflow page "What are the hearing venue details?"

When In hearing page "What are the hearing venue details?", I input values
| field | value |
| Search for a location by name | cen,IA Court Center 2 |

When I click continue in hearing workflow
Then I validate Edit hearing page displayed


Then I validate edit hearing section heading labels
| Heading | Label |
| Stage | AMENDED |
| Hearing venue | AMENDED |
| Hearing venue | |
| Language requirements | |
| Judge details | |
| Linked hearings | |
| Additional instructions | |

Then I validate fields displayed in view or edit hearing page
| field | value | changeLinkDisplay | amendedFlagDisplay |
| What are the hearing venue details | IA Court Center 2 | true | AMENDED |

# Hearing venue end

# Language requirements start
#When In view or edit hearing page, I click change link for field "Does this hearing need to be in Welsh?"
#Then I am on hearings workflow page "Does this hearing need to be in Welsh?"
When In view or edit hearing page, I click change link for field "Does this hearing need to be in Welsh?"
Then I am on hearings workflow page "Does this hearing need to be in Welsh?"

#When In hearing page "Does this hearing need to be in Welsh?", I input values
# | field | value |
# | Does this hearing need to be in Welsh? | Yes |
When In hearing page "Does this hearing need to be in Welsh?", I input values
| field | value |
| Does this hearing need to be in Welsh? | Yes |


#When I click continue in hearing workflow
#Then I validate Edit hearing page displayed
When I click continue in hearing workflow
Then I validate Edit hearing page displayed


#Then I validate edit hearing section heading labels
# | Heading | Label |
# | Stage | AMENDED |
# | Hearing venue | AMENDED |
# | Language requirements | AMENDED |
# | Judge details | |
# | Linked hearings | |
# | Additional instructions | |
Then I validate edit hearing section heading labels
| Heading | Label |
| Stage | AMENDED |
| Hearing venue | |
| Language requirements | AMENDED |
| Judge details | |
| Linked hearings | |
| Additional instructions | |

#Then I validate fields displayed in view or edit hearing page
# | field | value | changeLinkDisplay | amendedFlagDisplay |
# | Does this hearing need to be in Welsh? | Yes | true | AMENDED |
Then I validate fields displayed in view or edit hearing page
| field | value | changeLinkDisplay | amendedFlagDisplay |
| Does this hearing need to be in Welsh? | Yes | true | AMENDED |

# Language requirements end




# Judge details start
When In view or edit hearing page, I click change link for field "Do you want a specific judge?"
Then I am on hearings workflow page "Do you want a specific judge?"
Expand All @@ -219,8 +203,8 @@ Feature: Hearings CR84: Manual update labels
Then I validate edit hearing section heading labels
| Heading | Label |
| Stage | AMENDED |
| Hearing venue | AMENDED |
# | Language requirements | AMENDED |
| Hearing venue | |
| Language requirements | AMENDED |
| Judge details | AMENDED |
| Linked hearings | |
| Additional instructions | |
Expand Down Expand Up @@ -249,8 +233,8 @@ Feature: Hearings CR84: Manual update labels
Then I validate edit hearing section heading labels
| Heading | Label |
| Stage | AMENDED |
| Hearing venue | AMENDED |
# | Language requirements | AMENDED |
| Hearing venue | |
| Language requirements | AMENDED |
| Judge details | AMENDED |
| Length, date and priority level of hearing | AMENDED |
| Linked hearings | |
Expand All @@ -262,7 +246,7 @@ Feature: Hearings CR84: Manual update labels
| Does the hearing need to take place on a specific date? | No | true | AMENDED |
| What is the priority of this hearing? | Hearing priority 1 | true | AMENDED |

# Length, date and priority level of hearingend
# Length, date and priority level of hearing end


# Linked hearings start
Expand All @@ -280,8 +264,8 @@ Feature: Hearings CR84: Manual update labels
Then I validate edit hearing section heading labels
| Heading | Label |
| Stage | AMENDED |
| Hearing venue | AMENDED |
# | Language requirements | AMENDED |
| Hearing venue | |
| Language requirements | AMENDED |
| Judge details | AMENDED |
| Linked hearings | AMENDED |
| Additional instructions | |
Expand All @@ -293,8 +277,6 @@ Feature: Hearings CR84: Manual update labels
# Linked hearings end




# Additional instructions start
When In view or edit hearing page, I click change link for field "Enter any additional instructions for the hearing"
Then I am on hearings workflow page "Enter any additional instructions for the hearing"
Expand All @@ -310,8 +292,8 @@ Feature: Hearings CR84: Manual update labels
Then I validate edit hearing section heading labels
| Heading | Label |
| Stage | AMENDED |
| Hearing venue | AMENDED |
# | Language requirements | AMENDED |
| Hearing venue | |
| Language requirements | AMENDED |
| Judge details | AMENDED |
| Linked hearings | AMENDED |
| Additional instructions | AMENDED |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Feature: Hearings : Edit hearing sub pages
| What stage is this hearing at? | What stage is this hearing at? | Request a hearing for Mock Test case public case name |
| Will this be a paper hearing? | Participant attendance | Request a hearing for Mock Test case public case name |
| What are the hearing venue details? | What are the hearing venue details? | Request a hearing for Mock Test case public case name |
# | Does this hearing need to be in Welsh? | Does this hearing need to be in Welsh? | Request a hearing for Mock Test case public case name |
| Does this hearing need to be in Welsh? | Does this hearing need to be in Welsh? | Request a hearing for Mock Test case public case name |
| Do you want a specific judge? | Do you want a specific judge? | Request a hearing for Mock Test case public case name |
| Length of hearing | Length, date and priority level of hearing | Request a hearing for Mock Test case public case name |
| Does the hearing need to take place on a specific date? | Length, date and priority level of hearing | Request a hearing for Mock Test case public case name |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ Feature: Hearings CR84 OFF: View or edit action
| field | value |
| Search for a location by name | cen,IA Court Center 2 |

When I click continue in hearing workflow

Then I am on hearings workflow page "Does this hearing need to be in Welsh?"
When In hearing page "Does this hearing need to be in Welsh?", I input values
| field | value |
| Does this hearing need to be in Welsh? | No |

When I click continue in hearing workflow
Then I validate view or edit hearing page displayed

Expand All @@ -134,11 +141,7 @@ Feature: Hearings CR84 OFF: View or edit action
| Judge details | |
| Linked hearings | |
| Additional instructions | |

Then I validate fields displayed in view or edit hearing page
| field | value | changeLinkDisplay | amendedFlagDisplayed_preCR84 |
| What are the hearing venue details | IA Court Center 2 | true | AMENDED |


# Hearing venue end

# Language requirements start
Expand Down Expand Up @@ -170,8 +173,6 @@ Feature: Hearings CR84 OFF: View or edit action
# Language requirements end




# Judge details start
When In view or edit hearing page, I click change link for field "Do you want a specific judge?"
Then I am on hearings workflow page "Do you want a specific judge?"
Expand Down

0 comments on commit b63106c

Please sign in to comment.