Skip to content

Commit 8868301

Browse files
authored
Merge pull request #228 from RedisInsight/e2e/feature/RIVS-303_encryption
E2e/feature/rivs 303 encryption
2 parents 5fb96aa + 9858166 commit 8868301

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

tests/e2e/src/helpers/api/KeyApi.ts

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export class KeyAPIRequests {
148148
const databaseId =
149149
await DatabaseAPIRequests.getDatabaseIdByName(databaseName)
150150
const requestBody = {
151+
destination: "TAIL",
151152
keyName: Buffer.from(keyParameters.keyName, 'utf-8'),
152153
elements: keyParameters.element.map(el => Buffer.from(el, 'utf-8'))
153154
}

tests/e2e/src/page-objects/components/editor-view/KeyDetailsView.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class KeyDetailsView extends WebView {
3737
`//vscode-button[starts-with(@data-testid, 'copy-name-button')]`,
3838
)
3939
detailsDeleteKeyButton = By.xpath(
40-
`//vscode-button[starts-with(@data-testid, 'remove-key-')]`,
40+
`//button[starts-with(@data-testid, 'remove-key-')]`,
4141
)
4242
submitDetailsDeleteKeyButton = By.xpath(
4343
`//div[@class='popup-content ']//vscode-button[starts-with(@data-testid, 'remove-key-')]`,

tests/e2e/src/page-objects/components/tree-view/TreeView.ts

+17-5
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ export class TreeView extends WebView {
2323
sortKeysBtn = By.xpath(`//vscode-button[@data-testid='sort-keys']`)
2424
addDatabaseBtn = By.xpath(`//a[@aria-label='Add Redis database']`)
2525
editDatabaseBtn = By.xpath(`//vscode-button[@data-testid='edit-database']`)
26-
settingsButton = By.xpath(`//a[@aria-label='Open Redis for VS Code settings']`)
26+
settingsButton = By.xpath(
27+
`//a[@aria-label='Open Redis for VS Code settings']`,
28+
)
2729
deleteKeyInListBtn = By.xpath(
28-
`//vscode-button[starts-with(@data-testid, 'remove-key-')]`,
30+
`//button[starts-with(@data-testid, 'remove-key-')]`,
2931
)
3032
submitDeleteKeyButton = By.xpath(
3133
`//div[@class='popup-content ']//vscode-button[starts-with(@data-testid, 'remove-key-')]`,
@@ -53,7 +55,9 @@ export class TreeView extends WebView {
5355
treeViewVirtualTable = By.xpath(`//*[@data-testid='virtual-tree']/div`)
5456
databaseInstance = By.xpath(`//div[starts-with(@data-testid, 'database-')]`)
5557
keyInFolder = By.xpath(`//*[contains(@data-testid, "keys:")]`)
56-
addKeyFromTreeBtn = By.xpath(`//vscode-button[@data-testid='add-key-from-tree']`)
58+
addKeyFromTreeBtn = By.xpath(
59+
`//vscode-button[@data-testid='add-key-from-tree']`,
60+
)
5761

5862
// mask
5963
keyMask = '//*[@data-testid="key-$name"]'
@@ -88,17 +92,25 @@ export class TreeView extends WebView {
8892
By.xpath(
8993
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/div`,
9094
)
95+
getDatabaseContainerByName = (name: string): Locator =>
96+
By.xpath(
97+
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/../..`,
98+
)
99+
getLogicalDatabaseContainerByIndex = (name: string, index: number): Locator =>
100+
By.xpath(
101+
`(.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/../../div[starts-with(@data-testid, 'logical-database-')])[${index - 1}]`,
102+
)
91103
getEditDatabaseBtnByName = (name: string): Locator =>
92104
By.xpath(
93105
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/..//vscode-button[@data-testid='edit-database']`,
94106
)
95107
getRefreshDatabaseBtnByName = (name: string): Locator =>
96108
By.xpath(
97-
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/..//vscode-button[@data-testid = 'refresh-keys']`,
109+
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/../..//button[@data-testid = 'refresh-keys-refresh-btn']`,
98110
)
99111
getCLIDatabaseBtnByName = (name: string): Locator =>
100112
By.xpath(
101-
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/..//vscode-button[@data-testid = 'terminal-button']`,
113+
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/../..//vscode-button[@data-testid = 'terminal-button']`,
102114
)
103115
getKeySelectorByName = (name: string): Locator =>
104116
By.xpath(`//*[@data-testid="key-${name}"]`)

0 commit comments

Comments
 (0)