Skip to content
Snippets Groups Projects
Commit 04e3a492 authored by Dimi's avatar Dimi
Browse files

Bug 1782535 - P2. Update testcase r=sgalich, a=dsmith

parent 173b76a8
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,10 @@
"use strict";
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
var FormAutofillHandler;
add_task(async function setup() {
({ FormAutofillHandler } = ChromeUtils.import(
......@@ -480,20 +484,29 @@ const TESTCASES = [
document: `<form>
<input id="cc-number" name="cc-number">
</form>`,
sections: [
[
{
section: "",
addressType: "",
contactType: "",
fieldName: "cc-number",
},
],
],
validFieldDetails: [
{ section: "", addressType: "", contactType: "", fieldName: "cc-number" },
],
ids: ["cc-number"],
sections: AppConstants.EARLY_BETA_OR_EARLIER
? [
[
{
section: "",
addressType: "",
contactType: "",
fieldName: "cc-number",
},
],
]
: [[]],
validFieldDetails: AppConstants.EARLY_BETA_OR_EARLIER
? [
{
section: "",
addressType: "",
contactType: "",
fieldName: "cc-number",
},
]
: [],
ids: AppConstants.EARLY_BETA_OR_EARLIER ? ["cc-number"] : [],
},
{
description: "An invalid credit card form due to omitted cc-number.",
......
"use strict";
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
const TESTCASES = [
{
description: "Form containing 8 fields with autocomplete attribute.",
......@@ -93,7 +97,9 @@ const TESTCASES = [
<input id="cc-number3" maxlength="4">
</form>`,
targetElementId: "cc-number1",
expectedResult: ["cc-number1", "cc-number2", "cc-number3"],
expectedResult: AppConstants.EARLY_BETA_OR_EARLIER
? ["cc-number1", "cc-number2", "cc-number3"]
: [],
},
{
description:
......@@ -106,13 +112,9 @@ const TESTCASES = [
<input id="cc-number5" maxlength="4">
</form>`,
targetElementId: "cc-number1",
expectedResult: [
"cc-number1",
"cc-number2",
"cc-number3",
"cc-number4",
"cc-number5",
],
expectedResult: AppConstants.EARLY_BETA_OR_EARLIER
? ["cc-number1", "cc-number2", "cc-number3", "cc-number4", "cc-number5"]
: [],
},
{
description:
......@@ -126,14 +128,16 @@ const TESTCASES = [
<input id="cc-exp-year">
</form>`,
targetElementId: "cc-number1",
expectedResult: [
"cc-number1",
"cc-number2",
"cc-number3",
"cc-name",
"cc-exp-month",
"cc-exp-year",
],
expectedResult: AppConstants.EARLY_BETA_OR_EARLIER
? [
"cc-number1",
"cc-number2",
"cc-number3",
"cc-name",
"cc-exp-month",
"cc-exp-year",
]
: ["cc-number3", "cc-name", "cc-exp-month", "cc-exp-year"],
},
{
description:
......@@ -149,16 +153,18 @@ const TESTCASES = [
<input id="cc-exp-year">
</form>`,
targetElementId: "cc-number1",
expectedResult: [
"cc-number1",
"cc-number2",
"cc-number3",
"cc-number4",
"cc-number5",
"cc-name",
"cc-exp-month",
"cc-exp-year",
],
expectedResult: AppConstants.EARLY_BETA_OR_EARLIER
? [
"cc-number1",
"cc-number2",
"cc-number3",
"cc-number4",
"cc-number5",
"cc-name",
"cc-exp-month",
"cc-exp-year",
]
: ["cc-number5", "cc-name", "cc-exp-month", "cc-exp-year"],
},
];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment