From 31ab94da96a406272d22b5536581a1bf05e1a2ab Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Wed, 24 Dec 2025 12:09:13 +0000 Subject: [PATCH 1/4] Chore: Update .gitignore for local env files - Updates the .gitignore file to exclude local configuration files, except for development. --- .gitignore | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b83dbe6..5a754d0 100644 --- a/.gitignore +++ b/.gitignore @@ -70,7 +70,6 @@ tags .tags .tool-versions -# Ignore local configuration files -.env -.env*.local +# Ignore local configuration files except for development +.env* !.env.development From 17fa8bb4f538b35f785840b5e18b5b92fcccbf3b Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Wed, 24 Dec 2025 12:11:49 +0000 Subject: [PATCH 2/4] feat(ppd): Adds feature files for Price Paid Data (PPD) functionality - Creates feature files to cover search, data retrieval, and download aspects of the PPD application. - Adds scenarios for postcode searches, property type filtering, and text indexing. --- test/features/appd.feature | 30 +++ test/features/ppd-data.feature | 18 ++ test/features/ppd.feature | 43 ++++ test/features/ppd_download.feature | 16 ++ .../specs/ppd-*.spec/ppd-results.spec | 83 +++++++ .../features/specs/ppd-*.spec/ppd-search.spec | 220 ++++++++++++++++++ test/features/text_index.feature | 34 +++ 7 files changed, 444 insertions(+) create mode 100644 test/features/appd.feature create mode 100644 test/features/ppd-data.feature create mode 100644 test/features/ppd.feature create mode 100644 test/features/ppd_download.feature create mode 100644 test/features/specs/ppd-*.spec/ppd-results.spec create mode 100644 test/features/specs/ppd-*.spec/ppd-search.spec create mode 100644 test/features/text_index.feature diff --git a/test/features/appd.feature b/test/features/appd.feature new file mode 100644 index 0000000..ca145a0 --- /dev/null +++ b/test/features/appd.feature @@ -0,0 +1,30 @@ +Feature: retrieve home page + + As a visitor + + I want to retrieve additional price paid data information + + @javascript + Scenario: + Given I am a visitor + When I retrieve the page "/app/ppd" + And I enter "AL7 1AJ" in the "postcode" field + And I click on the "detached" checkbox + And I click on the "semi-detached" checkbox + And I click on the "terraced" checkbox + And I click on the "flat/maisonette" checkbox + And I choose the "all" radio button + And I click on the "show results" button + Then I should retrieve a web page + And it should have content "8 Brownfields Court, Welwyn Garden City, AL7 1AJ" + + @javascript + Scenario: + Given I am a visitor + When I retrieve the page "/app/ppd" + And I enter "AL7 1BX" in the "postcode" field + And I click on the "other" checkbox + And I choose the "all" radio button + And I click on the "show results" button + Then I should retrieve a web page + And it should have content "1 The Swallows, Welwyn Garden City, AL7 1BX" diff --git a/test/features/ppd-data.feature b/test/features/ppd-data.feature new file mode 100644 index 0000000..e566f25 --- /dev/null +++ b/test/features/ppd-data.feature @@ -0,0 +1,18 @@ + +Feature: retrieve PPD data downloads + + As a visitor + + I want to retrieve and read the PPD datasets page + + In order to be able to download PPD monthly datasets + + Scenario: + Given I am a visitor + When I retrieve the page "/ppd-data.html" + Then I should retrieve a web page + And it should have the title "Download Price Paid Data" + And it should have content "Price paid data download options" + + + diff --git a/test/features/ppd.feature b/test/features/ppd.feature new file mode 100644 index 0000000..80d500b --- /dev/null +++ b/test/features/ppd.feature @@ -0,0 +1,43 @@ +Feature: ppd + + As a visitor + + I want to retrieve information about the price paid for houses + + @javascript + Scenario: + Given I am a visitor + When I retrieve the page "/app/ppd" + Then I should retrieve a web page + And it should have rules from stylesheet matching ".*application.*\.css$" + And it should have an image matching "lr_logo.*\.png$"b + + @javascript + Scenario: + Given I am a visitor + When I retrieve the page "/app/ppd" + And I enter "plymouth" in the "town" field + And I click on the "not new-build" checkbox + And I enter "1 Apr 2014" in the "min_date" field + And I enter "30 Apr 2014" in the "max_date" field + And I choose the "all" radio button + And I click on the "show results" button + Then I should retrieve a web page + And it should have content "5 Falcon Road, Plymouth, PL1 4GR" + And it should have content "69 Millbay Road, Plymouth, PL1 3NG" + And it should have content "71 Millbay Road, Plymouth, PL1 3NG" + And it should have content "Flat 9, 15 Ridge Park Road, Plymouth, PL7 2FG" + And it should have content "3 Verden Close, Plymouth, PL3 4BT" + And it should have content "7 Gardeners Lane, Plymouth, PL8 2PJ" + And it should have content "10 Gardeners Lane, Plymouth, PL8 2PJ" + + + @javascript + Scenario: + Given I am a visitor + When I retrieve the page "/app/ppd" + And I enter "adam and eve mews" in the "street" field + And I choose the "all" radio button + And I click on the "show results" button + Then I should retrieve a web page + And it should have content "5 Adam & Eve Mews, London, W8 6UG" diff --git a/test/features/ppd_download.feature b/test/features/ppd_download.feature new file mode 100644 index 0000000..3b3c035 --- /dev/null +++ b/test/features/ppd_download.feature @@ -0,0 +1,16 @@ +Feature: download ppd data + + As a visitor + + I want to retrieve information about the house price index for a region + + @javascript + Scenario: + Given I am a visitor + When I retrieve the page "/app/ppd" + And I enter "exeter" in the "town" field + And I click on the "show results" button + Then I should retrieve a web page + And I click on the first "download data" button + Then I should retrieve a web page + And it should have link text "get selected results as CSV with headers" with link ending with ".csv" diff --git a/test/features/specs/ppd-*.spec/ppd-results.spec b/test/features/specs/ppd-*.spec/ppd-results.spec new file mode 100644 index 0000000..18a0156 --- /dev/null +++ b/test/features/specs/ppd-*.spec/ppd-results.spec @@ -0,0 +1,83 @@ +# Price Paid Data Search results + +Tags: search, PPD, Price paid data + +The Price paid data search results view + +## Deselect search queries + +Tags: results + +* Type "Rose Cottage" into the "Building name or number" field +* Type "Plymouth" into the "Town or city" field +* Clicking show results will route User to the search results page +* Summary will display '21 transactions' +* Clicking the cross icon next to 'Plymouth' will remove the search query parameter +* Results page will re-render with new search parameters applied +* Summary will display '9873 matching transactions' + +## Change settings + +Tags: results + +* Type "Rose Cottage" into the "Building name or number" field +* Clicking show results will route User to the search results page +* Clicking 'change search settings' will router User to search form +* Prefilled value "Rose Cottage" visible in the "Building name or number" field + +## Download data + +Tags: results + +* Type "Rose Cottage" into the "Building name or number" field +* Clicking show results will route User to the search results page +* Clicking 'download data' will router User to the download page +* Clicking 'get selected results as CSV' will prompt a file download of type CSV +* Clicking 'get selected results as Turtle' will route User to generated TTL file +* Clicking 'view SPARQL query' will route User to SPARQL query view with pre-populated search values +* Clicking 'Back to results' will return you to the results page + +## Share + +Tags: results + +* Clicking 'share view' will open a modal dialogue prompting a Twitter link +* The Users can close the modal dialogue by clicking the close cross + +## Results summary number displayed + +Tags: results + +* Summary will display 'Showing 100 transactions' +* Clicking 'show a sample of at most 1000 results' will requery the search with new parameters +* Results page will re-render with new search parameters applied +* Summary will display 'Showing 1000 transactions' +* Clicking 'show all results' will requery the search with new parameters +* Results page will re-render with new search parameters applied +* Summary will display 'Current selection: show all results' + +## Results list item + +Tags: results + +* A result item has a postal address as title +* A result item has a list of transaction History with at least one or more item +* Clicking the transaction history external link will route User to the Elda API populated with property transaction data +* A result item has a list of address values + +## Results list query within + +Tags: results + +* Reset the form +* Type "Rose Cottage" into the "Building name or number" field +* Type "Devon" into the "County" field +* Clicking show results will route User to the search results page +* Summary will display 'from 460 matching transactions' +* Summary will display '45 properties' +* First Result item displays 'Rose Cottage, High Street, Sidmouth, EX10 0DU' +* Clicking the magnifiying glass icon adjacent to 'East Devon' will requery the search +* Search summary now displays 'district matches 'EAST DEVON' +* Summary will display '81 transactions' +* Summary will display '50 properties' +* First Result item displays 'Briar Rose Cottage, Lyme Regis, DT7 3RN' diff --git a/test/features/specs/ppd-*.spec/ppd-search.spec b/test/features/specs/ppd-*.spec/ppd-search.spec new file mode 100644 index 0000000..e3749f5 --- /dev/null +++ b/test/features/specs/ppd-*.spec/ppd-search.spec @@ -0,0 +1,220 @@ +# Price Paid Data + +Tags: PPD, price paid data + +The price paid data search form + +## Building search + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Clicking show results will route User to the search results page +* Summary will display '9873 matching transactions' +* Summary will display '62 properties' +* First result item address displays as 'Rose Cottage, North Road, Wells, BA5 1LA' +* Reset the form + +## Street search + +Tags: Search + +* Type "Harbour Road" into the "Street" field +* Clicking show results will route User to the search results page +* Summary will display '2192 matching transactions' +* First result item address displays as '73 Harbour Road, Bradford, BD6 3RG' +* Reset the form + +## Town search + +Tags: Search + +* Type "Plymouth" into the "Town or city" field +* Clicking show results will route User to the search results page +* Summary will display '10000 or more matching transactions' +* Summary will display '60 properties' +* First result item address displays as '25 Trinity Street, Plymouth, PL1 3FT' +* Reset the form + +## District search + +Tags: Search + +* Type "City of Westminster" into the "District" field +* Clicking show results will route User to the search results page +* Summary will display '10000 or more matching transactions' +* Summary will display '68 properties' +* First result item address displays as 'Flat 93, Chiltern Court, Baker Street, London, NW1 5TA' +* Reset the form + +## County search + +Tags: Search + +* Type "Devon" into the "County" field +* Clicking show results will route User to the search results page +* Summary will display 'from 10000 or more matching transactions' +* Summary will display '57 properties' +* First result item address displays as 'The Summerhouse, Lyme Regis, DT7 3XU' +* Reset the form + +## Locality search + +Tags: Search + +* Type "Thurloxton" into the "Locality" field +* Clicking show results will route User to the search results page +* Summary will display '71 transactions' +* First result item address displays as 'Greenway Farm House, Taunton, TA2 8RF' +* Reset the form + +## Postcode search + +Tags: Search + +* Type "PL6" into the "Postcode" field +* Clicking show results will route User to the search results page +* Summary will display '10000 or more matching transactions' +* Summary will display '61 properties' +* First result item address displays as '1 Moreton Avenue, Plymouth, PL6 5AZ' +* Reset the form + +## Property type filter + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Deselect 'detached' and 'semi-detached' from the 'Property Type' checkbox list +* Clicking show results will route User to the search results page +* Summary will display '1658 matching transactions' +* First result item address displays as 'Rose Cottage, Wells Road, Bath, BA2 9AY' +* Reset the form + +## New build filter + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Deselect 'not new-build' from the 'New build?' checkbox list +* Clicking show results will route User to the search results page +* Summary will display '150 matching transactions' +* First result item address displays as 'Rose Cottage, Fore Street, Warminster, BA12 0RQ' +* Reset the form + +## Estate type filter + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Deselect 'leasehold' from the 'Estate Type' checkbox list +* Clicking show results will route User to the search results page +* Summary will display '9731 matching transactions' +* First result item address displays as 'Rose Cottage, North Road, Wells, BA5 1LA' +* Reset the form + +## Transaction category filter + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Deselect 'standard' from the 'Transaction category' checkbox list +* Clicking show results will route User to the search results page +* Summary will display '239 matching transactions' +* First result item address displays as 'Rose Cottage, Gilson Road, Birmingham, B46 1LN' +* Reset the form + +## Price range filter + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Input '0' to the 'Minimum price' field +* Input '200000' to the 'Maximum price' field +* Clicking show results will route User to the search results page +* Summary will display '4753 matching transactions' +* First result item address displays as 'Rose Cottage, Malt Mill Lane, Halesowen, B62 8JE' +* Reset the form + +## Date range filter + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Select '22/11/2020' in the 'earliest' field +* Select '22/11/2021' in the 'latest' field +* Clicking show results will route User to the search results page +* Summary will display '273 matching transactions' +* First result item address displays as 'Rose Cottage, Malt Mill Lane, Halesowen, B62 8JE' +* Reset the form + +## Small date range + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Select '19/11/2021' in the 'earliest' field +* Select '22/11/2021' in the 'latest' field +* Clicking show results will route User to the search results page +* Summary will display '0 transactions' +* Reset the form + +## Invalid date range (earliest date occurs after latest date) + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Select '22/11/2021' in the 'earliest' field +* Select '22/11/2020' in the 'latest' field +* Clicking show results will route User to the search results page +* Summary will display '0 transactions' +* Reset the form + +## Limit results to 1000 + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Select 'at most 1000' from the 'How many results?' radio list +* Clicking show results will route User to the search results page +* Summary will display '9873 matching transactions' +* Summary will display '570 properties' +* First result item address displays as 'Rose Cottage, Lower Gustard Wood, St Albans, AL4 8RU' +* Reset the form + +## No Limit results + +Tags: Search + +* Type "Rose Cottage" into the "Building name or number" field +* Select 'all' from the 'How many results?' radio list +* Clicking show results will route User to the search results page +* Summary will display '9873 matching transactions' +* Summary will display '5887 properties' +* A warning is visible with the phrase 'We have limited this page to 5000 results' +* First result item address displays as 'Rose Cottage, Lower Gustard Wood, St Albans, AL4 8RU' +* Reset the form + +## Large queries + +Tags: Search + +* Type "Birmingham" into the "Town or city" field +* Select 'all' from the 'How many results?' radio list +* Clicking show results will route User to the search results page after '1m 40s' +* Summary will display 'Found 388822 transactions' +* Summary will display 'for 227036 properties' +* A warning is visible with the phrase 'We have limited this page to 5000 results' +* First result item address displays as 'Apartment 2109, 10 Holloway Circus Queensway, Birmingham, B1 1BA' +* Reset the form + +## Help + +* Clicking 'Help' button will open a modal dialogue window with Help text +* The User can link to troubleshooting guidance from here +* The User can close the modal dialogue by clicking the cross icon + +## Reset form + +* Type "Rose Cottage" into the "Building name or number" field +* Type "Thurloxton" into the "Locality" field +* Clicking 'reset the form' will remove all previously entered input values diff --git a/test/features/text_index.feature b/test/features/text_index.feature new file mode 100644 index 0000000..a3c56c2 --- /dev/null +++ b/test/features/text_index.feature @@ -0,0 +1,34 @@ +Feature: text index + + As a visitor + + I want the text index to work properly when searching for data + + + Scenario: common stop words not stopped and multiple search constraints work + Given I am a visitor + When I retrieve the page "/app/ppd" + And I enter "plymouth" in the "town" field + And I enter "the" in the "street" field + And I enter "1 Apr 2014" in the "min_date" field + And I enter "30 Apr 2014" in the "max_date" field + And I choose the "all" radio button + And I click on the "show results" button + Then I should retrieve a web page + And it should have content "1B The Dell, Plymouth, PL7 4PS" + And it should have content "Basement, 2A The Esplanade, Plymouth, PL1 2PJ" + + + @recent + Scenario: common stop words not stopped and multiple search constraints work in recent data + Given I am a visitor + When I retrieve the page "/app/ppd" + And I enter "the" in the "street" field + And I specify the latest month for which data is available + And I click on the "show results" button + Then I should retrieve a web page + And it should have at least one address + + + + From 74f74c0930afb05029b058287732a0bc241f072f Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Wed, 24 Dec 2025 12:12:17 +0000 Subject: [PATCH 3/4] docs: Updates CHANGELOG - Introduces feature tests for Cucumber and Puppeteer Integration Tests. - Adds scenarios for postcode searches and text indexing. - Updates .gitignore rules to exclude .DS_Store files. - Generalises .env exclusion for improved secrets management. --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2caf9e..d8201c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Introduced feature tests for search, data retrieval and download aspects for + use in the Cucumber and Puppetteer Integration Tests (CuPIT). +- Added scenarios for postcode searches, property type filtering, and text + indexing. + +### Changed + +- Updated .gitignore rules to include .DS_Store files and prevent unnecessary + tracking of Mac OS system files +- Generalises .env exclusion to cover all variations, except the development one, + for better secrets management + ## [2.2.3] - 2025-11 ### Changed From ce89d37450aa097b1ffa64fdf1f6ce75bff9fcbb Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Wed, 24 Dec 2025 12:52:03 +0000 Subject: [PATCH 4/4] chore(tests): Moved PPD spec files - Moved PPD spec files to remove wildcard characters from sync path. --- test/features/specs/{ppd-*.spec => }/ppd-results.spec | 0 test/features/specs/{ppd-*.spec => }/ppd-search.spec | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/features/specs/{ppd-*.spec => }/ppd-results.spec (100%) rename test/features/specs/{ppd-*.spec => }/ppd-search.spec (100%) diff --git a/test/features/specs/ppd-*.spec/ppd-results.spec b/test/features/specs/ppd-results.spec similarity index 100% rename from test/features/specs/ppd-*.spec/ppd-results.spec rename to test/features/specs/ppd-results.spec diff --git a/test/features/specs/ppd-*.spec/ppd-search.spec b/test/features/specs/ppd-search.spec similarity index 100% rename from test/features/specs/ppd-*.spec/ppd-search.spec rename to test/features/specs/ppd-search.spec