add tab tests
This commit is contained in:
parent
30d6872fa8
commit
cbd8f5b928
5 changed files with 158 additions and 9 deletions
|
@ -13,6 +13,14 @@ const create = (props = {}) => {
|
|||
});
|
||||
};
|
||||
|
||||
export {
|
||||
create,
|
||||
const selectAt = (props = {}) => {
|
||||
return browser.tabs.query({ windowId: props.windowId }).then((tabs) => {
|
||||
let target = tabs[props.index];
|
||||
return browser.tabs.update(target.id, { active: true });
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
export {
|
||||
create, selectAt
|
||||
};
|
||||
|
|
Reference in a new issue