-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix set from pin Add e2e tests from set as from pin
- Loading branch information
Showing
7 changed files
with
63 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { play } from 'zui-player'; | ||
import { getPath } from 'zui-test-data'; | ||
|
||
play('Set As From Pin', (app, test) => { | ||
test('when no session tab exists', async () => { | ||
// it creates a session tab | ||
await app.dropFile(getPath('small-zeek.zng')); | ||
await app.click('button', 'Load'); | ||
await app.attached(/Successfully/); | ||
await app.rightClick('treeitem', 'small-zeek.zng'); | ||
const tabCount = await app.getTabCount(); | ||
await app.click('listitem', 'Use as From Pin'); | ||
await app.attached('button', 'from small-zeek.zng'); | ||
test.expect(await app.getTabCount()).toBe(tabCount + 1); | ||
}); | ||
|
||
test('when a session tab does exist', async () => { | ||
// it re-uses the existing session tab | ||
await app.dropFile(getPath('small-zeek.zng')); | ||
await app.click('button', 'Load'); | ||
await app.attached(/Successfully/); | ||
await app.rightClick('treeitem', 'small-zeek.zng_1'); | ||
const tabCount = await app.getTabCount(); | ||
await app.click('listitem', 'Use as From Pin'); | ||
await app.attached('button', 'from small-zeek.zng_1'); | ||
test.expect(await app.getTabCount()).toBe(tabCount); | ||
}); | ||
}); |