Open Bug 755658 Opened 12 years ago Updated 2 years ago

create a test that checks for proper operation of updating of filter target folder in case of folder move (rename)

Categories

(MailNews Core :: Filters, defect)

defect

Tracking

(Not tracked)

People

(Reporter: aceman, Unassigned)

References

(Depends on 1 open bug)

Details

The test should cover the functions nsMsgFilterList::MatchOrChangeFilterTarget() and nsMsgDBFolder::MatchOrChangeFilterDestination().

These 2 functions were touched by me in bug 707306, bug 735940, bug 737946, bug 742155 and breakage can happen (and already has :(). Problems in these functions can cause dataloss (corrupting filter definitions).

What I think the test should do:
1. have folders A, B, C, B/D, B/E.
2. have a filter F1 to have a copy action that points to B.
3. have a filter F2 to have a copy action that points to B/D, a a copy action that points to B, a move action that points to B/E (3 actions).
4. have a filter F3 to have a copy action that points to C.
5. now rename (move) folder B/D to be C/D.
6. check all the filters are updated (or untouched) correctly.

I do not know if this should be a xpcshell or a mozmill test.
Can anybody help with this?
Flags: in-testsuite?
probably mozmill, since there's ui involved. You might be able to fake out the prompt, but mozmill is most likely easier.
The filters code is unfamiliar with me, but my rules of thumb are:

* If the logic resides in the UI layer, then you should be using Mozmill.
* If the logic resides in the back-end, but the back-end spawns windows or prompts, you'll likely have an easier time writing a Mozmill test.
Thanks, I was not thinking of testing the prompt (I wanted to ignore it) so I considered this pure backend.

But yes, testing the prompt (from bug 737946) would be a nice addition too (as it is broken till now).

So mozmill would be nice, but needs to go all the way from creating folders, then filters, then move folder, then the prompt and then checking the filters. Quite involved.
is account renames (bug 706826) covered in this bug?
Kent has a suggestion different filter test issue in  bug 1070646 comment 5
See Also: → 1070646
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.