Closed
Bug 1776876
Opened 2 years ago
Closed 2 years ago
Make the use of `setTimeout` more clear in formautofill testcase
Categories
(Toolkit :: Form Autofill, task, P3)
Toolkit
Form Autofill
Tracking
()
RESOLVED
FIXED
104 Branch
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: dimi, Assigned: janikaneuberger)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Some refactoring work we can do to make using setTimeout
in formautofill testcase more explicit
- When a setTimeout is needed in the testcase, we can add a utility function (ex. ensureNoAutocompletePopup to make the usage more clear
- We don't use
setTimeout
inbrowser_first_time_use_doorhanger.js
, soeslint-disable mozilla/no-arbitrary-setTimeout
can be removed from browser_first_time_use_doorhanger.js
Reporter | ||
Updated•2 years ago
|
Assignee: nobody → jneuberger
Status: NEW → ASSIGNED
Reporter | ||
Updated•2 years ago
|
Keywords: good-first-bug
Summary: Remove eslint-disable mozilla/no-arbitrary-setTimeout from browser_first_time_use_doorhanger.js → Make the use of `setTimeout` more clear in formautofill testcase
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Attachment #9283371 -
Attachment description: Bug 1776876 - Relocate the method call of setTimeout from browser_submission_in_private_mode.js to the method ensureNoProfileSaved(browser) in head.js r=dimi! → Bug 1776876 - Relocate the method call of setTimeout from browser_submission_in_private_mode.js to the method ensureNoProfileSaved(browser) in head.js
Updated•2 years ago
|
Attachment #9283371 -
Attachment description: Bug 1776876 - Relocate the method call of setTimeout from browser_submission_in_private_mode.js to the method ensureNoProfileSaved(browser) in head.js → WIP: Bug 1776876 - Make the use of setTimeout clearer and relocate it to head.js
Assignee | ||
Comment 2•2 years ago
|
||
The use of setTimeout in browser_editCreditCardDialog.js could be refactored but is a workaround for Bug 1700685 anyway. Refactoring might be unnecessary here?
// This test used to rely on the implied initial timer of
// TestUtils.waitForCondition. See bug 1700685.
// eslint-disable-next-line mozilla/no-arbitrary-setTimeout
await new Promise(resolve => setTimeout(resolve, 10));
await TestUtils.waitForCondition(
() => labelEl.textContent,
"Wait for label to be populated by the mutation observer",
10
);
Reporter | ||
Comment 3•2 years ago
|
||
(In reply to Janika Neuberger (:jneuberger) from comment #2)
The use of setTimeout in browser_editCreditCardDialog.js could be refactored but is a workaround for Bug 1700685 anyway. Refactoring might be unnecessary here?
I guess you mean browser_editAddressDialog.js? If yes, then yes, I agree refactoring is unnecessary.
Updated•2 years ago
|
Attachment #9283371 -
Attachment description: WIP: Bug 1776876 - Make the use of setTimeout clearer and relocate it to head.js → Bug 1776876 - Make the use of setTimeout clearer and relocate it to head.js
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/493e6cb4ba70 Make the use of setTimeout clearer and relocate it to head.js r=dimi
Comment 5•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox104:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•