Skip to content

Commit 3b57c1d

Browse files
Merge pull request #2051 from RedisInsight/e2e/feature/rectoring
refactoring
2 parents 110e340 + a20b7b8 commit 3b57c1d

File tree

19 files changed

+84
-83
lines changed

19 files changed

+84
-83
lines changed

tests/e2e/helpers/database.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import {
55
MyRedisDatabasePage,
66
BrowserPage,
77
AutoDiscoverREDatabases,
8-
UserAgreementPage
98
} from '../pageObjects';
9+
import { UserAgreementDialog } from '../pageObjects/dialogs';
1010
import { addNewStandaloneDatabaseApi, discoverSentinelDatabaseApi, getDatabaseIdByName } from './api/api-database';
1111

1212
const myRedisDatabasePage = new MyRedisDatabasePage();
1313
const discoverMasterGroupsPage = new DiscoverMasterGroupsPage();
1414
const autoDiscoverREDatabases = new AutoDiscoverREDatabases();
1515
const browserPage = new BrowserPage();
16-
const userAgreementPage = new UserAgreementPage();
16+
const userAgreementDialog = new UserAgreementDialog();
1717

1818
/**
1919
* Add a new database manually using host and port
@@ -214,7 +214,7 @@ export async function addRECloudDatabase(databaseParameters: AddNewDatabaseParam
214214
// Accept License terms
215215
export async function acceptLicenseTerms(): Promise<void> {
216216
await t.maximizeWindow();
217-
await userAgreementPage.acceptLicenseTerms();
217+
await userAgreementDialog.acceptLicenseTerms();
218218
}
219219

220220
// Accept License terms and connect to the RedisStack database

tests/e2e/helpers/notifications.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join } from 'path';
22
import * as os from 'os';
3-
import { NotificationParameters } from '../pageObjects/components/notification-panel';
3+
import { NotificationParameters } from '../pageObjects/components/navigation/notification-panel';
44

55
const workingDirectory = process.env.APP_FOLDER_ABSOLUTE_PATH
66
|| (join(os.homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-v2'));

tests/e2e/pageObjects/auto-discover-redis-enterprise-databases.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Selector } from 'testcafe';
2+
import { BasePage } from './base-page';
23

3-
export class AutoDiscoverREDatabases {
4+
export class AutoDiscoverREDatabases extends BasePage {
45
//-------------------------------------------------------------------------------------------
56
//DECLARATION OF SELECTORS
67
//*Declare all elements/components of the relevant page.

tests/e2e/pageObjects/base-page.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { t } from 'testcafe';
22
import { NavigationPanel } from './components/navigation-panel';
3+
import { ShortcutsPanel } from './components/shortcuts-panel';
34

45
export class BasePage {
56
NavigationPanel = new NavigationPanel();
7+
ShortcutsPanel = new ShortcutsPanel();
68

79
/**
810
* Reload page

tests/e2e/pageObjects/overview-page.ts renamed to tests/e2e/pageObjects/cluster-details-page.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Selector } from 'testcafe';
2+
import { InstancePage } from './instance-page';
23

3-
export class OverviewPage {
4+
export class ClusterDetailsPage extends InstancePage {
45
//CSS Selectors
56
cssTableRow = 'tr[class=euiTableRow]';
67
//-------------------------------------------------------------------------------------------
@@ -17,10 +18,6 @@ export class OverviewPage {
1718
tableHeaderCell = Selector('[data-test-subj^=tableHeaderCell]');
1819
primaryNodesTable = Selector('[data-testid=primary-nodes-table]');
1920
tableRow = Selector('tr[class=euiTableRow]');
20-
connectedClientsValue = Selector('[data-testid^=connectedClients-value]');
21-
totalKeysValue = Selector('[data-testid^=totalKeys-value]');
22-
networkInputValue = Selector('[data-testid^=networkInKbps-value]');
23-
networkOutputValue = Selector('[data-testid^=networkOutKbps-value]');
2421

2522
/**
2623
* Get Primary nodes count in table

tests/e2e/pageObjects/components/navigation-panel.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Selector } from 'testcafe';
22

3-
import NotificationPanel from './notification-panel';
3+
import NotificationPanel from './navigation/notification-panel';
4+
import { HelpCenter } from './navigation/help-center';
45

56
export class NavigationPanel {
67
NotificationPanel = new NotificationPanel();
8+
HelpCenter = new HelpCenter();
79

810
workbenchButton = Selector('[data-testid=workbench-page-btn]');
911
analysisPageButton = Selector('[data-testid=analytics-page-btn]');

tests/e2e/pageObjects/help-center-page.ts renamed to tests/e2e/pageObjects/components/navigation/help-center.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Selector } from 'testcafe';
22

3-
export class HelpCenterPage {
3+
export class HelpCenter {
44
//-------------------------------------------------------------------------------------------
55
//DECLARATION OF SELECTORS
66
//*Declare all elements/components of the relevant page.
File renamed without changes.

tests/e2e/pageObjects/shortcuts-page.ts renamed to tests/e2e/pageObjects/components/shortcuts-panel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Selector } from 'testcafe';
22

3-
export class ShortcutsPage {
3+
export class ShortcutsPanel {
44
//-------------------------------------------------------------------------------------------
55
//DECLARATION OF SELECTORS
66
//*Declare all elements/components of the relevant page.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { OnboardingCardsDialog } from './onboarding-cards-dialog';
2+
import { UserAgreementDialog } from './user-agreement-dialog';
3+
4+
export {
5+
OnboardingCardsDialog,
6+
UserAgreementDialog
7+
};

0 commit comments

Comments
 (0)