(In reply to Magnus Melin [:mkmelin] from comment #0)
A bunch of calendar tests are looking up elements by path, which makes it very easy to break them.
This bug is about removing that useage: https://searchfox.org/comm-central/rev/05df26e6ab23c89819da68ec4828591278317cc8/calendar/test/modules/CalendarUtils.jsm#88-136
For the bulk of these, the needed elements can be obtained by document.getElementById() or document.querySelector(). I suggest trying to take the one one-by-one.
When you change a test, make sure it still works. You can run e.g.
./mach test comm/calendar/test/browser/views/browser_multiweekView.js
./mach test --headless comm/calendar/test/browser/views/browser_multiweekView.js
Thanks for the direction.
I have an initial fix for just the
I was going to make this change:
- let day = lookup(`
- controller.waitFor(() => day.getNode().mDate.icalString == "20090101");
+ controller.waitFor(() =>
+ '#multiweek-view td[selected="true"] > calendar-month-day-box'
+ ).mDate.icalString == "20090101"
MULTIWEEK_VIEW was imported from
MULTIWEEK_VIEW isn't used anywhere else, I was going to drop it from
Is this the kind of approach you were expecting? A lot of the logic has been moved out of
MULTIWEEK_VIEW selection and the
lookup(...).getNode method are no longer used).
Also, do you think the selector
'#multiweek-view td[selected="true"] > calendar-month-day-box'
has the right kind of informational balance (not too verbose, but still descriptive)?