Closed Bug 1392167 Opened 7 years ago Closed 7 years ago

[Onboarding] have getCurrentActiveTour() check states of all DOM elements

Categories

(Firefox :: New Tab Page, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: timdream, Assigned: timdream)

References

Details

Attachments

(1 file)

I read bug 1383505 and found what Fisher asked was quiet trivial. In fact, I've done with in my lunch time. Let me flag both of you for review.
Comment on attachment 8899330 [details]
Bug 1392167 - Have getCurrentActiveTour() check states of all DOM elements.

https://reviewboard.mozilla.org/r/170548/#review175794

Thanks for the wrok. The test is even neater.

::: browser/extensions/onboarding/test/browser/head.js:186
(Diff revision 1)
>      for (let item of items) {
>        if (item.classList.contains("onboarding-active")) {
> +        if (!activeNavItemId) {
> -        activeNavItemId = item.id;
> +          activeNavItemId = item.id;
> -        break;
> +        } else {
> +          ok(false, "There are more than one item marked as active.");

Thank you for doing this check as well.
Attachment #8899330 - Flags: review?(fliu) → review+
Comment on attachment 8899330 [details]
Bug 1392167 - Have getCurrentActiveTour() check states of all DOM elements.

https://reviewboard.mozilla.org/r/170548/#review176130

::: browser/extensions/onboarding/test/browser/head.js:186
(Diff revision 1)
>      for (let item of items) {
>        if (item.classList.contains("onboarding-active")) {
> +        if (!activeNavItemId) {
> -        activeNavItemId = item.id;
> +          activeNavItemId = item.id;
> -        break;
> +        } else {
> +          ok(false, "There are more than one item marked as active.");

thanks, that nicely validate the non-active item
Attachment #8899330 - Flags: review?(gasolin) → review+
Pushed by timdream@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/829183c09b2c
Have getCurrentActiveTour() check states of all DOM elements. r=Fischer,gasolin
https://hg.mozilla.org/mozilla-central/rev/829183c09b2c
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: