Created
February 15, 2018 06:32
-
-
Save simonexmachina/30a5ac199c5e5e630fa4f1dada7e826d to your computer and use it in GitHub Desktop.
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
diff --git a/client/shared/components/filterList/filterList.js b/client/shared/components/filterList/filterList.js | |
index a2c459d9..203332fe 100644 | |
--- a/client/shared/components/filterList/filterList.js | |
+++ b/client/shared/components/filterList/filterList.js | |
@@ -79,9 +79,7 @@ const FilterList = ({ FilterItem, parsedLocation, param, className }) => { | |
const maxParamFormatValue = filterParamsConfig[param].format | |
? filterParamsConfig[param].format(maxParamValue) | |
: maxParamValue | |
- const priceDisplayName = `${minParamFormatValue} - ${ | |
- maxParamFormatValue | |
- }` | |
+ const priceDisplayName = `${minParamFormatValue} - ${maxParamFormatValue}` | |
const link = makeLink( | |
omit(parsedLocation, [minRangeParam, maxRangeParam, 'page']) | |
) | |
@@ -99,9 +97,9 @@ const FilterList = ({ FilterItem, parsedLocation, param, className }) => { | |
const paramFormatValue = filterParamsConfig[param].format | |
? filterParamsConfig[param].format(parsedLocation[param]) | |
: parsedLocation[param] | |
- const priceDisplayName = `${filterParamsConfig[param].label} ${ | |
- paramFormatValue | |
- }` | |
+ const priceDisplayName = `${ | |
+ filterParamsConfig[param].label | |
+ } ${paramFormatValue}` | |
const link = makeLink(omit(parsedLocation, [param, 'page'])) | |
return ( | |
<ul className={className}> | |
diff --git a/client/v0/pages/search/content/searchPageArticle.js b/client/v0/pages/search/content/searchPageArticle.js | |
index f9b196e9..6f07a82a 100644 | |
--- a/client/v0/pages/search/content/searchPageArticle.js | |
+++ b/client/v0/pages/search/content/searchPageArticle.js | |
@@ -20,9 +20,7 @@ const SearchPageArticle = ({ html, centre = false, wide = false }) => { | |
</div> | |
)} | |
<div | |
- className={`content-l -size-scale-tablet content-${alignment} ${ | |
- layoutWide | |
- }`} | |
+ className={`content-l -size-scale-tablet content-${alignment} ${layoutWide}`} | |
> | |
<div className="fds-c-text-preformatted"> | |
<DangerouslySetInnerHtml>{html}</DangerouslySetInnerHtml> | |
diff --git a/common/actions/search/onSearchPageDidUpdate.spec.js b/common/actions/search/onSearchPageDidUpdate.spec.js | |
index 856828c7..7a9b4c80 100644 | |
--- a/common/actions/search/onSearchPageDidUpdate.spec.js | |
+++ b/common/actions/search/onSearchPageDidUpdate.spec.js | |
@@ -68,9 +68,12 @@ describe('onSearchPageDidUpdate() action', () => { | |
}) | |
it('tracks relevant search counts', () => { | |
- expect(mockTrackSearchResultsDisplay).toHaveBeenCalledWith('themeforest', { | |
- location: true | |
- }) | |
+ expect(mockTrackSearchResultsDisplay).toHaveBeenCalledWith( | |
+ 'themeforest', | |
+ { | |
+ location: true | |
+ } | |
+ ) | |
expect(mockTrackSearchResultsDisplay).toHaveBeenCalledTimes(1) | |
}) | |
@@ -102,9 +105,12 @@ describe('onSearchPageDidUpdate() action', () => { | |
}) | |
it('makes a call to track the search counts', () => { | |
- expect(mockTrackSearchResultsDisplay).toHaveBeenCalledWith('themeforest', { | |
- location: true | |
- }) | |
+ expect(mockTrackSearchResultsDisplay).toHaveBeenCalledWith( | |
+ 'themeforest', | |
+ { | |
+ location: true | |
+ } | |
+ ) | |
expect(mockTrackSearchResultsDisplay).toHaveBeenCalledTimes(1) | |
}) | |
diff --git a/common/actions/user/cart.js b/common/actions/user/cart.js | |
index a758390f..02e1ca72 100644 | |
--- a/common/actions/user/cart.js | |
+++ b/common/actions/user/cart.js | |
@@ -16,8 +16,9 @@ const addItemToCartRequestAction = () => ({ type: 'addItemToCartRequest' }) | |
const addItemToCartSuccessAction = response => { | |
reportModalPageView({ | |
title: 'Modal: Item added to cart', | |
- page: `${window.location.pathname}/item-added-to-cart${window.location | |
- .search}` | |
+ page: `${window.location.pathname}/item-added-to-cart${ | |
+ window.location.search | |
+ }` | |
}) | |
return { | |
type: 'addItemToCartSuccess', | |
diff --git a/common/utils/rollbar/transformer.js b/common/utils/rollbar/transformer.js | |
index 49f8e63d..9b68efda 100644 | |
--- a/common/utils/rollbar/transformer.js | |
+++ b/common/utils/rollbar/transformer.js | |
@@ -14,9 +14,9 @@ export default payload => { | |
const errorClass = exception.class || '' | |
const errorDescription = exception.description || exception.message || '' | |
- const hashBase = `[${titleize(payload.level)}] ${errorClass} ${ | |
- errorDescription | |
- }` | |
+ const hashBase = `[${titleize( | |
+ payload.level | |
+ )}] ${errorClass} ${errorDescription}` | |
payload.fingerprint = hashBase | |
} | |
diff --git a/cypress/support/commands.js b/cypress/support/commands.js | |
index 0f3268aa..4e2e9429 100644 | |
--- a/cypress/support/commands.js | |
+++ b/cypress/support/commands.js | |
@@ -10,9 +10,9 @@ require('@cypress/snapshot').register() | |
// register custom commands | |
Cypress.Commands.add('visitMarket', (market, route, ...args) => { | |
- const url = `${Cypress.env('protocol')}://${market}.${Cypress.env('domain')}${ | |
- route | |
- }` | |
+ const url = `${Cypress.env('protocol')}://${market}.${Cypress.env( | |
+ 'domain' | |
+ )}${route}` | |
/** | |
* TODO: @fraserxu to remove this dirty drity hack after phase 2 finish | |
@@ -35,9 +35,9 @@ Cypress.Commands.add( | |
) | |
Cypress.Commands.add('requestMarket', (market, route, options) => { | |
- const url = `${Cypress.env('protocol')}://${market}.${Cypress.env('domain')}${ | |
- route | |
- }` | |
+ const url = `${Cypress.env('protocol')}://${market}.${Cypress.env( | |
+ 'domain' | |
+ )}${route}` | |
const opt = Object.assign({}, options, { url }) | |
cy.request(opt) | |
}) | |
diff --git a/scripts/runfile/test.js b/scripts/runfile/test.js | |
index 566daff6..409e440c 100644 | |
--- a/scripts/runfile/test.js | |
+++ b/scripts/runfile/test.js | |
@@ -67,9 +67,7 @@ function unit(file = '') { | |
process.env.NODE_ENV = 'test' | |
if (options(this).debug) { | |
run( | |
- `node debug --debug-brk ./node_modules/jest/bin/jest.js --runInBand ${ | |
- file | |
- }` | |
+ `node debug --debug-brk ./node_modules/jest/bin/jest.js --runInBand ${file}` | |
) | |
} else if (options(this).watch) { | |
try { | |
diff --git a/server/router/cart.spec.js b/server/router/cart.spec.js | |
index e049a161..bb098a6e 100644 | |
--- a/server/router/cart.spec.js | |
+++ b/server/router/cart.spec.js | |
@@ -44,12 +44,10 @@ describe('Cart endpoints', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual(data) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.cart.event', [ | |
- 'cart_event:create', | |
- 'signed_in_user:false' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.cart.event', | |
+ ['cart_event:create', 'signed_in_user:false'] | |
+ ) | |
}) | |
}) | |
@@ -96,12 +94,10 @@ describe('Cart endpoints', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual(data) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.cart.event', [ | |
- 'cart_event:add_to', | |
- 'signed_in_user:false' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.cart.event', | |
+ ['cart_event:add_to', 'signed_in_user:false'] | |
+ ) | |
}) | |
}) | |
@@ -112,12 +108,10 @@ describe('Cart endpoints', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual(data) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.cart.event', [ | |
- 'cart_event:edit', | |
- 'signed_in_user:false' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.cart.event', | |
+ ['cart_event:edit', 'signed_in_user:false'] | |
+ ) | |
}) | |
}) | |
}) | |
diff --git a/server/router/search.js b/server/router/search.js | |
index 9a560899..805066bb 100644 | |
--- a/server/router/search.js | |
+++ b/server/router/search.js | |
@@ -31,9 +31,7 @@ const getSimilarItems = query => { | |
return publicSearchApi.moreLikeThis(sanitizedQuery).then(formatSearchResult) | |
} else { | |
const searchQueryString = querystring.stringify(sanitizedQuery) | |
- const similarSearchUrl = `${SHOPFRONT_SIMILAR_SEARCH_API}?${ | |
- searchQueryString | |
- }` | |
+ const similarSearchUrl = `${SHOPFRONT_SIMILAR_SEARCH_API}?${searchQueryString}` | |
return axiosBackend.get(similarSearchUrl).then(formatSearchResult) | |
} | |
} | |
diff --git a/server/router/user.spec.js b/server/router/user.spec.js | |
index 750f9b21..66fed72a 100644 | |
--- a/server/router/user.spec.js | |
+++ b/server/router/user.spec.js | |
@@ -170,11 +170,10 @@ describe('User bookmarks endpoints', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual({ delete: true }) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.collection.event', [ | |
- 'collection_event:delete_bookmark' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.collection.event', | |
+ ['collection_event:delete_bookmark'] | |
+ ) | |
}) | |
}) | |
@@ -191,11 +190,10 @@ describe('User bookmarks endpoints', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual({ put: true }) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.collection.event', [ | |
- 'collection_event:create_bookmark' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.collection.event', | |
+ ['collection_event:create_bookmark'] | |
+ ) | |
}) | |
}) | |
}) | |
@@ -217,11 +215,10 @@ describe('User collections endpoint', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual({ post: true }) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.collection.event', [ | |
- 'collection_event:create_collection' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.collection.event', | |
+ ['collection_event:create_collection'] | |
+ ) | |
}) | |
}) | |
@@ -237,11 +234,10 @@ describe('User collections endpoint', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual({ post: true }) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.collection.event', [ | |
- 'collection_event:create_favorite_collection' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.collection.event', | |
+ ['collection_event:create_favorite_collection'] | |
+ ) | |
}) | |
}) | |
}) | |
@@ -265,12 +261,10 @@ describe('User cart entry endpoint', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual({ post: true }) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.cart.event', [ | |
- 'cart_event:add_to', | |
- 'signed_in_user:true' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.cart.event', | |
+ ['cart_event:add_to', 'signed_in_user:true'] | |
+ ) | |
}) | |
}) | |
@@ -281,12 +275,10 @@ describe('User cart entry endpoint', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual({ post: true }) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.cart.event', [ | |
- 'cart_event:create', | |
- 'signed_in_user:true' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.cart.event', | |
+ ['cart_event:create', 'signed_in_user:true'] | |
+ ) | |
}) | |
}) | |
@@ -298,12 +290,10 @@ describe('User cart entry endpoint', () => { | |
.then(res => { | |
expect(res.statusCode).toBe(200) | |
expect(res.body).toEqual({ put: true }) | |
- expect( | |
- mockDatadog.increment | |
- ).toBeCalledWith('market_shopfront.cart.event', [ | |
- 'cart_event:edit', | |
- 'signed_in_user:true' | |
- ]) | |
+ expect(mockDatadog.increment).toBeCalledWith( | |
+ 'market_shopfront.cart.event', | |
+ ['cart_event:edit', 'signed_in_user:true'] | |
+ ) | |
}) | |
}) | |
}) | |
diff --git a/tests/e2e/abtests/themeforestNewFilter.spec.js b/tests/e2e/abtests/themeforestNewFilter.spec.js | |
index 86e1f41d..ac2af892 100644 | |
--- a/tests/e2e/abtests/themeforestNewFilter.spec.js | |
+++ b/tests/e2e/abtests/themeforestNewFilter.spec.js | |
@@ -8,9 +8,7 @@ const themeforestRelease2ExperimentId = experiments['themeforestRelease2'] | |
describe('ThemeForest A/B tests', () => { | |
describe('new filters test', () => { | |
it('pick the default filter variant in version 2', () => { | |
- const experimentCookieKey = `experiment_${ | |
- themeforestRelease2ExperimentId | |
- }` | |
+ const experimentCookieKey = `experiment_${themeforestRelease2ExperimentId}` | |
cy.setCookie(experimentCookieKey, '0') | |
cy | |
.visitMarketWithoutSetCookie('themeforest', '/category/wordpress') | |
@@ -21,9 +19,7 @@ describe('ThemeForest A/B tests', () => { | |
}) | |
it('pick the new filter variant in version 2', () => { | |
- const experimentCookieKey = `experiment_${ | |
- themeforestRelease2ExperimentId | |
- }` | |
+ const experimentCookieKey = `experiment_${themeforestRelease2ExperimentId}` | |
cy.setCookie(experimentCookieKey, '2') | |
cy | |
.visitMarketWithoutSetCookie('themeforest', '/category/wordpress') | |
diff --git a/tests/e2e/abtests/themeforestNewFilterGA.spec.js b/tests/e2e/abtests/themeforestNewFilterGA.spec.js | |
index 7eb5e33f..289cb598 100644 | |
--- a/tests/e2e/abtests/themeforestNewFilterGA.spec.js | |
+++ b/tests/e2e/abtests/themeforestNewFilterGA.spec.js | |
@@ -11,9 +11,7 @@ describe('Google Analytics Themeforest AB testing', () => { | |
describe('on first server side page render', () => { | |
before(() => { | |
- const experimentCookieKey = `experiment_${ | |
- themeforestRelease2ExperimentId | |
- }` | |
+ const experimentCookieKey = `experiment_${themeforestRelease2ExperimentId}` | |
cy.setCookie(experimentCookieKey, '0') | |
cy.visitMarketWithoutSetCookie( | |
'themeforest', | |
@@ -35,9 +33,7 @@ describe('Google Analytics Themeforest AB testing', () => { | |
describe('on first server side page render for variant 2', () => { | |
before(() => { | |
- const experimentCookieKey = `experiment_${ | |
- themeforestRelease2ExperimentId | |
- }` | |
+ const experimentCookieKey = `experiment_${themeforestRelease2ExperimentId}` | |
cy.setCookie(experimentCookieKey, '2') | |
cy.visitMarketWithoutSetCookie( | |
'themeforest', | |
diff --git a/tests/e2e/searchSeo/seo.spec.js b/tests/e2e/searchSeo/seo.spec.js | |
index 8878dae2..a7a8dff9 100644 | |
--- a/tests/e2e/searchSeo/seo.spec.js | |
+++ b/tests/e2e/searchSeo/seo.spec.js | |
@@ -328,9 +328,9 @@ describe('SEO', () => { | |
.should( | |
'have.attr', | |
'href', | |
- `${Cypress.env('protocol')}://${site}.${Cypress.env('domain')}${ | |
- expectedPath | |
- }` | |
+ `${Cypress.env('protocol')}://${site}.${Cypress.env( | |
+ 'domain' | |
+ )}${expectedPath}` | |
) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment