Skip to content

Commit feb1a74

Browse files
committed
updates by pr comments
1 parent c375441 commit feb1a74

File tree

3 files changed

+38
-21
lines changed

3 files changed

+38
-21
lines changed

tests/e2e/pageObjects/settings-page.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,33 @@ export class SettingsPage {
3535
}
3636

3737
/**
38-
* Change Commands In Pipeline value
39-
* @param value Value for pipeline
40-
*/
38+
* Change Commands In Pipeline value
39+
* @param value Value for pipeline
40+
*/
4141
async changeCommandsInPipeline(value: string): Promise<void> {
4242
await t.hover(this.commandsInPipelineValue);
4343
await t.click(this.commandsInPipelineInput);
4444
await t.typeText(this.commandsInPipelineInput, value, { replace: true });
4545
await t.click(this.applyButton);
4646
}
4747

48+
/**
49+
* Get state of Analytics switcher
50+
*/
4851
async getAnalyticsSwitcherValue(): Promise<string> {
4952
return await this.switchAnalyticsOption.getAttribute('aria-checked');
5053
}
5154

55+
/**
56+
* Get state of Notifications switcher
57+
*/
5258
async getNotificationsSwitcherValue(): Promise<string> {
5359
return await this.switchNovitifationsOption.getAttribute('aria-checked');
5460
}
5561

62+
/**
63+
* Get state of Eula switcher
64+
*/
5665
async getEulaSwitcherValue(): Promise<string> {
5766
return await this.switchEulaOption.getAttribute('aria-checked');
5867
}

tests/e2e/pageObjects/user-agreement-page.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,19 @@ export class UserAgreementPage {
1616
pluginSectionWithText = Selector('[data-testid=plugin-section]');
1717
recommendedSwitcher = Selector('[data-testid=switch-option-recommended]');
1818

19-
//Accept RedisInsight License Terms
20-
async acceptLicenseTerms():Promise<void> {
21-
if (await this.switchOptionEula.exists) {
22-
await t.click(this.switchOptionEula);
23-
await t.click(this.switchOptionEncryption);
24-
await t.click(this.submitButton);
25-
}
26-
}
19+
//Accept RedisInsight License Terms
20+
async acceptLicenseTerms(): Promise<void> {
21+
if (await this.switchOptionEula.exists) {
22+
await t.click(this.switchOptionEula);
23+
await t.click(this.switchOptionEncryption);
24+
await t.click(this.submitButton);
25+
}
26+
}
2727

28-
async getRecommendedSwitcherValue(): Promise<string> {
29-
return await this.recommendedSwitcher.getAttribute('aria-checked');
30-
}
28+
/**
29+
* Get state of Recommended switcher
30+
*/
31+
async getRecommendedSwitcherValue(): Promise<string> {
32+
return await this.recommendedSwitcher.getAttribute('aria-checked');
33+
}
3134
}

tests/e2e/tests/critical-path/a-first-start-form/user-agreements-form.e2e.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,30 @@ fixture `Agreements Verification`
1515
.beforeEach(async t => {
1616
await t.maximizeWindow();
1717
});
18-
test('Verify that user should accept User Agreements to continue working with the application, the Welcome page is opened after user agrees, the encryption enabled by default and specific message', async t => {
18+
test('Verify that user should accept User Agreements to continue working with the application', async t => {
1919
await t.expect(userAgreementPage.userAgreementsPopup.exists).ok('User Agreements Popup is shown');
20+
await t.click(addRedisDatabasePage.addDatabaseButton);
21+
//Verify that I still has agreements popup & cannot add a database
22+
await t.expect(userAgreementPage.userAgreementsPopup.exists).ok('User Agreements Popup is shown');
23+
await t.expect(addRedisDatabasePage.addDatabaseManually.exists).notOk('User can\'t add a database');
24+
});
25+
test('Verify that the encryption enabled by default and specific message', async t => {
26+
const expectedPluginText = 'To avoid automatic execution of malicious code, when adding new Workbench plugins, use files from trusted authors only.';
2027
//Verify that section with plugin warning is displayed
2128
await t.expect(userAgreementPage.pluginSectionWithText.visible).ok('Plugin text is displayed');
2229
//Verify that text that is displayed in window is 'While adding new visualization plugins, use files only from trusted authors to avoid automatic execution of malicious code.'
2330
const pluginText = userAgreementPage.pluginSectionWithText.innerText;
24-
await t.expect(pluginText).eql('To avoid automatic execution of malicious code, when adding new Workbench plugins, use files from trusted authors only.');
31+
await t.expect(pluginText).eql(expectedPluginText, 'Plugin text is incorrect');
2532
// Verify that encryption enabled by default
2633
await t.expect(userAgreementPage.switchOptionEncryption.withAttribute('aria-checked', 'true').exists).ok('Encryption enabled by default');
27-
await t.click(addRedisDatabasePage.addDatabaseButton);
28-
//Verify that I still has agreements popup & cannot add a database
29-
await t.expect(userAgreementPage.userAgreementsPopup.exists).ok('User Agreements Popup is shown');
30-
await t.expect(addRedisDatabasePage.addDatabaseManually.exists).notOk('User can\'t add a database');
34+
});
35+
test('Verify that the Welcome page is opened after user agrees', async t => {
3136
//Accept agreements
3237
await t.click(settingsPage.switchEulaOption);
3338
await t.click(settingsPage.submitConsentsPopupButton);
3439
//Verify that I dont have an popup
3540
await t.expect(userAgreementPage.userAgreementsPopup.exists).notOk('User Agreements Popup isn\'t shown after accept agreements');
36-
//Verify that Welcome page is displayed
41+
//Verify that Welcome page is displayed after user agrees
3742
await t.expect(addRedisDatabasePage.welcomePageTitle.exists).ok('Welcome page is displayed');
3843
//Verify I can work with the application
3944
await t.click(addRedisDatabasePage.addDatabaseButton);

0 commit comments

Comments
 (0)