-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -350,12 +350,28 @@ test.describe('peerbook administration', () => { | |
const twr = await getTWRBuffer(page) | ||
expect(twr).toMatch(/Logged in/) | ||
}) | ||
test('test the support command', async () => { | ||
test('test the support command', async ({request}) => { | ||
await sleep(100) | ||
await page.keyboard.type('support') | ||
await page.keyboard.press("Enter") | ||
await sleep(100) | ||
const twr = await getTWRBuffer(page) | ||
expect(twr).toMatch(/address:$/) | ||
await page.keyboard.type('[email protected]') | ||
await page.keyboard.press("Enter") | ||
await sleep(100) | ||
await page.keyboard.press("ArrowDown") | ||
await page.keyboard.press("Enter") | ||
await sleep(100) | ||
const twr2 = await getTWRBuffer(page) | ||
expect(twr2).toMatch(/issue:$/) | ||
await page.keyboard.type('test issue') | ||
await page.keyboard.press("Enter") | ||
await sleep(100) | ||
const res = await request.get('http://smtp:8025/api/v2/messages') | ||
const msg = await res.json() | ||
expect(msg.count).toBe(1) | ||
const body = msg.items[0].Content.Body | ||
expect(body).toMatch(/test issue/) | ||
}) | ||
}) |