Skip to content

Commit ce04171

Browse files
refactoring bulkActions
1 parent 8a9a577 commit ce04171

File tree

8 files changed

+83
-159
lines changed

8 files changed

+83
-159
lines changed

tests/e2e/pageObjects/browser-page.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { t, Selector } from 'testcafe';
22
import { Common } from '../helpers/common';
33
import { InstancePage } from './instance-page';
4+
import { BulkActions } from './components/browser';
45

56
export class BrowserPage extends InstancePage {
7+
BulkActions = new BulkActions();
8+
69
//CSS Selectors
710
cssSelectorGrid = '[aria-label="grid"]';
811
cssSelectorRows = '[aria-label="row"]';

tests/e2e/pageObjects/bulk-actions-page.ts renamed to tests/e2e/pageObjects/components/browser/bulk-actions.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { Selector, t } from 'testcafe';
2-
import { BrowserPage } from './browser-page';
32

4-
const browserPage = new BrowserPage();
5-
6-
export class BulkActionsPage {
3+
export class BulkActions {
74
//-------------------------------------------------------------------------------------------
85
//DECLARATION OF SELECTORS
96
//*Declare all elements/components of the relevant page.
@@ -41,12 +38,10 @@ export class BulkActionsPage {
4138
bulkUploadInput = Selector('[data-testid=bulk-upload-file-input]');
4239

4340
/**
44-
* Open Bulk Actions and confirm deletion
45-
*/
41+
* Open Bulk Actions and confirm deletion
42+
*/
4643
async startBulkDelete(): Promise<void> {
47-
// TODO remove dep from browser page
4844
await t
49-
.click(browserPage.bulkActionsButton)
5045
.click(this.actionButton)
5146
.click(this.bulkApplyButton);
5247
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { BulkActions } from './bulk-actions';
2+
3+
export {
4+
BulkActions
5+
};

tests/e2e/pageObjects/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { AddRedisDatabasePage } from './add-redis-database-page';
22
import { AutoDiscoverREDatabases } from './auto-discover-redis-enterprise-databases';
33
import { BrowserPage } from './browser-page';
4-
import { BulkActionsPage } from './bulk-actions-page';
54
import { MyRedisDatabasePage } from './my-redis-databases-page';
65
import { SettingsPage } from './settings-page';
76
import { UserAgreementPage } from './user-agreement-page';
@@ -19,7 +18,6 @@ export {
1918
AddRedisDatabasePage,
2019
AutoDiscoverREDatabases,
2120
BrowserPage,
22-
BulkActionsPage,
2321
MyRedisDatabasePage,
2422
SettingsPage,
2523
UserAgreementPage,

tests/e2e/pageObjects/notification-page.ts

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)