Merge pull request #533 from ueokande/qa-0.20

QA 0.20
jh-changes
Shin'ya Ueoka 6 years ago committed by GitHub
commit 7c99569b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      QA.md
  2. 13
      e2e/contents/tab.test.js
  3. 6
      src/background/usecases/operation.js

@ -18,6 +18,8 @@ The behaviors of the console are tested in [Console section](#consoles).
- [ ] <kbd>r</kbd>: reload current tab
- [ ] <kbd>R</kbd>: reload current tab without cache
- [ ] <kbd>g</kbd><kbd>h</kbd>: open start page on current tab
- [ ] <kbd>g</kbd><kbd>H</kbd>: open start page to new tab
#### Misc

@ -23,6 +23,19 @@ describe("tab test", () => {
expect(actual.tabs).to.have.lengthOf(before.tabs.length - 1);
});
it('deletes tabs to the right by D', async () => {
let tab1 = await tabs.create(targetWindow.id, CLIENT_URL + '#1');
await tabs.create(targetWindow.id, CLIENT_URL + '#2');
await tabs.create(targetWindow.id, CLIENT_URL + '#3');
let before = await windows.get(targetWindow.id)
let tab = await tabs.selectAt(targetWindow.id, tab1.index)
await keys.press(tab.id, 'D', { shiftKey: true });
let actual = await windows.get(targetWindow.id);
expect(actual.tabs).to.have.lengthOf(before.tabs.length - 2);
});
it('duplicates tab by zd', async () => {
let tab = await tabs.create(targetWindow.id, CLIENT_URL);
let before = await windows.get(targetWindow.id)

@ -193,11 +193,15 @@ export default class OperationInteractor {
let tab = await this.tabPresenter.getCurrent();
let result = await browser.browserSettings.homepageOverride.get({});
let us = urls.homepageUrls(result.value);
if (us.length === 1 && us[0] === 'about:home') {
// eslint-disable-next-line max-len
throw new Error('Cannot open Firefox Home (about:home) by WebExnteions, set your custom URLs');
}
if (us.length === 1 && !newTab) {
return this.tabPresenter.open(us[0], tab.id);
}
for (let u of us) {
this.tabPresenter.create(u, { openerTabId: tab.id });
this.tabPresenter.create(u);
}
}
}