Add e2e test cases for u
This commit is contained in:
parent
1017cefae4
commit
a6c0eb06e9
2 changed files with 17 additions and 1 deletions
1
QA.md
1
QA.md
|
@ -21,7 +21,6 @@ The behaviors of the console are tested in [Console section](#consoles).
|
||||||
|
|
||||||
#### Tabs
|
#### Tabs
|
||||||
|
|
||||||
- [ ] <kbd>u</kbd>: reopen close tab
|
|
||||||
- [ ] <kbd>r</kbd>: reload current tab
|
- [ ] <kbd>r</kbd>: reload current tab
|
||||||
- [ ] <kbd>R</kbd>: reload current tab without cache
|
- [ ] <kbd>R</kbd>: reload current tab without cache
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,23 @@ describe("tab test", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('reopen tab by u', () => {
|
||||||
|
return Promise.resolve().then(() => {
|
||||||
|
return tabs.create(targetWindow.id, CLIENT_URL + '#1');
|
||||||
|
}).then((tab) => {
|
||||||
|
return keys.press(tab.id, 'd');
|
||||||
|
}).then(() => {
|
||||||
|
return windows.get(targetWindow.id);
|
||||||
|
}).then((win) => {
|
||||||
|
expect(win.tabs).to.have.lengthOf(1);
|
||||||
|
return keys.press(win.tabs[0].id, 'u');
|
||||||
|
}).then(() => {
|
||||||
|
return windows.get(targetWindow.id);
|
||||||
|
}).then((win) => {
|
||||||
|
expect(win.tabs).to.have.lengthOf(2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('does not delete pinned tab by d', () => {
|
it('does not delete pinned tab by d', () => {
|
||||||
return Promise.resolve().then(() => {
|
return Promise.resolve().then(() => {
|
||||||
return tabs.create(targetWindow.id, CLIENT_URL + '#1');
|
return tabs.create(targetWindow.id, CLIENT_URL + '#1');
|
||||||
|
|
Reference in a new issue