From 4c5dd2630dbc419bade765b13fbc866c226f487e Mon Sep 17 00:00:00 2001 From: Tanya Troyanova Date: Wed, 24 Nov 2021 18:14:44 +0300 Subject: [PATCH] e2e - Store certificates --- .../critical-path/browser/database-overview.e2e.ts | 3 +++ .../database/logical-databases.e2e.ts | 4 ++++ .../database/verify-agreements.e2e.ts | 14 +++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/e2e/tests/critical-path/browser/database-overview.e2e.ts b/tests/e2e/tests/critical-path/browser/database-overview.e2e.ts index bc3437d116..b1b5d80d08 100644 --- a/tests/e2e/tests/critical-path/browser/database-overview.e2e.ts +++ b/tests/e2e/tests/critical-path/browser/database-overview.e2e.ts @@ -37,6 +37,9 @@ fixture `Database overview` await t.typeText(cliPage.cliCommandInput, 'FLUSHDB'); await t.pressKey('enter'); await t.click(cliPage.cliCollapseButton); + //Delete all databases + await t.click(myRedisDatabasePage.myRedisDBButton); + await myRedisDatabasePage.deleteAllDatabases(); }) test('Verify that user can see the list of Modules updated each time when he connects to the database', async t => { let firstDatabaseModules = []; diff --git a/tests/e2e/tests/critical-path/database/logical-databases.e2e.ts b/tests/e2e/tests/critical-path/database/logical-databases.e2e.ts index af5c7b7755..21a3d302ff 100644 --- a/tests/e2e/tests/critical-path/database/logical-databases.e2e.ts +++ b/tests/e2e/tests/critical-path/database/logical-databases.e2e.ts @@ -21,6 +21,10 @@ fixture `Logical databases` await myRedisDatabasePage.deleteAllDatabases(); await t.expect(addRedisDatabasePage.addDatabaseButton.exists).ok('The add redis database view', { timeout: 20000 }); }) + .afterEach(async t => { + //Delete databases + await myRedisDatabasePage.deleteAllDatabases(); + }) test('Verify that user can add DB with logical index via host and port from Add DB manually form', async t => { const index = '0'; await addRedisDatabasePage.addRedisDataBase(ossStandaloneConfig); diff --git a/tests/e2e/tests/critical-path/database/verify-agreements.e2e.ts b/tests/e2e/tests/critical-path/database/verify-agreements.e2e.ts index b6f801c10b..5f7d02c508 100644 --- a/tests/e2e/tests/critical-path/database/verify-agreements.e2e.ts +++ b/tests/e2e/tests/critical-path/database/verify-agreements.e2e.ts @@ -1,9 +1,10 @@ import { RequestMock } from 'testcafe'; import { commonUrl } from '../../../helpers/conf'; -import { UserAgreementPage, AddRedisDatabasePage, SettingsPage } from '../../../pageObjects'; +import { UserAgreementPage, AddRedisDatabasePage, SettingsPage, MyRedisDatabasePage } from '../../../pageObjects'; const addRedisDatabasePage = new AddRedisDatabasePage(); const settingsPage = new SettingsPage(); +const myRedisDatabasePage = new MyRedisDatabasePage(); const mockedSettingsResponse = { agreements: { @@ -42,3 +43,14 @@ test('Verify that user should accept User Agreements to continue working with th await t.click(addRedisDatabasePage.addDatabaseButton); await t.expect(addRedisDatabasePage.addDatabaseManually.exists).ok('User can add a database'); }); +test('Verify that user when user agrees to RI terms and conditions with encryption enabled, user is redirected to the Welcome page', async t => { + //Click on "I have read and understood the Server Side Public License" and submit + await t.click(settingsPage.switchEulaOption); + await t.click(settingsPage.submitConsentsPopupButton); + //Verify that Welcome page is displayed + await t.expect(addRedisDatabasePage.welcomePageTitle.exists).ok('Welcome page is displayed'); +}); +test('Verify that user when user agrees to RI terms and conditions with encryption enabled, user is redirected to the Welcome page', async t => { + // Verify that encryption enabled by default + await t.expect(userAgreementPage.switchOptionEncryption.withAttribute('aria-checked', 'true').exists).ok('Encryption enabled by default'); +});