Closed Bug 1309654 Opened 8 years ago Closed 9 months ago

Refactor some autocomplete tests to be more readable and self-contained

Categories

(Toolkit :: Form Manager, defect, P3)

49 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mconley, Unassigned)

References

Details

Attachments

(1 file)

test_form_autocomplete.html is an example of a test that was written before we had nice async tooling like add_task and yield, and what we've got in there is this giant switch statement with a test counter, and (at least to my eyes) it's a little hard to reason about, and it's easy for tests to influence one another.

I think it'd be better if the tests were refactored such that they're more isolated from one another so that it's easier to introduce new tests. I also think that we should use the add_task / yield / Promises mechanisms that we've introduced over the years, since I suspect this will greatly improve readability.

This work was originally done in bug 1296638, but has been split out for reviewer sanity and also to make sure that if we introduce any intermittent oranges, we can have a greater certainty of where they were introduced (either in bug 1296638 or in here during the refactor).
I rebased the patch onto the latest work in bug 1296638, but this still needs to be split up into more digestible chunks.
Priority: -- → P3
Depends on: 1780843
Depends on: 1780898
Depends on: 1781162
Depends on: 1642570
Depends on: 1782132
Severity: normal → S3

This test has been refactored recently.

Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: