|
4 | 4 | BrowserPage,
|
5 | 5 | CliPage
|
6 | 6 | } from '../../../pageObjects';
|
7 |
| -import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf'; |
| 7 | +import { commonUrl, ossStandaloneBigConfig, ossStandaloneConfig } from '../../../helpers/conf'; |
8 | 8 | import { Common } from '../../../helpers/common';
|
9 | 9 | import { KeyTypesTexts, rte } from '../../../helpers/constants';
|
10 | 10 | import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
|
@@ -92,19 +92,31 @@ test('Verify that user can see saved executed commands in CLI on Browser page wh
|
92 | 92 | }
|
93 | 93 | });
|
94 | 94 | test
|
| 95 | + .before(async() => { |
| 96 | + await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneBigConfig, ossStandaloneBigConfig.databaseName); |
| 97 | + }) |
95 | 98 | .after(async() => {
|
96 |
| - // Clear and delete database |
97 |
| - await browserPage.deleteKeyByName(keyName); |
98 |
| - await deleteStandaloneDatabaseApi(ossStandaloneConfig); |
| 99 | + // Delete database |
| 100 | + await deleteStandaloneDatabaseApi(ossStandaloneBigConfig); |
99 | 101 | })('Verify that user can see key details selected when he returns back to Browser page', async t => {
|
100 |
| - // Add and open new key details and navigate to Settings |
101 |
| - keyName = common.generateWord(10); |
102 |
| - await browserPage.addHashKey(keyName); |
103 |
| - await browserPage.openKeyDetails(keyName); |
| 102 | + // Scroll keys elements |
| 103 | + const scrollY = 1000; |
| 104 | + await t.scroll(browserPage.cssSelectorGrid, 0, scrollY); |
| 105 | + |
| 106 | + const keysCount = await browserPage.virtualTableContainer.find(browserPage.cssVirtualTableRow).count; |
| 107 | + const targetKey = browserPage.virtualTableContainer.find(browserPage.cssVirtualTableRow).nth(Math.floor(keysCount / 2)); |
| 108 | + const targetKeyName = await targetKey.find(browserPage.cssSelectorKey).innerText; |
| 109 | + // Open key details |
| 110 | + await t.click(targetKey); |
| 111 | + await t.expect(await targetKey.getAttribute('class')).contains('table-row-selected', 'Not correct key selected in key list'); |
| 112 | + |
104 | 113 | await t.click(myRedisDatabasePage.settingsButton);
|
105 | 114 | // Return back to Browser and check key details selected
|
106 | 115 | await t.click(myRedisDatabasePage.browserButton);
|
107 |
| - await t.expect(browserPage.keyNameFormDetails.withExactText(keyName).exists).ok('The key details is selected'); |
| 116 | + // Check Keys details saved |
| 117 | + await t.expect(browserPage.keyNameFormDetails.innerText).eql(targetKeyName, 'Key details is not saved as context'); |
| 118 | + // Check Key selected in Key List |
| 119 | + await t.expect(await targetKey.getAttribute('class')).contains('table-row-selected', 'Not correct key selected in key list'); |
108 | 120 | });
|
109 | 121 | test
|
110 | 122 | .after(async() => {
|
|
0 commit comments