зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1579949
- Add text-promo designs, after-login triplets and bug fixes to New Tab Page r=dmose
Differential Revision: https://phabricator.services.mozilla.com/D45225 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2d2e31c626
Коммит
a38c7e2387
|
@ -17,7 +17,6 @@ module.exports = {
|
||||||
"jsx-a11y", // require("eslint-plugin-jsx-a11y")
|
"jsx-a11y", // require("eslint-plugin-jsx-a11y")
|
||||||
// Temporarily disabled since they aren't vendored into in mozilla central yet
|
// Temporarily disabled since they aren't vendored into in mozilla central yet
|
||||||
// "react-hooks", // require("react-hooks")
|
// "react-hooks", // require("react-hooks")
|
||||||
"fetch-options", // require("eslint-plugin-fetch-options")
|
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"react": {
|
"react": {
|
||||||
|
@ -27,7 +26,7 @@ module.exports = {
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:jsx-a11y/recommended", // require("eslint-plugin-jsx-a11y")
|
"plugin:jsx-a11y/recommended", // require("eslint-plugin-jsx-a11y")
|
||||||
"plugin:mozilla/recommended", // require("eslint-plugin-mozilla")
|
"plugin:mozilla/recommended", // require("eslint-plugin-mozilla") require("eslint-plugin-fetch-options") require("eslint-plugin-html") require("eslint-plugin-no-unsanitized")
|
||||||
"plugin:mozilla/browser-test",
|
"plugin:mozilla/browser-test",
|
||||||
"plugin:mozilla/mochitest-test",
|
"plugin:mozilla/mochitest-test",
|
||||||
"plugin:mozilla/xpcshell-test",
|
"plugin:mozilla/xpcshell-test",
|
||||||
|
|
|
@ -19,6 +19,11 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Attribute used for different groups of messages from the same provider"
|
"description": "Attribute used for different groups of messages from the same provider"
|
||||||
},
|
},
|
||||||
|
"layout": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Attribute used for different groups of messages from the same provider",
|
||||||
|
"enum": ["message_and_animation", "icon_and_message", "addon_recommendation"]
|
||||||
|
},
|
||||||
"bucket_id": {
|
"bucket_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "A bucket identifier for the addon. This is used in order to anonymize telemetry for history-sensitive targeting."
|
"description": "A bucket identifier for the addon. This is used in order to anonymize telemetry for history-sensitive targeting."
|
||||||
|
@ -102,6 +107,13 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"icon": {
|
||||||
|
"description": "The icon displayed in the pop-over. Should be 64x64px and png/svg.",
|
||||||
|
"allOf": [
|
||||||
|
{"$ref": "#/definitions/linkUrl"},
|
||||||
|
{"description": "Icon associated with the message"}
|
||||||
|
]
|
||||||
|
},
|
||||||
"addon": {
|
"addon": {
|
||||||
"description": "Addon information including AMO URL.",
|
"description": "Addon information including AMO URL.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -163,6 +163,7 @@ export class _DiscoveryStreamBase extends React.PureComponent {
|
||||||
}}
|
}}
|
||||||
dispatch={this.props.dispatch}
|
dispatch={this.props.dispatch}
|
||||||
shouldSendImpressionStats={true}
|
shouldSendImpressionStats={true}
|
||||||
|
extraClasses={`ds-dismiss-ds-text-promo`}
|
||||||
>
|
>
|
||||||
<DSTextPromo
|
<DSTextPromo
|
||||||
dispatch={this.props.dispatch}
|
dispatch={this.props.dispatch}
|
||||||
|
|
|
@ -56,10 +56,10 @@ export class DSDismiss extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let className = "ds-dismiss";
|
let className = `ds-dismiss
|
||||||
if (this.state.hovering) {
|
${this.state.hovering ? ` hovering` : ``}
|
||||||
className += " hovering";
|
${this.props.extraClasses ? ` ${this.props.extraClasses}` : ``}`;
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<div className={className}>
|
<div className={className}>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
|
|
|
@ -1,19 +1,27 @@
|
||||||
|
.ds-dismiss-ds-text-promo {
|
||||||
|
width: 744px;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
.ds-dismiss-button {
|
||||||
|
margin: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ds-text-promo {
|
.ds-text-promo {
|
||||||
display: flex;
|
display: flex;
|
||||||
max-width: 744px;
|
max-width: 640px;
|
||||||
margin: 16px auto;
|
margin: 18px 24px;
|
||||||
|
|
||||||
picture {
|
.ds-image {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0 12px 0 0;
|
margin: 4px 12px 0 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
margin: -4.5px 0 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
|
|
|
@ -3024,19 +3024,24 @@ main {
|
||||||
to {
|
to {
|
||||||
transform: rotate(360deg); } }
|
transform: rotate(360deg); } }
|
||||||
|
|
||||||
|
.ds-dismiss-ds-text-promo {
|
||||||
|
width: 744px;
|
||||||
|
margin: auto; }
|
||||||
|
.ds-dismiss-ds-text-promo .ds-dismiss-button {
|
||||||
|
margin: 16px; }
|
||||||
|
|
||||||
.ds-text-promo {
|
.ds-text-promo {
|
||||||
display: flex;
|
display: flex;
|
||||||
max-width: 744px;
|
max-width: 640px;
|
||||||
margin: 16px auto; }
|
margin: 18px 24px; }
|
||||||
.ds-text-promo picture {
|
.ds-text-promo .ds-image {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0 12px 0 0;
|
margin: 4px 12px 0 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
flex-shrink: 0; }
|
flex-shrink: 0; }
|
||||||
.ds-text-promo .text {
|
.ds-text-promo .text {
|
||||||
line-height: 24px;
|
line-height: 24px; }
|
||||||
margin: -4.5px 0 0; }
|
|
||||||
.ds-text-promo h3 {
|
.ds-text-promo h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
|
@ -3027,19 +3027,24 @@ main {
|
||||||
to {
|
to {
|
||||||
transform: rotate(360deg); } }
|
transform: rotate(360deg); } }
|
||||||
|
|
||||||
|
.ds-dismiss-ds-text-promo {
|
||||||
|
width: 744px;
|
||||||
|
margin: auto; }
|
||||||
|
.ds-dismiss-ds-text-promo .ds-dismiss-button {
|
||||||
|
margin: 16px; }
|
||||||
|
|
||||||
.ds-text-promo {
|
.ds-text-promo {
|
||||||
display: flex;
|
display: flex;
|
||||||
max-width: 744px;
|
max-width: 640px;
|
||||||
margin: 16px auto; }
|
margin: 18px 24px; }
|
||||||
.ds-text-promo picture {
|
.ds-text-promo .ds-image {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0 12px 0 0;
|
margin: 4px 12px 0 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
flex-shrink: 0; }
|
flex-shrink: 0; }
|
||||||
.ds-text-promo .text {
|
.ds-text-promo .text {
|
||||||
line-height: 24px;
|
line-height: 24px; }
|
||||||
margin: -4.5px 0 0; }
|
|
||||||
.ds-text-promo h3 {
|
.ds-text-promo h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
|
@ -3024,19 +3024,24 @@ main {
|
||||||
to {
|
to {
|
||||||
transform: rotate(360deg); } }
|
transform: rotate(360deg); } }
|
||||||
|
|
||||||
|
.ds-dismiss-ds-text-promo {
|
||||||
|
width: 744px;
|
||||||
|
margin: auto; }
|
||||||
|
.ds-dismiss-ds-text-promo .ds-dismiss-button {
|
||||||
|
margin: 16px; }
|
||||||
|
|
||||||
.ds-text-promo {
|
.ds-text-promo {
|
||||||
display: flex;
|
display: flex;
|
||||||
max-width: 744px;
|
max-width: 640px;
|
||||||
margin: 16px auto; }
|
margin: 18px 24px; }
|
||||||
.ds-text-promo picture {
|
.ds-text-promo .ds-image {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0 12px 0 0;
|
margin: 4px 12px 0 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
flex-shrink: 0; }
|
flex-shrink: 0; }
|
||||||
.ds-text-promo .text {
|
.ds-text-promo .text {
|
||||||
line-height: 24px;
|
line-height: 24px; }
|
||||||
margin: -4.5px 0 0; }
|
|
||||||
.ds-text-promo h3 {
|
.ds-text-promo h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
|
@ -8824,12 +8824,9 @@ class DSDismiss_DSDismiss extends external_React_default.a.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let className = "ds-dismiss";
|
let className = `ds-dismiss
|
||||||
|
${this.state.hovering ? ` hovering` : ``}
|
||||||
if (this.state.hovering) {
|
${this.props.extraClasses ? ` ${this.props.extraClasses}` : ``}`;
|
||||||
className += " hovering";
|
|
||||||
}
|
|
||||||
|
|
||||||
return external_React_default.a.createElement("div", {
|
return external_React_default.a.createElement("div", {
|
||||||
className: className
|
className: className
|
||||||
}, this.props.children, external_React_default.a.createElement("button", {
|
}, this.props.children, external_React_default.a.createElement("button", {
|
||||||
|
@ -9916,7 +9913,8 @@ class DiscoveryStreamBase_DiscoveryStreamBase extends external_React_default.a.P
|
||||||
shim: spoc.shim
|
shim: spoc.shim
|
||||||
},
|
},
|
||||||
dispatch: this.props.dispatch,
|
dispatch: this.props.dispatch,
|
||||||
shouldSendImpressionStats: true
|
shouldSendImpressionStats: true,
|
||||||
|
extraClasses: `ds-dismiss-ds-text-promo`
|
||||||
}, external_React_default.a.createElement(DSTextPromo_DSTextPromo, {
|
}, external_React_default.a.createElement(DSTextPromo_DSTextPromo, {
|
||||||
dispatch: this.props.dispatch,
|
dispatch: this.props.dispatch,
|
||||||
image: image_src,
|
image: image_src,
|
||||||
|
|
|
@ -514,11 +514,13 @@ class _ASRouter {
|
||||||
if (TARGETING_PREFERENCES.includes(prefName)) {
|
if (TARGETING_PREFERENCES.includes(prefName)) {
|
||||||
// Notify all tabs of messages that have become invalid after pref change
|
// Notify all tabs of messages that have become invalid after pref change
|
||||||
const invalidMessages = [];
|
const invalidMessages = [];
|
||||||
|
const context = this._getMessagesContext();
|
||||||
|
|
||||||
for (const msg of this._getUnblockedMessages()) {
|
for (const msg of this._getUnblockedMessages()) {
|
||||||
if (!msg.targeting) {
|
if (!msg.targeting) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const isMatch = await ASRouterTargeting.isMatch(msg.targeting);
|
const isMatch = await ASRouterTargeting.isMatch(msg.targeting, context);
|
||||||
if (!isMatch) {
|
if (!isMatch) {
|
||||||
invalidMessages.push(msg.id);
|
invalidMessages.push(msg.id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -681,9 +681,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"acorn-jsx": {
|
"acorn-jsx": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz",
|
||||||
"integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==",
|
"integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"after": {
|
"after": {
|
||||||
|
@ -1120,17 +1120,28 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"babel-eslint": {
|
"babel-eslint": {
|
||||||
"version": "10.0.1",
|
"version": "10.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.3.tgz",
|
||||||
"integrity": "sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==",
|
"integrity": "sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.0.0",
|
"@babel/code-frame": "^7.0.0",
|
||||||
"@babel/parser": "^7.0.0",
|
"@babel/parser": "^7.0.0",
|
||||||
"@babel/traverse": "^7.0.0",
|
"@babel/traverse": "^7.0.0",
|
||||||
"@babel/types": "^7.0.0",
|
"@babel/types": "^7.0.0",
|
||||||
"eslint-scope": "3.7.1",
|
"eslint-visitor-keys": "^1.0.0",
|
||||||
"eslint-visitor-keys": "^1.0.0"
|
"resolve": "^1.12.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"resolve": {
|
||||||
|
"version": "1.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
|
||||||
|
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-parse": "^1.0.6"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"babel-generator": {
|
"babel-generator": {
|
||||||
|
@ -2943,58 +2954,100 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint": {
|
"eslint": {
|
||||||
"version": "5.16.0",
|
"version": "6.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-6.2.2.tgz",
|
||||||
"integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==",
|
"integrity": "sha512-mf0elOkxHbdyGX1IJEUsNBzCDdyoUgljF3rRlgfyYh0pwGnreLc0jjD6ZuleOibjmnUWZLY2eXwSooeOgGJ2jw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.0.0",
|
"@babel/code-frame": "^7.0.0",
|
||||||
"ajv": "^6.9.1",
|
"ajv": "^6.10.0",
|
||||||
"chalk": "^2.1.0",
|
"chalk": "^2.1.0",
|
||||||
"cross-spawn": "^6.0.5",
|
"cross-spawn": "^6.0.5",
|
||||||
"debug": "^4.0.1",
|
"debug": "^4.0.1",
|
||||||
"doctrine": "^3.0.0",
|
"doctrine": "^3.0.0",
|
||||||
"eslint-scope": "^4.0.3",
|
"eslint-scope": "^5.0.0",
|
||||||
"eslint-utils": "^1.3.1",
|
"eslint-utils": "^1.4.2",
|
||||||
"eslint-visitor-keys": "^1.0.0",
|
"eslint-visitor-keys": "^1.1.0",
|
||||||
"espree": "^5.0.1",
|
"espree": "^6.1.1",
|
||||||
"esquery": "^1.0.1",
|
"esquery": "^1.0.1",
|
||||||
"esutils": "^2.0.2",
|
"esutils": "^2.0.2",
|
||||||
"file-entry-cache": "^5.0.1",
|
"file-entry-cache": "^5.0.1",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"glob": "^7.1.2",
|
"glob-parent": "^5.0.0",
|
||||||
"globals": "^11.7.0",
|
"globals": "^11.7.0",
|
||||||
"ignore": "^4.0.6",
|
"ignore": "^4.0.6",
|
||||||
"import-fresh": "^3.0.0",
|
"import-fresh": "^3.0.0",
|
||||||
"imurmurhash": "^0.1.4",
|
"imurmurhash": "^0.1.4",
|
||||||
"inquirer": "^6.2.2",
|
"inquirer": "^6.4.1",
|
||||||
"js-yaml": "^3.13.0",
|
"is-glob": "^4.0.0",
|
||||||
|
"js-yaml": "^3.13.1",
|
||||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||||
"levn": "^0.3.0",
|
"levn": "^0.3.0",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.14",
|
||||||
"minimatch": "^3.0.4",
|
"minimatch": "^3.0.4",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"natural-compare": "^1.4.0",
|
"natural-compare": "^1.4.0",
|
||||||
"optionator": "^0.8.2",
|
"optionator": "^0.8.2",
|
||||||
"path-is-inside": "^1.0.2",
|
|
||||||
"progress": "^2.0.0",
|
"progress": "^2.0.0",
|
||||||
"regexpp": "^2.0.1",
|
"regexpp": "^2.0.1",
|
||||||
"semver": "^5.5.1",
|
"semver": "^6.1.2",
|
||||||
"strip-ansi": "^4.0.0",
|
"strip-ansi": "^5.2.0",
|
||||||
"strip-json-comments": "^2.0.1",
|
"strip-json-comments": "^3.0.1",
|
||||||
"table": "^5.2.3",
|
"table": "^5.2.3",
|
||||||
"text-table": "^0.2.0"
|
"text-table": "^0.2.0",
|
||||||
|
"v8-compile-cache": "^2.0.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"eslint-scope": {
|
"ansi-regex": {
|
||||||
"version": "4.0.3",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
||||||
"integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
|
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"glob-parent": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"esrecurse": "^4.1.0",
|
"is-glob": "^4.0.1"
|
||||||
"estraverse": "^4.1.1"
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"is-extglob": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-glob": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-extglob": "^2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"semver": {
|
||||||
|
"version": "6.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||||
|
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^4.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-json-comments": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",
|
||||||
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3119,6 +3172,15 @@
|
||||||
"integrity": "sha512-ZMxrccsOAZ7uMQ4nMvPJLqLg6oyLF96YOEwTKWAIbDHpwWUp1raXALZom8ikKucaEnhqWSRuBWI8jBXveFwkJg==",
|
"integrity": "sha512-ZMxrccsOAZ7uMQ4nMvPJLqLg6oyLF96YOEwTKWAIbDHpwWUp1raXALZom8ikKucaEnhqWSRuBWI8jBXveFwkJg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"eslint-plugin-html": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-PQcGippOHS+HTbQCStmH5MY1BF2MaU8qW/+Mvo/8xTa/ioeMXdSP+IiaBw2+nh0KEMfYQKuTz1Zo+vHynjwhbg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"htmlparser2": "^3.10.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-plugin-import": {
|
"eslint-plugin-import": {
|
||||||
"version": "2.17.3",
|
"version": "2.17.3",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.17.3.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.17.3.tgz",
|
||||||
|
@ -3191,9 +3253,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-mozilla": {
|
"eslint-plugin-mozilla": {
|
||||||
"version": "1.3.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-mozilla/-/eslint-plugin-mozilla-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-mozilla/-/eslint-plugin-mozilla-2.1.0.tgz",
|
||||||
"integrity": "sha512-sCwDShn7zajPVUYc3SEd02ZjUpMiSojl2WmJjLPk6mlErZ400DuGidPPpB/M5lpb8FEHtxP/EiOQCAzsGY7KBA==",
|
"integrity": "sha512-Fsu2kq3FZKgreXTew0UjArmnbGWnEnkgn21sojpuJ0GwUwI6T0Ee9MrMIeXiC0LhX6AkBtK+QkqQViw4sEgBZw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"htmlparser2": "3.10.1",
|
"htmlparser2": "3.10.1",
|
||||||
|
@ -3267,9 +3329,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"eslint-scope": {
|
"eslint-scope": {
|
||||||
"version": "3.7.1",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz",
|
||||||
"integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
|
"integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"esrecurse": "^4.1.0",
|
"esrecurse": "^4.1.0",
|
||||||
|
@ -3277,26 +3339,37 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-utils": {
|
"eslint-utils": {
|
||||||
"version": "1.3.1",
|
"version": "1.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz",
|
||||||
"integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==",
|
"integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"eslint-visitor-keys": "^1.0.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"eslint-visitor-keys": {
|
"eslint-visitor-keys": {
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz",
|
||||||
"integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==",
|
"integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"espree": {
|
"espree": {
|
||||||
"version": "5.0.1",
|
"version": "6.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz",
|
||||||
"integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==",
|
"integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"acorn": "^6.0.7",
|
"acorn": "^7.0.0",
|
||||||
"acorn-jsx": "^5.0.0",
|
"acorn-jsx": "^5.0.2",
|
||||||
"eslint-visitor-keys": "^1.0.0"
|
"eslint-visitor-keys": "^1.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"acorn": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"esprima": {
|
"esprima": {
|
||||||
|
@ -3443,9 +3516,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"external-editor": {
|
"external-editor": {
|
||||||
"version": "3.0.3",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
|
||||||
"integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==",
|
"integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chardet": "^0.7.0",
|
"chardet": "^0.7.0",
|
||||||
|
@ -5316,9 +5389,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"import-fresh": {
|
"import-fresh": {
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz",
|
||||||
"integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==",
|
"integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"parent-module": "^1.0.0",
|
"parent-module": "^1.0.0",
|
||||||
|
@ -5391,9 +5464,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"inquirer": {
|
"inquirer": {
|
||||||
"version": "6.3.1",
|
"version": "6.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz",
|
||||||
"integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==",
|
"integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-escapes": "^3.2.0",
|
"ansi-escapes": "^3.2.0",
|
||||||
|
@ -5402,7 +5475,7 @@
|
||||||
"cli-width": "^2.0.0",
|
"cli-width": "^2.0.0",
|
||||||
"external-editor": "^3.0.3",
|
"external-editor": "^3.0.3",
|
||||||
"figures": "^2.0.0",
|
"figures": "^2.0.0",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.12",
|
||||||
"mute-stream": "0.0.7",
|
"mute-stream": "0.0.7",
|
||||||
"run-async": "^2.2.0",
|
"run-async": "^2.2.0",
|
||||||
"rxjs": "^6.4.0",
|
"rxjs": "^6.4.0",
|
||||||
|
@ -9367,9 +9440,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"rxjs": {
|
"rxjs": {
|
||||||
"version": "6.5.1",
|
"version": "6.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||||
"integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
|
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
|
@ -11149,17 +11222,29 @@
|
||||||
"integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ=="
|
"integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ=="
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
"version": "5.2.3",
|
"version": "5.4.6",
|
||||||
"resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
|
||||||
"integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==",
|
"integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ajv": "^6.9.1",
|
"ajv": "^6.10.2",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.14",
|
||||||
"slice-ansi": "^2.1.0",
|
"slice-ansi": "^2.1.0",
|
||||||
"string-width": "^3.0.0"
|
"string-width": "^3.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"ajv": {
|
||||||
|
"version": "6.10.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
|
||||||
|
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fast-deep-equal": "^2.0.1",
|
||||||
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
|
"json-schema-traverse": "^0.4.1",
|
||||||
|
"uri-js": "^4.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"@babel/plugin-proposal-async-generator-functions": "7.2.0",
|
"@babel/plugin-proposal-async-generator-functions": "7.2.0",
|
||||||
"@babel/preset-react": "7.0.0",
|
"@babel/preset-react": "7.0.0",
|
||||||
"acorn": "6.1.1",
|
"acorn": "6.1.1",
|
||||||
"babel-eslint": "10.0.1",
|
"babel-eslint": "10.0.3",
|
||||||
"babel-loader": "8.0.6",
|
"babel-loader": "8.0.6",
|
||||||
"babel-plugin-jsm-to-commonjs": "0.5.0",
|
"babel-plugin-jsm-to-commonjs": "0.5.0",
|
||||||
"babel-plugin-jsm-to-esmodules": "0.6.0",
|
"babel-plugin-jsm-to-esmodules": "0.6.0",
|
||||||
|
@ -30,12 +30,13 @@
|
||||||
"cpx": "1.5.0",
|
"cpx": "1.5.0",
|
||||||
"enzyme": "3.9.0",
|
"enzyme": "3.9.0",
|
||||||
"enzyme-adapter-react-16": "1.13.2",
|
"enzyme-adapter-react-16": "1.13.2",
|
||||||
"eslint": "5.16.0",
|
"eslint": "6.2.2",
|
||||||
"eslint-config-prettier": "4.2.0",
|
"eslint-config-prettier": "4.2.0",
|
||||||
"eslint-plugin-fetch-options": "0.0.5",
|
"eslint-plugin-fetch-options": "0.0.5",
|
||||||
|
"eslint-plugin-html": "6.0.0",
|
||||||
"eslint-plugin-import": "2.17.3",
|
"eslint-plugin-import": "2.17.3",
|
||||||
"eslint-plugin-jsx-a11y": "6.2.1",
|
"eslint-plugin-jsx-a11y": "6.2.1",
|
||||||
"eslint-plugin-mozilla": "1.3.0",
|
"eslint-plugin-mozilla": "2.1.0",
|
||||||
"eslint-plugin-no-unsanitized": "3.0.2",
|
"eslint-plugin-no-unsanitized": "3.0.2",
|
||||||
"eslint-plugin-prettier": "3.0.1",
|
"eslint-plugin-prettier": "3.0.1",
|
||||||
"eslint-plugin-react": "7.13.0",
|
"eslint-plugin-react": "7.13.0",
|
||||||
|
@ -134,7 +135,7 @@
|
||||||
"tddmc": "karma start karma.mc.config.js --tdd",
|
"tddmc": "karma start karma.mc.config.js --tdd",
|
||||||
"debugcoverage": "open logs/coverage/index.html",
|
"debugcoverage": "open logs/coverage/index.html",
|
||||||
"lint": "npm-run-all lint:*",
|
"lint": "npm-run-all lint:*",
|
||||||
"lint:eslint-check": "eslint --cache --print-config . | eslint-config-prettier-check",
|
"lint:eslint-check": "eslint --cache --print-config AboutNewTabService.jsm | eslint-config-prettier-check",
|
||||||
"lint:eslint": "eslint --cache --ext=.js,.jsm,.jsx .",
|
"lint:eslint": "eslint --cache --ext=.js,.jsm,.jsx .",
|
||||||
"lint:sasslint": "sass-lint -v -q",
|
"lint:sasslint": "sass-lint -v -q",
|
||||||
"test": "npm run testmc",
|
"test": "npm run testmc",
|
||||||
|
|
|
@ -11,8 +11,8 @@ const REGULAR_IDS = [
|
||||||
];
|
];
|
||||||
|
|
||||||
describe("CFRMessageProvider", () => {
|
describe("CFRMessageProvider", () => {
|
||||||
it("should have a total of 4 messages", () => {
|
it("should have a total of 5 messages", () => {
|
||||||
assert.lengthOf(messages, 4);
|
assert.lengthOf(messages, 5);
|
||||||
});
|
});
|
||||||
it("should have one message each for the three regular addons", () => {
|
it("should have one message each for the three regular addons", () => {
|
||||||
for (const id of REGULAR_IDS) {
|
for (const id of REGULAR_IDS) {
|
||||||
|
@ -31,13 +31,13 @@ describe("CFRMessageProvider", () => {
|
||||||
// Ensure that the CFR messages that are recommending an addon have this targeting.
|
// Ensure that the CFR messages that are recommending an addon have this targeting.
|
||||||
// In the future when we can do targeting based on category, this test will change.
|
// In the future when we can do targeting based on category, this test will change.
|
||||||
// See bug 1494778 and 1497653
|
// See bug 1494778 and 1497653
|
||||||
if (message.id !== "PIN_TAB") {
|
if (!message.content.layout) {
|
||||||
assert.include(message.targeting, `(xpinstallEnabled == true)`);
|
assert.include(message.targeting, `(xpinstallEnabled == true)`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
it("should restrict all messages to `en` locale for now (PIN TAB is handled separately)", () => {
|
it("should restrict all messages to `en` locale for now (PIN TAB is handled separately)", () => {
|
||||||
for (const message of messages.filter(m => m.id !== "PIN_TAB")) {
|
for (const message of messages.filter(m => !m.content.layout)) {
|
||||||
assert.include(message.targeting, `localeLanguageCode == "en"`);
|
assert.include(message.targeting, `localeLanguageCode == "en"`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -699,13 +699,13 @@ describe("CFRPageActions", () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it("should show the bullet list details", async () => {
|
it("should show the bullet list details", async () => {
|
||||||
delete fakeRecommendation.content.addon;
|
fakeRecommendation.content.layout = "message_and_animation";
|
||||||
await pageAction._showPopupOnClick();
|
await pageAction._showPopupOnClick();
|
||||||
|
|
||||||
assert.calledOnce(translateElementsStub);
|
assert.calledOnce(translateElementsStub);
|
||||||
});
|
});
|
||||||
it("should set the data-l10n-id on the list element", async () => {
|
it("should set the data-l10n-id on the list element", async () => {
|
||||||
delete fakeRecommendation.content.addon;
|
fakeRecommendation.content.layout = "message_and_animation";
|
||||||
await pageAction._showPopupOnClick();
|
await pageAction._showPopupOnClick();
|
||||||
|
|
||||||
assert.calledOnce(setAttributesStub);
|
assert.calledOnce(setAttributesStub);
|
||||||
|
@ -716,18 +716,18 @@ describe("CFRPageActions", () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it("should set the correct data-notification-category", async () => {
|
it("should set the correct data-notification-category", async () => {
|
||||||
delete fakeRecommendation.content.addon;
|
fakeRecommendation.content.layout = "message_and_animation";
|
||||||
await pageAction._showPopupOnClick();
|
await pageAction._showPopupOnClick();
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
elements["contextual-feature-recommendation-notification"].dataset
|
elements["contextual-feature-recommendation-notification"].dataset
|
||||||
.notificationCategory,
|
.notificationCategory,
|
||||||
fakeRecommendation.content.category
|
fakeRecommendation.content.layout
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it("should send PIN event on primary action click", async () => {
|
it("should send PIN event on primary action click", async () => {
|
||||||
|
fakeRecommendation.content.layout = "message_and_animation";
|
||||||
sandbox.stub(pageAction, "_sendTelemetry");
|
sandbox.stub(pageAction, "_sendTelemetry");
|
||||||
delete fakeRecommendation.content.addon;
|
|
||||||
await pageAction._showPopupOnClick();
|
await pageAction._showPopupOnClick();
|
||||||
|
|
||||||
const [
|
const [
|
||||||
|
|
|
@ -65,7 +65,7 @@ scripts:
|
||||||
|
|
||||||
# lint: Run eslint and sass-lint
|
# lint: Run eslint and sass-lint
|
||||||
lint:
|
lint:
|
||||||
eslint-check: eslint --cache --print-config . | eslint-config-prettier-check
|
eslint-check: eslint --cache --print-config AboutNewTabService.jsm | eslint-config-prettier-check
|
||||||
eslint: eslint --cache --ext=.js,.jsm,.jsx .
|
eslint: eslint --cache --ext=.js,.jsm,.jsx .
|
||||||
sasslint: sass-lint -v -q
|
sasslint: sass-lint -v -q
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче