From 0c45ffa0919b2c7c5aa974fa90da6d2583d312b5 Mon Sep 17 00:00:00 2001 From: Jamie Unwin Date: Wed, 7 Dec 2016 15:01:36 +0000 Subject: [PATCH 1/3] Changed the homepage link to cinematography --- fixtures/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixtures/data.js b/fixtures/data.js index ea43dbca..ed570e83 100644 --- a/fixtures/data.js +++ b/fixtures/data.js @@ -49,7 +49,7 @@ module.exports = { figure: '/assets/img/home/collections/cinematography.jpg', description: 'Objects representing the history of cinema: from magic lanterns to digital technologies', columns: 'small-6 medium-3', - link: '/search?q=&filter%5Bcategories%5D=Cinematography' + link: '/search?filter%5Bhas_image%5D=true&filter%5Bcategories%5D=Cinematography&page%5Bsize%5D=50&page%5Btype%5D=search' }, { type: 'collection', title: 'The Babbage Papers', From 0736cc562fb857e94a413635f1c6e362a44ae5b7 Mon Sep 17 00:00:00 2001 From: Danielwhyte Date: Wed, 7 Dec 2016 15:33:35 +0000 Subject: [PATCH 2/3] updates tests for index changes --- test/check-purchased.test.js | 2 +- test/client/disactive-facet.clienttest.js | 8 +++--- test/client/multiple-filters.clienttest.js | 30 +++++++++++----------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/test/check-purchased.test.js b/test/check-purchased.test.js index 438abee5..aa6b1cb6 100644 --- a/test/check-purchased.test.js +++ b/test/check-purchased.test.js @@ -22,7 +22,7 @@ testWithServer('Search request for Object with "Purchased" in credit line', {}, const htmlRequest = { method: 'GET', - url: '/search/objects?q=stephen%20hawking%20painting', + url: '/search/objects?q=stephen%20hawking%20painting&filter[categories]=Art', headers: {'Accept': 'application/vnd.api+json'} }; diff --git a/test/client/disactive-facet.clienttest.js b/test/client/disactive-facet.clienttest.js index 89c55673..a309c351 100644 --- a/test/client/disactive-facet.clienttest.js +++ b/test/client/disactive-facet.clienttest.js @@ -1,15 +1,15 @@ module.exports = { 'Disactive Facet': function (browser) { browser - .url('http://localhost:8000/search/people?q=ada%20lovelace') + .url('http://localhost:8000/search/people?q=john') .waitForElementVisible('body', 2000) .assert.elementNotPresent('.filter .filter--active .filter--uncollapsible') .waitForElementVisible('.filter[data-filter="Occupation"] a', 3000) .click('.filter[data-filter="Occupation"] a') - .waitForElementVisible('.filter__box[value=mathematician]', 3000) - .click('.filter__box[value=mathematician]') + .waitForElementVisible('.filter__box[value=photographer]', 3000) + .click('.filter__box[value=photographer]') .waitForElementVisible('.filter--active', 3000) - .click('.filter__box[value=mathematician]') + .click('.filter__box[value=photographer]') .pause(3000) .assert.elementNotPresent('.filter .filter--active .filter--uncollapsible') .end(); diff --git a/test/client/multiple-filters.clienttest.js b/test/client/multiple-filters.clienttest.js index 0a358442..75c46b1b 100644 --- a/test/client/multiple-filters.clienttest.js +++ b/test/client/multiple-filters.clienttest.js @@ -6,27 +6,27 @@ module.exports = { .pause(5000) .waitForElementVisible('.filter[data-filter="Type"] a', 1000) .click('.filter[data-filter="Type"] a') - .waitForElementVisible('.filter__box[value="petrol engines"]', 5000) - .click('.filter__box[value="petrol engines"]') - .pause(10000) - .assert.urlEquals('http://localhost:8000/search?q=engine&filter%5Btype%5D=petrol%20engines&page%5Bsize%5D=50&page%5Btype%5D=search') - .assert.containsText('.searchtab:nth-of-type(1)', '25') + .waitForElementVisible('.filter__box[value="aircraft engine"]', 5000) + .click('.filter__box[value="aircraft engine"]') + .pause(2000) + .assert.urlEquals('http://localhost:8000/search?q=engine&filter%5Btype%5D=aircraft%20engine&page%5Bsize%5D=50&page%5Btype%5D=search') + .assert.containsText('.searchtab:nth-of-type(1)', '29') .assert.containsText('.searchtab:nth-of-type(2)', '0') - .assert.containsText('.searchtab:nth-of-type(3)', '25') + .assert.containsText('.searchtab:nth-of-type(3)', '29') .assert.containsText('.searchtab:nth-of-type(4)', '0') - .click('.filter__box[value="private car components"]') - .pause(10000) - .assert.urlEquals('http://localhost:8000/search?q=engine&filter%5Btype%5D=petrol%20engines&filter%5Btype%5D=private%20car%20components&page%5Bsize%5D=50&page%5Btype%5D=search') - .assert.containsText('.searchtab:nth-of-type(1)', '7') + .click('.filter__box[value="supercharger"]') + .pause(2000) + .assert.urlEquals('http://localhost:8000/search?q=engine&filter%5Btype%5D=aircraft%20engine&filter%5Btype%5D=supercharger&page%5Bsize%5D=50&page%5Btype%5D=search') + .assert.containsText('.searchtab:nth-of-type(1)', '1') .assert.containsText('.searchtab:nth-of-type(2)', '0') - .assert.containsText('.searchtab:nth-of-type(3)', '7') + .assert.containsText('.searchtab:nth-of-type(3)', '1') .assert.containsText('.searchtab:nth-of-type(4)', '0') .click('.searchtab:nth-of-type(3)') - .pause(10000) - .assert.urlEquals('http://localhost:8000/search/objects?q=engine&filter%5Btype%5D=petrol%20engines&filter%5Btype%5D=private%20car%20components&page%5Bsize%5D=50&page%5Btype%5D=search') - .assert.containsText('.searchtab:nth-of-type(1)', '7') + .pause(2000) + .assert.urlEquals('http://localhost:8000/search/objects?q=engine&filter%5Btype%5D=aircraft%20engine&filter%5Btype%5D=supercharger&page%5Bsize%5D=50&page%5Btype%5D=search') + .assert.containsText('.searchtab:nth-of-type(1)', '1') .assert.containsText('.searchtab:nth-of-type(2)', '0') - .assert.containsText('.searchtab:nth-of-type(3)', '7') + .assert.containsText('.searchtab:nth-of-type(3)', '1') .assert.containsText('.searchtab:nth-of-type(4)', '0') .end(); } From 956f1aa7cb69a16b445b21df3cc0132eab6f03a6 Mon Sep 17 00:00:00 2001 From: Jamie Unwin Date: Wed, 7 Dec 2016 15:01:36 +0000 Subject: [PATCH 3/3] Changed the homepage link to cinematography --- fixtures/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixtures/data.js b/fixtures/data.js index ea43dbca..ed570e83 100644 --- a/fixtures/data.js +++ b/fixtures/data.js @@ -49,7 +49,7 @@ module.exports = { figure: '/assets/img/home/collections/cinematography.jpg', description: 'Objects representing the history of cinema: from magic lanterns to digital technologies', columns: 'small-6 medium-3', - link: '/search?q=&filter%5Bcategories%5D=Cinematography' + link: '/search?filter%5Bhas_image%5D=true&filter%5Bcategories%5D=Cinematography&page%5Bsize%5D=50&page%5Btype%5D=search' }, { type: 'collection', title: 'The Babbage Papers',