Filter search results with Hotel Name, Price per person, star rating and Hotel facilites#4
Open
shsuneel wants to merge 9 commits into
Open
Filter search results with Hotel Name, Price per person, star rating and Hotel facilites#4shsuneel wants to merge 9 commits into
shsuneel wants to merge 9 commits into
Conversation
…test and function comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi
In this pull request, I have implemented the search results page for the front-end test. Here are the key changes made:
Internet connection needed for images
Running application
app.webm
Created a new components
filter.components.tsx
hotel-widget.component.tsx
image-carousel.components.tsx
search-bar.component.tsx
search-item.component.tsx
search-page.components.tsx
-filterData.service.ts
Updated
search-results.component.tsx to link SearchBarComponent and SearchPageComponent
Added tests for filterData.service.ts and hotel-widget.component.cy.tsx
I also added comments to explain the functions
The SearchPageComponent is a React component that displays a search page with a filter component, the number of holidays found, and a list of hotel widgets based on the search results. It also handles filter events and updates the filtered results accordingly.
Added filters for price per person, hotel facilities, and star rating to allow users to refine their search results.
filterData.service.ts
in this file I added various filters for holiday data based on different criteria such as price per person, hotel facilities, star ratings, and hotel name.
The specific implementation of the filtering functions
getPricePPFilter, getHotelFacilitiesFilter, getStarRatingsFilter
All filters will be dynamically generated as per data
Included appropriate unit tests using Cypress to ensure the functionality of the search results page.