Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2e/feature/rivs 303 encryption #228

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/e2e/src/helpers/api/KeyApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export class KeyAPIRequests {
const databaseId =
await DatabaseAPIRequests.getDatabaseIdByName(databaseName)
const requestBody = {
destination: "TAIL",
keyName: Buffer.from(keyParameters.keyName, 'utf-8'),
elements: keyParameters.element.map(el => Buffer.from(el, 'utf-8'))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class KeyDetailsView extends WebView {
`//vscode-button[starts-with(@data-testid, 'copy-name-button')]`,
)
detailsDeleteKeyButton = By.xpath(
`//vscode-button[starts-with(@data-testid, 'remove-key-')]`,
`//button[starts-with(@data-testid, 'remove-key-')]`,
)
submitDetailsDeleteKeyButton = By.xpath(
`//div[@class='popup-content ']//vscode-button[starts-with(@data-testid, 'remove-key-')]`,
Expand Down
22 changes: 17 additions & 5 deletions tests/e2e/src/page-objects/components/tree-view/TreeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ export class TreeView extends WebView {
sortKeysBtn = By.xpath(`//vscode-button[@data-testid='sort-keys']`)
addDatabaseBtn = By.xpath(`//a[@aria-label='Add Redis database']`)
editDatabaseBtn = By.xpath(`//vscode-button[@data-testid='edit-database']`)
settingsButton = By.xpath(`//a[@aria-label='Open Redis for VS Code settings']`)
settingsButton = By.xpath(
`//a[@aria-label='Open Redis for VS Code settings']`,
)
deleteKeyInListBtn = By.xpath(
`//vscode-button[starts-with(@data-testid, 'remove-key-')]`,
`//button[starts-with(@data-testid, 'remove-key-')]`,
)
submitDeleteKeyButton = By.xpath(
`//div[@class='popup-content ']//vscode-button[starts-with(@data-testid, 'remove-key-')]`,
Expand Down Expand Up @@ -53,7 +55,9 @@ export class TreeView extends WebView {
treeViewVirtualTable = By.xpath(`//*[@data-testid='virtual-tree']/div`)
databaseInstance = By.xpath(`//div[starts-with(@data-testid, 'database-')]`)
keyInFolder = By.xpath(`//*[contains(@data-testid, "keys:")]`)
addKeyFromTreeBtn = By.xpath(`//vscode-button[@data-testid='add-key-from-tree']`)
addKeyFromTreeBtn = By.xpath(
`//vscode-button[@data-testid='add-key-from-tree']`,
)

// mask
keyMask = '//*[@data-testid="key-$name"]'
Expand Down Expand Up @@ -88,17 +92,25 @@ export class TreeView extends WebView {
By.xpath(
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/div`,
)
getDatabaseContainerByName = (name: string): Locator =>
By.xpath(
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/../..`,
)
getLogicalDatabaseContainerByIndex = (name: string, index: number): Locator =>
By.xpath(
`(.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/../../div[starts-with(@data-testid, 'logical-database-')])[${index - 1}]`,
)
getEditDatabaseBtnByName = (name: string): Locator =>
By.xpath(
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/..//vscode-button[@data-testid='edit-database']`,
)
getRefreshDatabaseBtnByName = (name: string): Locator =>
By.xpath(
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/..//vscode-button[@data-testid = 'refresh-keys']`,
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/../..//button[@data-testid = 'refresh-keys-refresh-btn']`,
)
getCLIDatabaseBtnByName = (name: string): Locator =>
By.xpath(
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/..//vscode-button[@data-testid = 'terminal-button']`,
`.//div[starts-with(@data-testid, 'database-')][.//*[text()='${name}']]/../..//vscode-button[@data-testid = 'terminal-button']`,
)
getKeySelectorByName = (name: string): Locator =>
By.xpath(`//*[@data-testid="key-${name}"]`)
Expand Down
Loading