package Ġai . plat on . pulsar . qa . amazon . ranking Ċ Ċ import Ġai . plat on . pulsar . qa .* Ċ import Ġai . plat on . pulsar . qa . assert Any Records NotBlank Ċ import Ġkotlin . test . Ignore Ċ import Ġkotlin . test . Test Ċ Ċ class ĠBest Sell ers Tests Ġ: ĠQ AB ase () Ġ{ ĊĠĠĠ Ġprivate Ġval Ġresource Prefix Ġ= Ġ" config / sites / amazon / crawl / parse / sql " ĊĠĠĠ Ġprivate Ġval Ġdefault Sql Resource Ġ= Ġ"$ resource Prefix / crawl / x - asin - best - sell ers . sql " ĊĠĠĠ Ġprivate Ġval Ġdefault Url Ġ= Ġ" https :// www . amazon . com / Best - Sell ers - Ar ts - Craft s - Sew ing - Clock - K its / zg bs / arts - craft s / 8 0 9 0 8 2 2 0 1 1 " ĊĊĠĠĠ Ġprivate Ġval Ġurls Ġ= ĠlistOf ( ĊĠĠĠĠĠĠĠ Ġ" https :// www . amazon . com / Best - Sell ers / zg bs ", ĊĠĠĠĠĠĠĠ Ġ" https :// www . amazon . com / Best - Sell ers - App li ances - Cook tops / zg bs / app li ances ", ĊĠĠĠĠĠĠĠ Ġ" https :// www . amazon . com / Best - Sell ers - App li ances - Cook tops / zg bs / app li ances / 3 7 4 1 2 6 1 ", ĊĠĠĠĠĠĠĠ Ġ" https :// www . amazon . com / Best - Sell ers - App li ances - Free zers / zg bs / app li ances / 3 7 4 1 3 3 1 ", ĊĠĠĠĠĠĠĠ Ġ" https :// www . amazon . com / Best - Sell ers - Ar ts - Craft s - Sew ing - Clock - K its / zg bs / arts - craft s ", ĊĠĠĠĠĠĠĠ Ġ" https :// www . amazon . com / Best - Sell ers - Ar ts - Craft s - Sew ing - Clock - K its / zg bs / arts - craft s / 1 7 5 6 8 9 2 4 0 1 1 ", ĊĠĠĠĠĠĠĠ Ġ" https :// www . amazon . com / Best - Sell ers - Ar ts - Craft s - Sew ing - Clock - K its / zg bs / arts - craft s / 8 0 9 0 8 2 2 0 1 1 " ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġensure Fields () Ġ{ ĊĠĠĠĠĠĠĠ Ġvar Ġfields Ġ= ĠlistOf (" asin ", Ġ" asin _ url ", Ġ" category in url ", Ġ" category level ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" selected category ", Ġ" category _ url ", Ġ" rank ", Ġ" title ", Ġ" score ", Ġ" star num ") ĊĠĠĠĠĠĠĠ Ġassert All Records NotBlank ( Check Entry ( default Url , Ġdefault Sql Resource , Ġfields )) ĊĊĠĠĠĠĠĠĠ Ġfields Ġ= ĠlistOf (" price ") ĊĠĠĠĠĠĠĠ Ġassert Most Records NotBlank ( Check Entry ( default Url , Ġdefault Sql Resource , Ġfields )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Ignore (" New Ġmechanism Ġis Ġrequired Ġto Ġcheck Ġmissing Ġpage ") ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` When Ġpage Ġis Ġgone Ġthen Ġthe Ġas in Ġis ĠSorry `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġurl Ġ= Ġ" https :// www . amazon . com / gp / best sell ers / 2 2 6 1 2 7 7 7 2 0 1 1 " ĊĠĠĠĠĠĠĠ Ġassert Field Contains ( url , Ġdefault Sql Resource , Ġ" asin ", Ġ" Sorry ") ĊĠĠĠ Ġ} Ċ } Ċ