[Testing] Test API calls for tabs

RESOLVED WONTFIX

Status

()

Toolkit
WebExtensions: Untriaged
RESOLVED WONTFIX
2 years ago
2 years ago

People

(Reporter: krupa, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

2 years ago
description:
This marionette test ensures that some of the API functions associated with Tabs using the test webextension: Tabs Tabs Tabs

API:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs

test webextension: 
https://addons-dev.allizom.org/en-US/firefox/addon/tabs-tabs-tabs/

precondition:
The test webextension is installed
Firefox is launched with a bunch of tabs open


steps to test:
a) tabs.move()
0. Click on the third tab open in the window
1. Click on the add-on icon
2. From the list of options in the menu dropdown, click on 'Move active tab to the beginning of the window'
3. Test that the active tab is now at the beginning of the window
4. From the add-on menu dropdown, click on 'Move active tab to the end of the window'
5. Test that the active tab is now at the end of the window

b)tabs.duplicate()
1. Pick a tab 
2. From the add-on menu dropdown, click on 'Duplicate active tab'
3. Test that there is a duplicate tab 

c) tabs.reload()
1. Pick a tab
2. From the add-on menu dropdown, click on 'Reload active tab'
3. Test that the active tab gets reloaded

d) tabs.remove()
1. Pick a tab
2. From the add-on menu dropdown, click on 'Remove active tab'
3. Test that the active tab gets removed.
(Reporter)

Updated

2 years ago
Blocks: 1252966
I would suggest that these cases are already covered by the unit tests, named browser_ext_tabs_* and found here:

https://dxr.mozilla.org/mozilla-central/source/browser/components/extensions/test/browser

I do think there's a potential that authors may want to write integration tests for their webextensions, and such tests would most likely use the Firefox UI test harness. This has previously been possible using Mozmill, however historically there hasn't been much interest in it.

If we still think there's value in additional coverage, please feel free to reopen this bug and share your reasons.
Assignee: jdorlus → nobody
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.