diff --git a/tests/e2e/rte.docker-compose.yml b/tests/e2e/rte.docker-compose.yml index 04af5918..034a5fca 100644 --- a/tests/e2e/rte.docker-compose.yml +++ b/tests/e2e/rte.docker-compose.yml @@ -15,7 +15,7 @@ services: # ssh ssh: logging: *logging - image: lscr.io/linuxserver/openssh-server:latest + image: lscr.io/linuxserver/openssh-server:9.7_p1-r4-ls172 environment: - PASSWORD_ACCESS=true - USER_PASSWORD=pass diff --git a/tests/e2e/src/helpers/common-actions/KeyActions.ts b/tests/e2e/src/helpers/common-actions/KeyActions.ts index 0e757155..e3d10a88 100644 --- a/tests/e2e/src/helpers/common-actions/KeyActions.ts +++ b/tests/e2e/src/helpers/common-actions/KeyActions.ts @@ -156,7 +156,7 @@ export class Key { case KeyTypesShort.Hash: return { fields: [{ field, value }] } case KeyTypesShort.List: - return { element: value } + return { destination: "TAIL", elements: [value] } case KeyTypesShort.Set: return { members: [value] } case KeyTypesShort.ZSet: diff --git a/tests/e2e/src/helpers/constants.ts b/tests/e2e/src/helpers/constants.ts index ab2af9db..d643e0c3 100644 --- a/tests/e2e/src/helpers/constants.ts +++ b/tests/e2e/src/helpers/constants.ts @@ -141,6 +141,6 @@ export enum Formatters { } export enum AddElementInList { - Head , + Head, Tail, } diff --git a/tests/e2e/src/page-objects/components/editor-view/KeyDetailsView.ts b/tests/e2e/src/page-objects/components/editor-view/KeyDetailsView.ts index 857fe54e..65c54852 100644 --- a/tests/e2e/src/page-objects/components/editor-view/KeyDetailsView.ts +++ b/tests/e2e/src/page-objects/components/editor-view/KeyDetailsView.ts @@ -31,7 +31,7 @@ export class KeyDetailsView extends WebView { `//vscode-button[@data-testid='search-button']`, ) addKeyValueItemsButton = By.xpath( - `//*[@data-testid = 'add-key-value-items-btn']`, + `//*[@data-testid='add-key-value-items-btn']`, ) copyButton = By.xpath( `//vscode-button[starts-with(@data-testid, 'copy-name-button')]`, diff --git a/tests/e2e/src/page-objects/components/editor-view/ListKeyDetailsView.ts b/tests/e2e/src/page-objects/components/editor-view/ListKeyDetailsView.ts index f826bc2b..3357d29e 100644 --- a/tests/e2e/src/page-objects/components/editor-view/ListKeyDetailsView.ts +++ b/tests/e2e/src/page-objects/components/editor-view/ListKeyDetailsView.ts @@ -76,7 +76,7 @@ export class ListKeyDetailsView extends DoubleColumnKeyDetailsView { ) await ButtonActions.clickAndWaitForElement(this.fromHeadSelection, this.fromHeadSelection, false) } - for (let i = 0; i < element.length; i ++){ + for (let i = 0; i < element.length; i++){ await InputActions.typeText(this.getElementValueInput(i), element[i]) if (element.length > 1 && i < element.length - 1) { diff --git a/tests/e2e/src/page-objects/components/tree-view/TreeView.ts b/tests/e2e/src/page-objects/components/tree-view/TreeView.ts index 8d799a3f..ae796076 100644 --- a/tests/e2e/src/page-objects/components/tree-view/TreeView.ts +++ b/tests/e2e/src/page-objects/components/tree-view/TreeView.ts @@ -5,7 +5,6 @@ import { DropdownActions, InputActions, } from '@e2eSrc/helpers/common-actions' -import { CommonDriverExtension, Config } from '@e2eSrc/helpers' /** * Tree list view with databases and keys @@ -63,7 +62,7 @@ export class TreeView extends WebView { keyMask = '//*[@data-testid="key-$name"]' getItemDeleteButton = (keyName: string): Locator => By.xpath( - `//vscode-button[starts-with(@data-testid, 'remove-key-${keyName}')]`, + `//button[starts-with(@data-testid, 'remove-key-${keyName}')]`, ) getTreeViewItemByIndex = (index: number): Locator => By.xpath( diff --git a/tests/e2e/src/tests/browser/filtering.e2e.ts b/tests/e2e/src/tests/browser/filtering.e2e.ts index e8e501fe..978712a0 100644 --- a/tests/e2e/src/tests/browser/filtering.e2e.ts +++ b/tests/e2e/src/tests/browser/filtering.e2e.ts @@ -428,7 +428,7 @@ describe('Filtering per key name in DB with 10 millions of keys', () => { for (let i = 0; i < keyTypes.length - 1; i++) { await treeView.selectFilterGroupType(keyTypes[i].keyName) // Waiting for long db loading - CommonDriverExtension.driverSleep(3000) + CommonDriverExtension.driverSleep(4000) // Verify that all results have the same type as in filter expect( await treeView.getElementText(treeView.getTreeViewItemByIndex(i + 1)), diff --git a/tests/e2e/src/tests/browser/large-key-details-values.e2e.ts b/tests/e2e/src/tests/browser/large-key-details-values.e2e.ts index 6d95c1d1..9e07f7b8 100644 --- a/tests/e2e/src/tests/browser/large-key-details-values.e2e.ts +++ b/tests/e2e/src/tests/browser/large-key-details-values.e2e.ts @@ -305,7 +305,7 @@ describe('Large key details verification', () => { stringKeyDetailsView.editKeyValueButton, 'class', ), - ).eql(true, 'Edit String key button not disabled') + ).eql(true, 'Edit String key value button not disabled before loading all clicked') // Verify that user can see String key value with only 5000 characters uploaded if length is more than 5000 // Verify that 3 dots after truncated big strings displayed @@ -338,7 +338,7 @@ describe('Large key details verification', () => { stringKeyDetailsView.editKeyValueButton, 'class', ), - ).eql(false, 'Edit key value button not disabled') + ).eql(false, 'Edit key value button disabled after loading all clicked') // Verify that user can see not fully loaded String key with > 5000 characters after clicking on Refresh button await ButtonActions.clickAndWaitForElement( stringKeyDetailsView.refreshKeyButton, diff --git a/tests/e2e/src/tests/browser/list-key.e2e.ts b/tests/e2e/src/tests/browser/list-key.e2e.ts index f0159461..30da7a4b 100644 --- a/tests/e2e/src/tests/browser/list-key.e2e.ts +++ b/tests/e2e/src/tests/browser/list-key.e2e.ts @@ -9,6 +9,7 @@ import { Config } from '@e2eSrc/helpers/Conf' import { ListKeyParameters } from '@e2eSrc/helpers/types/types' import { InnerViews } from '@e2eSrc/page-objects/components/WebView' import { AddElementInList, KeyTypesShort } from '@e2eSrc/helpers/constants' +import { CommonDriverExtension } from '@e2eSrc/helpers' let keyName: string const elements = [ @@ -36,6 +37,11 @@ describe('List Key verification', () => { element: [elements[0], elements[1], elements[2]], } + await KeyAPIRequests.addListKeyApi( + keyToAddParameters, + Config.ossStandaloneConfig.databaseName, + ) + // Refresh database await treeView.refreshDatabaseByName( Config.ossStandaloneConfig.databaseName, @@ -162,11 +168,9 @@ describe('List Key verification for db with version <6.2', () => { // Add a few elements to the List key await listKeyDetailsView.addListElement([elements[1]]) // Verify that user can add element to List - expect( - await listKeyDetailsView.isElementDisplayed( - listKeyDetailsView.getElementValueByText(elements[1]), - ), - ).eql(true, 'Element not added') + await listKeyDetailsView.getElement( + listKeyDetailsView.getElementValueByText(elements[1]), + ) await listKeyDetailsView.addListElement([elements[2]], AddElementInList.Head) await listKeyDetailsView.getElement( diff --git a/tests/e2e/src/tests/browser/set-ttl-for-key.e2e.ts b/tests/e2e/src/tests/browser/set-ttl-for-key.e2e.ts index ac8b9073..98fbf8a0 100644 --- a/tests/e2e/src/tests/browser/set-ttl-for-key.e2e.ts +++ b/tests/e2e/src/tests/browser/set-ttl-for-key.e2e.ts @@ -49,6 +49,7 @@ describe('Set TTL for Key', () => { Config.ossStandaloneV7Config.databaseName, ) await keyDetailsView.switchBack() + await keyDetailsView.switchToInnerViewFrame(InnerViews.TreeInnerView) }) it('Verify that user can specify TTL for Key', async function () { @@ -98,7 +99,6 @@ describe('Set TTL for Key', () => { }, ], } - await keyDetailsView.switchToInnerViewFrame(InnerViews.TreeInnerView) await addHashKeyView.addKey(hashKeyParameters, KeyTypesShort.Hash) await CommonDriverExtension.driverSleep(1000) await keyDetailsView.switchBack() diff --git a/tests/e2e/src/tests/database/edit-db.e2e.ts b/tests/e2e/src/tests/database/edit-db.e2e.ts index fee867e7..5c6b54d1 100644 --- a/tests/e2e/src/tests/database/edit-db.e2e.ts +++ b/tests/e2e/src/tests/database/edit-db.e2e.ts @@ -36,7 +36,10 @@ describe('Edit Databases', () => { it('Verify that user can edit DB alias of Standalone DB', async function () { // Verify that timeout input is displayed for edit db window with default value when it wasn't specified - const timeoutValue = await editDatabaseView.getElementAttribute(editDatabaseView.timeoutInput, 'value') + const timeoutValue = await editDatabaseView.getElementAttribute( + editDatabaseView.timeoutInput, + 'value', + ) expect(timeoutValue).eql('30', 'Timeout is not defaulted to 30') await InputActions.typeText(editDatabaseView.aliasInput, newDatabaseName) @@ -58,14 +61,17 @@ describe('Edit Databases', () => { it('Verify that user can edit Standalone DB', async function () { const connectionTimeout = '20' - const caCertFieldValue = await editDatabaseView.getElementAttribute( - editDatabaseView.caCertField, 'current-value' + const caCertFieldValue = await editDatabaseView.getElementText( + editDatabaseView.caCertField, ) - const clientCertFieldValue = await editDatabaseView.getElementAttribute( - editDatabaseView.clientCertField, 'current-value' + const clientCertFieldValue = await editDatabaseView.getElementText( + editDatabaseView.clientCertField, ) - expect(caCertFieldValue).not.contains('NO_CA_CERT', 'CA certificate is incorrect') + expect(caCertFieldValue).not.contains( + 'NO_CA_CERT', + 'CA certificate is incorrect', + ) expect(clientCertFieldValue).not.contains( 'ADD_NEW', 'Client certificate is incorrect', diff --git a/tests/e2e/src/tests/tree-view/tree-view-big-db.e2e.ts b/tests/e2e/src/tests/tree-view/tree-view-big-db.e2e.ts index ea648a0e..6a389c0f 100644 --- a/tests/e2e/src/tests/tree-view/tree-view-big-db.e2e.ts +++ b/tests/e2e/src/tests/tree-view/tree-view-big-db.e2e.ts @@ -37,7 +37,7 @@ describe('Tree view verifications for big database', () => { 'Scanned', 'Scanned key is not correct', ) - expect(await treeView.isElementDisplayed(treeView.totalKeyNumber)).eql( + expect(await treeView.waitForElementVisibility(treeView.totalKeyNumber)).eql( true, 'incorrect count is displayed', )