diff --git a/spec/configuration.spec.js b/spec/configuration.spec.js index eafa6ce..d642c93 100644 --- a/spec/configuration.spec.js +++ b/spec/configuration.spec.js @@ -100,4 +100,16 @@ describe('different configurations', () => { }); }); + describe('Company Name', () => { + beforeEach(() => { + browser.get("/e2e/company_name.html"); + browser.sleep(300); + }); + + it('title contains the company name specified in the config', () => { + const el = element.all(by.css('[class^=intro_title]')).first(); + expect(el.getText()).toContain("Roadrunner and Coyote Enterprises"); + }); + }); + }); diff --git a/src/components/popup/intro/intro.jsx b/src/components/popup/intro/intro.jsx index f20ed50..e9936f3 100644 --- a/src/components/popup/intro/intro.jsx +++ b/src/components/popup/intro/intro.jsx @@ -40,7 +40,9 @@ export default class Intro extends Component { }
Thanks for visiting - + {config && config.companyName && + {config.companyName} + }
Ads help us run this site. When you use our site selected companies may access and use information on your device for various purposes including to serve relevant ads or personalised content. diff --git a/src/components/popup/intro/introV2.jsx b/src/components/popup/intro/introV2.jsx index 0735247..861a694 100644 --- a/src/components/popup/intro/introV2.jsx +++ b/src/components/popup/intro/introV2.jsx @@ -41,7 +41,9 @@ export default class IntroV2 extends Component { }
Thanks for visiting - + {config && config.companyName && + {config.companyName} + }
diff --git a/src/e2e/company_name.html b/src/e2e/company_name.html new file mode 100644 index 0000000..f1d8352 --- /dev/null +++ b/src/e2e/company_name.html @@ -0,0 +1,61 @@ + + + + + GDPR Documentation + + + + + + Some Link +

Some Text

+ + + diff --git a/src/lib/config.js b/src/lib/config.js index aad093e..e3e9f98 100644 --- a/src/lib/config.js +++ b/src/lib/config.js @@ -1,6 +1,7 @@ import log from './log'; const metadata = require('../../metadata.json'); const defaultConfig = { + companyName: null, storePublisherData: true, customPurposeListLocation: null, storeConsentGlobally: true, diff --git a/webpack.config.babel.js b/webpack.config.babel.js index 5e618ff..119687d 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -204,6 +204,11 @@ module.exports = [ template: 'e2e/layout-thin.html', chunks: ['e2e'] }), + new HtmlWebpackPlugin({ + filename: 'e2e/company_name.html', + template: 'e2e/company_name.html', + chunks: ['e2e'] + }), // Static assets copy new CopyWebpackPlugin([ { from: './geoip.json' }