From 62bb88429f4fa40c43cc404700c3fe8741bfd4d6 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 14 May 2020 15:45:25 -0300 Subject: [PATCH] custom status --- e2e/16-status.spec.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/e2e/16-status.spec.js b/e2e/16-status.spec.js index 5b9e6b2d1..34fa0e237 100644 --- a/e2e/16-status.spec.js +++ b/e2e/16-status.spec.js @@ -19,8 +19,8 @@ describe('Status screen', () => { describe('Render', async() => { it('should have status input', async() => { - await expect(element(by.id('status-view-input'))).toBeVisible(); - await expect(element(by.id('status-view-online'))).toExist(); + await expect(element(by.id('status-view-input'))).toBeVisible(); + await expect(element(by.id('status-view-online'))).toExist(); await expect(element(by.id('status-view-busy'))).toExist(); await expect(element(by.id('status-view-away'))).toExist(); await expect(element(by.id('status-view-offline'))).toExist(); @@ -29,9 +29,10 @@ describe('Status screen', () => { describe('Usage', async() => { it('should change status', async() => { - await element(by.id('status-view-busy')).tap(); - sleep(1000); - await expect(element(by.id('status-view-current-busy'))).toExist(); + await sleep(1000); + await element(by.id('status-view-busy')).tap(); + await sleep(1000); + await expect(element(by.id('status-view-current-busy'))).toExist(); }); it('should change status text', async() => { @@ -39,6 +40,7 @@ describe('Status screen', () => { await sleep(1000); await element(by.id('status-view-submit')).tap(); await waitForToast(); + await waitFor(element(by.label('status-text-new').withAncestor(by.id('sidebar-custom-status')))).toBeVisible().withTimeout(2000); }); }); });