From 1b061852d2e97c1a943d4e8697b8cb786e4ff991 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 25 May 2022 08:27:26 +0200 Subject: [PATCH] fix e2e --- e2e/paths/14-account/04_acl.spec.js | 16 ++++++++-------- e2e/paths/14-account/05_connections.spec.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/e2e/paths/14-account/04_acl.spec.js b/e2e/paths/14-account/04_acl.spec.js index f86267d25..c400dbfb2 100644 --- a/e2e/paths/14-account/04_acl.spec.js +++ b/e2e/paths/14-account/04_acl.spec.js @@ -22,10 +22,10 @@ describe('Account ACL path', () => { }); it('should create new acl', async() => { - await page.autocompleteSearch(selectors.accountAcl.role, 'trainee'); - await page.autocompleteSearch(selectors.accountAcl.model, 'Campaign'); - await page.autocompleteSearch(selectors.accountAcl.accessType, 'WRITE'); - await page.autocompleteSearch(selectors.accountAcl.permission, 'DENY'); + await page.autocompleteSearch(selectors.accountAcl.role, 'sysadmin'); + await page.autocompleteSearch(selectors.accountAcl.model, 'UserAccount'); + await page.autocompleteSearch(selectors.accountAcl.accessType, '*'); + await page.autocompleteSearch(selectors.accountAcl.permission, 'ALLOW'); await page.waitToClick(selectors.accountAcl.save); const message = await page.waitForSnackbar(); @@ -39,7 +39,7 @@ describe('Account ACL path', () => { }); it('should edit the third acl', async() => { - await page.autocompleteSearch(selectors.accountAcl.model, 'AccessToken'); + await page.autocompleteSearch(selectors.accountAcl.model, 'Supplier'); await page.autocompleteSearch(selectors.accountAcl.accessType, 'READ'); await page.waitToClick(selectors.accountAcl.save); const message = await page.waitForSnackbar(); @@ -48,13 +48,13 @@ describe('Account ACL path', () => { }); it('should delete the third result', async() => { - const firstResult = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText'); + const result = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText'); await page.waitToClick(selectors.accountAcl.deleteThirdAcl); await page.waitToClick(selectors.globalItems.acceptButton); const message = await page.waitForSnackbar(); - const newFirstResult = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText'); + const newResult = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText'); expect(message.text).toContain('ACL removed'); - expect(firstResult).not.toEqual(newFirstResult); + expect(result).not.toEqual(newResult); }); }); diff --git a/e2e/paths/14-account/05_connections.spec.js b/e2e/paths/14-account/05_connections.spec.js index e0282639a..89b286101 100644 --- a/e2e/paths/14-account/05_connections.spec.js +++ b/e2e/paths/14-account/05_connections.spec.js @@ -23,7 +23,7 @@ describe('Account Connections path', () => { expect(firstResult).toContain(account); }); - it('should kill this connection', async() => { + it('should kill this connection and then get redirected to the login page', async() => { await page.waitToClick(selectors.accountConnections.deleteFirstConnection); await page.waitToClick(selectors.globalItems.acceptButton); const message = await page.waitForSnackbar();