Closed Bug 1586979 Opened 4 months ago Closed 4 months ago

Improve browser_eventDialogModificationPrompt.js

Categories

(Calendar :: Dialogs, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: darktrojan, Assigned: darktrojan)

Details

Attachments

(1 file)

Since moving to mochitest this test is failing catastrophically when it fails. I think the reason is the strange way it detects a prompt to save and dismisses it, which is the whole point of the test.

I've changed the test to listen for any save prompt, and fail immediately if it appears. I also made it wait for 2 seconds when closing the event dialog, which isn't strictly necessary but might help.

Note this doesn't solve the "couldn't click on the all-day checkbox" problem that is affecting this and some other tests, but it does stop this test from timing out and killing the rest of the directory's tests.

https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&group_state=expanded&revision=e06c5c1a10e9076f5f69911e47d4c7f5373d3aaa

Attachment #9099495 - Flags: review?(paul)
Comment on attachment 9099495 [details] [diff] [review]
1586979-modification-prompt-test-1.diff

Review of attachment 9099495 [details] [diff] [review]:
-----------------------------------------------------------------

Changes look reasonable, and test passes locally for me.  r+ with one little nit addressed.

::: calendar/test/browser/eventDialog/browser_eventDialogModificationPrompt.js
@@ +115,2 @@
>        event.keypress(null, "VK_ESCAPE", {});
> +      // Wait to see if the prompt appears.

Just for good measure:  "Wait to see if the save event prompt appears."
Comment on attachment 9099495 [details] [diff] [review]
1586979-modification-prompt-test-1.diff

Review of attachment 9099495 [details] [diff] [review]:
-----------------------------------------------------------------

Forgot the +.
Attachment #9099495 - Flags: review?(paul) → review+

Note to self: address the review comments before checking in.

(I bet I still forget.)

Keywords: checkin-needed

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/55f15b85ce9b
Improve browser_eventDialogModificationPrompt.js. r=pmorris DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 71
You need to log in before you can comment on or make changes to this bug.