An important announcement from the founder of property-bee.com: The future of Property Bee is assured.

Bug #143: Update ESPC rules

An area to discuss the development and technical aspects of the toolbar

Bug #143: Update ESPC rules

Postby s-p on Thu Oct 08, 2009 12:46 pm

I've checked in some modifications to the ESPC ruleset (pb_rules_espc.js) in addition to a minor adjustment to the styling using in the History table (pb_style.js), which should hopefully resolve the issues being experienced.

Could one of you kind fellows review the code adjustments and see if they meet the standards expected? As this is my first real attempt at javascript, you'll have forgive any obvious flaws! :oops:
Scott
s-p
 
Posts: 125
Joined: Mon Jun 09, 2008 10:20 pm

Re: Bug #143: Update ESPC rules

Postby Beerhunter on Thu Oct 08, 2009 7:50 pm

Hi s-p,

Just done a quick diff / tried it out and it looks pretty good to me :D

Have one comment, and its a bug that has been there a longtime so I'm to blame :oops:

In function _propertyDetailsPage() it stores the what is the "detailed description" on the webpage as a "brief description"... this means if you switch between the search results and the properties page, a change gets logged each time.

Other than that it looks good to me!

Cheers
BH
User avatar
Beerhunter
Site Admin
 
Posts: 1788
Joined: Tue Jan 22, 2008 12:05 am

Re: Bug #143: Update ESPC rules

Postby s-p on Fri Oct 09, 2009 11:13 am

Thanks BH.

I've changed the Property details page to now refer to the Detailed Description as opposed to using the same brief description as the search pages contain. In addition to this, I've also added in handling for ESPC links which are referred to from the parent site SSPC (i.e. http://espc.com/EspcPublic/UniversalPages/PropertyDetails.aspx?rid=). If there's anything else out of place, feel free to let me know.
Scott
s-p
 
Posts: 125
Joined: Mon Jun 09, 2008 10:20 pm

Re: Bug #143: Update ESPC rules

Postby Beerhunter on Fri Oct 09, 2009 4:56 pm

Thanks s-p.

Will try and give it more of a test over the weekend once I've finished off the daft.ie changes.
User avatar
Beerhunter
Site Admin
 
Posts: 1788
Joined: Tue Jan 22, 2008 12:05 am

Re: Bug #143: Update ESPC rules

Postby Beerhunter on Wed Oct 14, 2009 4:51 pm

Just been testing ESPC, and spoted one minor problem;

Steps;
* Search properties for sale
* Select all areas in Scotland
* Step 2 >
* Search
(takes awhile!)
* Select 50 properties/page :)

Some properties don't have a history and it seems to be random.

After some investigation, the containing div can have the class attribute of
* searchResult (which is in the rules)
* premierSearchResult - tho there's no style differences (as far as I can see)
* featuredSearchResult - green background and no history

I've updated _searchResultsPage(domain) as follows;
Code: Select all
/html/body/form[@id='aspnetForm']/div[@id='page']/div[@id='pageArea']/div[@id='pageBody']/div[@id='content']/div[@class='searchResults']/ol/li/div[contains(@class,'searchResult') [b]or contains(@class,'premierSearchResult') or contains(@class,'featuredSearchResult')[/b]]/div


Trying a couple of search pages (x50 properties) looks they all get a history now.

Comitted as rev 31
User avatar
Beerhunter
Site Admin
 
Posts: 1788
Joined: Tue Jan 22, 2008 12:05 am

Re: Bug #143: Update ESPC rules

Postby s-p on Wed Oct 14, 2009 5:44 pm

Thanks BH. Not sure why those variations didn't turn up in my testing.

Ah well :D
Scott
s-p
 
Posts: 125
Joined: Mon Jun 09, 2008 10:20 pm

Re: Bug #143: Update ESPC rules

Postby Beerhunter on Wed Oct 14, 2009 11:05 pm

Its like doing a demo in front of people - when it doesn't matter it works really well, when it matters there's always an undiscovered bug :)
User avatar
Beerhunter
Site Admin
 
Posts: 1788
Joined: Tue Jan 22, 2008 12:05 am

Re: Bug #143: Update ESPC rules

Postby Squidward on Thu Oct 15, 2009 1:40 am

Tried out ESPC, and noticed that some of the alternative search types lead to pages without history tables. It may be that these weren't supported before and they're not worth bothering with - if so, ignore me :). Anyway it seems to come down to ESPC URL variations.

Area Search
(Front page -> 'Search' on the top bar -> 'Area search')

If you search for any area through here you get a search result page whose URL starts http://www.espc.com/Buying/ ..., but currently the rules only recognise this sort of URL as a property details page.

steps:
* click (View area profiles for:) Edinburgh
* click (View properties in:) Edinburgh City Centre

leads to search results page at:
http://www.espc.com/Buying/Scotland/Edi ... ityCentre/

with no history tables.


I superficially fixed this in my copy by adding _searchResultsPage to the appropriate rule, ie.
Code: Select all
    "espc.com/Buying/"    : Array( _propertyDetailsPage("espc.com"), _searchResultsPage("espc.com") ),
(and did the same for espc.co.uk)

Since search results and property details seem to be differentiated quite clearly on ESPC by a div with class = either 'searchResults' or 'propertyDetails', I reckon this is safe from one sort of page getting parsed as the other sort, but I'll just post here instead of commit in case anyone else knows better.


Area Search, part 2
Extra intrigue - if you do the first step from above but then use the Google map for the second:

steps:
* click (View area profiles for:) Edinburgh
* click city centre on Google map, click "To view properties for sale in this area click here"

it leads to a search results page at the same URL except all in lowercase:
http://www.espc.com/buying/scotland/edi ... itycentre/

with no history tables.


Again, I hackily fixed this in my own copy by duplicating the rule from above and making the URL lowercase, ie.
Code: Select all
    "espc.com/buying/"    : Array( _propertyDetailsPage("espc.com"), _searchResultsPage("espc.com") ),
(and did the same for espc.co.uk).


Reference Search
(Front page -> 'Search' on the top bar -> 'Reference search'
or 'Reference' in the quick 'Search for Properties' box on the right)

steps:
* Enter a reference eg. 279558 and click to proceed

This leads to a property details page on which the history table doesn't appear.

It's because the URL is in lowercase, eg:
http://www.espc.com/buying/279558.html


This is effectively fixed by the code edit in Area search part 2 above.
Squidward
 
Posts: 34
Joined: Mon Jun 09, 2008 1:28 pm

Re: Bug #143: Update ESPC rules

Postby s-p on Thu Oct 15, 2009 12:58 pm

That's brilliant, thanks very much Squidward.

I personally hate testing any code I've written as I always make far too many assumptions about whether things actually work or not (lazy in other words :lol:). I'll take a look into those issues you've described and see if we can get something checked in tonight. Assuming testing goes on that, hopefully we can get this part signed off as completed.
Scott
s-p
 
Posts: 125
Joined: Mon Jun 09, 2008 10:20 pm

Re: Bug #143: Update ESPC rules

Postby Squidward on Thu Oct 15, 2009 7:48 pm

Glad I helped :). Yeah, I don't relish testing, myself, something about the way that the task can be hard to define, and you can never really do 'enough' so you never get the satisfaction of really 'finishing'. It's opposite to the appeal of programming, in one sense.

Though I find once I've set a reasonable boundary on it - I stumbled across one yesterday with the inadvertent thought "I'll just check one of everything on this particular ESPC header bar" - a boundary which also feels somewhat comprehensive - it can be alright.
Squidward
 
Posts: 34
Joined: Mon Jun 09, 2008 1:28 pm

Re: Bug #143: Update ESPC rules

Postby s-p on Thu Oct 15, 2009 8:51 pm

Thanks to Squidward, I was able to quickly resolve the problems referenced in the post above. ;)

In addition to this, I also was able to perform an additional set of updates:
  • Correct handling of the Price attribute on "Property Detail" page
  • Add support for Rental properties (Search+Detail pages)
These changes have been committed tonight so are available for additional testing where required (34).

For references purposes, here are the tests I was able to complete successfully following these updates.

SECTION: Home
--> Search for Properties (Quick - Buy) [30 Properties checked] - Passed
--> Search for Properties (Quick - Rental) [30 Properties checked] - Passed
(Rules update was required to add this functionality)

--> Search for Properties (Detailed) [27 Properties checked] - Passed
--> Search for Properties (Reference) [1 Property checked] - Passed

SECTION: Search
--> For Sale Search [30 Properties checked] - Passed
--> Area Search (via text link) [30 Properties checked] - Passed
--> Area Search (via map link) [30 Properties checked] - Passed
--> Rental Search [4 Properties checked] - Passed
(Rules update was required to add this functionality)

--> Reference Search [1 Property checked] - Passed
--> Premier Properties [30 Properties checked] - Passed
--> Overseas Property (Solicitor Search) [5 Properties checked] - Passed

SECTION: User Area
--> My Saved Properties [1 Property checked] - Passed
--> My Saved Searches [30 Properties checked] - Passed

Any queries/concerns, let me know. I'm hoping this section is now in a position to be signed off. :D
Scott
s-p
 
Posts: 125
Joined: Mon Jun 09, 2008 10:20 pm

Re: Bug #143: Update ESPC rules

Postby Beerhunter on Sat Oct 17, 2009 6:41 pm

Just run through a few tests, and all looks ok to me :D
User avatar
Beerhunter
Site Admin
 
Posts: 1788
Joined: Tue Jan 22, 2008 12:05 am


Return to Development

Who is online

Users browsing this forum: No registered users and 7 guests

cron