Skip to content

Commit 16e9a56

Browse files
authored
Merge pull request #187 from RedisInsight/e2e/bugfix/e2e-fix
E2e/bugfix/e2e fix
2 parents 81ec275 + b2ed702 commit 16e9a56

File tree

15 files changed

+39
-18
lines changed

15 files changed

+39
-18
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ workflows:
401401

402402
- e2e-app-image:
403403
name: E2ETest (linux)
404-
parallelism: 1
404+
parallelism: 2
405405
requires:
406406
- Build extension - Linux (stage)
407407

@@ -510,7 +510,7 @@ workflows:
510510
# e2e tests on linux build
511511
- e2e-app-image:
512512
name: E2ETest (linux)
513-
parallelism: 1
513+
parallelism: 2
514514
requires:
515515
- Build extension - Linux (stage)
516516

@@ -545,10 +545,10 @@ workflows:
545545
env: prod
546546
<<: *prodFilter
547547

548-
# e2e desktop tests on linux build
548+
# e2e tests on linux build
549549
- e2e-app-image:
550550
name: E2ETest (Linux)
551-
parallelism: 1
551+
parallelism: 2
552552
requires:
553553
- Build extension - Linux (prod)
554554

tests/e2e/.mocharc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
toConsole: false,
2121
},
2222
},
23-
retries: 0,
23+
retries: 1,
2424
timeout: 100_000,
2525
ui: 'bdd',
2626
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class Eula {
66
* Accept eula
77
*/
88
static async accept(): Promise<void> {
9-
const spec = { agreements: { analytics: true, notifications: true, eula: true } }
9+
const spec = { agreements: { analytics: true, notifications: true, eula: true, encryption: false } }
1010
const response = await CommonAPIRequests.sendPatchRequest(
1111
`/settings`,
1212
spec,

tests/e2e/src/helpers/common-actions/DatabasesActions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { TreeView } from '@e2eSrc/page-objects/components'
1111
import { InnerViews } from '@e2eSrc/page-objects/components/WebView'
1212
import { AddNewDatabaseParameters } from '../types/types'
1313
import { DatabaseAPIRequests } from '../api'
14-
import { NotificationActions } from './actions'
14+
import { InputActions, NotificationActions } from './actions'
1515
import { KeyDetailsActions } from './KeyDetailsActions'
1616
import { ServerActions } from './ServerActions'
1717
import { Eula } from '../api/Eula'
@@ -85,6 +85,7 @@ export class DatabasesActions extends CommonDriverExtension {
8585
await treeView.clickDatabaseByName(databaseParameters.databaseName!)
8686
await super.driverSleep(200)
8787
}
88+
await InputActions.hoverElement(treeView.getCLIDatabaseBtnByName(databaseParameters.databaseName!),1000)
8889
}
8990

9091
/**

tests/e2e/src/helpers/common-actions/TreeViewActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class TreeViewActions extends CommonDriverExtension {
5151
): Promise<void> {
5252
let treeView = new TreeView()
5353
// Wait for key refresh
54-
await TreeViewActions.driverSleep(1000)
54+
await TreeViewActions.driverSleep(2000)
5555
// Verify not patterned keys
5656
await this.verifyNotPatternedKeys(delimiter)
5757

tests/e2e/src/page-objects/components/bottom-bar/CliViewPanel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export class CliViewPanel extends WebView {
7777
await input.sendKeys(command.charAt(i))
7878
}
7979
await input.sendKeys(Key.ENTER)
80+
await InputActions.driver.sleep(300)
8081
}
8182

8283
/**
Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
import { By } from 'selenium-webdriver'
22
import { WebView } from '@e2eSrc/page-objects/components/WebView'
3-
import { CheckboxActions } from '@e2eSrc/helpers/common-actions'
3+
import {
4+
ButtonActions,
5+
CheckboxActions,
6+
InputActions,
7+
} from '@e2eSrc/helpers/common-actions'
8+
import { InputWithButtons } from '../common/InputWithButtons'
49

510
/**
611
* Settings view
712
*/
813
export class SettingsView extends WebView {
9-
switchAnalyticsOption = By.xpath(`//*[@data-testid='check-option-analytics']/..`)
10-
switchAnalyticsCheckbox = By.xpath(`//input[@data-testid='check-option-analytics']/../../div[contains(@class, 'checkmarkContainer')]`)
14+
switchAnalyticsOption = By.xpath(
15+
`//*[@data-testid='check-option-analytics']/..`,
16+
)
17+
switchAnalyticsCheckbox = By.xpath(
18+
`//input[@data-testid='check-option-analytics']/../../div[contains(@class, 'checkmarkContainer')]`,
19+
)
1120
delimiterInput = By.xpath(`//input[@data-testid='input-delimiter']`)
1221

1322
/**
@@ -17,4 +26,12 @@ export class SettingsView extends WebView {
1726
const switcherElement = await super.getElement(this.switchAnalyticsOption)
1827
return await CheckboxActions.getCheckboxState(switcherElement)
1928
}
29+
30+
/**
31+
* Set delimiter default value
32+
*/
33+
async setDelimiterDefaultValue(): Promise<void> {
34+
await InputActions.slowType(this.delimiterInput, ':')
35+
await ButtonActions.clickElement(InputWithButtons.applyInput)
36+
}
2037
}

tests/e2e/src/tests/browser/edit-key-value.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('Edit Key values verification', () => {
7878
Config.ossStandaloneConfig.databaseName,
7979
)
8080
await new EditorView().closeAllEditors()
81+
await NotificationActions.closeAllNotifications()
8182
await keyDetailsView.switchToInnerViewFrame(InnerViews.TreeInnerView)
8283
// Refresh database
8384
await treeView.refreshDatabaseByName(

tests/e2e/src/tests/browser/filtering.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ describe('Filtering per key name in DB with 10 millions of keys', () => {
428428
for (let i = 0; i < keyTypes.length - 1; i++) {
429429
await treeView.selectFilterGroupType(keyTypes[i].keyName)
430430
// Waiting for long db loading
431-
CommonDriverExtension.driverSleep(1000)
431+
CommonDriverExtension.driverSleep(2000)
432432
// Verify that all results have the same type as in filter
433433
expect(
434434
await treeView.getElementText(treeView.getTreeViewItemByIndex(i + 1)),

tests/e2e/src/tests/browser/verify-key-details.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
DatabasesActions,
2323
InputActions,
2424
KeyDetailsActions,
25+
NotificationActions,
2526
} from '@e2eSrc/helpers/common-actions'
2627
import { AddStringKeyView } from '@e2eSrc/page-objects/components/editor-view/AddStringKeyView'
2728
import { KeyTypesShort } from '@e2eSrc/helpers/constants'
@@ -97,6 +98,7 @@ describe('Key Details verifications', () => {
9798
)
9899

99100
await InputActions.typeText(addStringKeyView.keyNameInput, keyName)
101+
await NotificationActions.closeAllNotifications()
100102

101103
await ButtonActions.clickElement(addStringKeyView.addButton)
102104
await addStringKeyView.switchBack()

0 commit comments

Comments
 (0)