The default bug view has changed. See this FAQ.

Tabs in Attachments pane in preferences dialog don't persist last used tab causing Permanent Orange | test-attachments-pane.js | test_persist_tabs

RESOLVED FIXED in Thunderbird 13.0

Status

Thunderbird
Preferences
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mconley, Assigned: mconley)

Tracking

Trunk
Thunderbird 13.0
x86
All

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

STR:

1)  Open up the Preferences dialog, and switch to the Attachments pane.
2)  The "Outgoing" tab should be selected by default
3)  Switch to the "Incoming" tab
4)  Close the Preferences dialog
5)  Re-open the Preferences dialog

What happens?

The "Outgoing" tab is selected in the Attachments pane.

What's expected?

Since the last tab we were on was the "Incoming" tab, we should go there.

This bug is showing up as an orange on comm-central as the following error:

SUMMARY-UNEXPECTED-FAIL | test-attachments-pane.js | test-attachments-pane.js::test_persist_tabs
  EXCEPTION: The first tab should have been selected: '0' != '1'.
    at: test-folder-display-helpers.js line 2855
       assert_true(false,"The first tab should have been selected: '0' != '1'.") test-folder-display-helpers.js 2855
       assert_equals(0,1,"The first tab should have been selected") test-folder-display-helpers.js 2842
            test-attachments-pane.js 42
       waitForPaneLoad([object Object]) test-pref-window-helpers.js 93
            frame.js 552
       WindowWatcher_notify([object XPCWrappedNative_NoHelper]) test-window-helpers.js 365
  EXCEPTION: The first tab selection should have been persisted: '0' != '1'.
    at: test-folder-display-helpers.js line 2855
       assert_true(false,"The first tab selection should have been persisted: '0' != '1'.") test-folder-display-helpers.js 2855
       assert_equals(0,1,"The first tab selection should have been persisted") test-folder-display-helpers.js 2842
            test-attachments-pane.js 66
       waitForPaneLoad([object Object]) test-pref-window-helpers.js 93
            frame.js 552
       WindowWatcher_notify([object XPCWrappedNative_NoHelper]) test-window-helpers.js 365
SUMMARY-PASS | test-attachments-pane.js::teardownModule
Created attachment 605492 [details] [diff] [review]
Patch v1

It looks like when retrieving the preference for which tab to display, we were treating the value 0 (as in tab index 0) as if the user had never viewed the tabs before.  This caused us to switch to the default.
Assignee: nobody → mconley
I've also updated the tests to account for the fact that we default in the "Outgoing" tab.
Comment on attachment 605492 [details] [diff] [review]
Patch v1

Sorry to direct so many reviews at you today, David!

This causes the tests to pass for me locally.  Manual testing shows that the tabs are indeed persisting.
Attachment #605492 - Flags: review?(dbienvenu)

Updated

5 years ago
Attachment #605492 - Flags: review?(dbienvenu) → review+
Committed to comm-central as http://hg.mozilla.org/comm-central/rev/a4020ebe7917
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 13.0
You need to log in before you can comment on or make changes to this bug.