Skip to content

Commit e5e3337

Browse files
updated and add tests #3
1 parent 6bccb0a commit e5e3337

File tree

11 files changed

+177
-377
lines changed

11 files changed

+177
-377
lines changed

tests/e2e/pageObjects/components/rdi/pipeline-management-panel.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export class PipelineManagementPanel {
1414
confirmBtn = Selector('[data-testid=delete-confirm-btn]');
1515
jobsPipelineTitle = Selector('[class*=rdi__title]');
1616

17+
configHighlightingIcon = Selector('[data-testid=updated-file-config-highlight]');
18+
1719
/**
1820
* Add Job by name
1921
* @param name job name
-1.54 KB
Binary file not shown.
286 Bytes
Binary file not shown.

tests/e2e/tests/web/critical-path/rdi/add-job.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ const rdiInstance: AddNewRdiParameters = {
1717
name: 'testInstance',
1818
url: 'https://11.111.111.111',
1919
username: 'username',
20-
password: 'v3rY$tronGPa33w0Rd3ECDb'
20+
password: '111'
2121
};
2222

2323
//skip the tests until rdi integration is added
24-
fixture `Add job`
24+
fixture.skip `Add job`
2525
.meta({ type: 'critical_path', feature: 'rdi' })
2626
.page(commonUrl)
2727
.beforeEach(async() => {

tests/e2e/tests/web/critical-path/rdi/add-rdi-instance.e2e.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ const rdiInstance: RdiInstance = {
2222
alias: 'Alias',
2323
url: 'https://11.111.111.111',
2424
username: 'username',
25-
password: 'v3rY$tronGPa33w0Rd3ECDb',
25+
password: '111',
2626
version: '1.2'
2727
};
2828
const rdiInstance2: RdiInstance = {
2929
alias: 'test',
3030
url: 'https://11.111.111.111',
3131
username: 'name',
32-
password: 'v3rY$tronGPa33w0Rd3ECDb',
32+
password: '111',
3333
version: '1.2'
3434
};
3535

3636
const rdiInstance3: RdiInstance = {
3737
alias: 'first',
3838
url: 'https://11.111.111.111',
3939
username: 'name',
40-
password: 'v3rY$tronGPa33w0Rd3ECDb',
40+
password: '111',
4141
version: '1.2'
4242
};
4343
//skip the tests until rdi integration is added
4444

45-
fixture `Rdi instance`
45+
fixture.skip `Rdi instance`
4646
.meta({ type: 'critical_path', feature: 'rdi' })
4747
.page(commonUrl)
4848
.beforeEach(async() => {

tests/e2e/tests/web/critical-path/rdi/configuration.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ const rdiInstance: AddNewRdiParameters = {
2828
name: 'testInstance',
2929
url: 'https://11.111.111.111',
3030
username: 'username',
31-
password: 'v3rY$tronGPa33w0Rd3ECDb'
31+
password: '111'
3232
};
3333

3434
const getPageUrl = ClientFunction(() => window.location.href);
3535

3636
const filePath = path.join('..', '..', '..', '..', 'test-data', 'rdi', 'RDI_pipelineConfigurations.zip');
3737

3838
//skip the tests until rdi integration is added
39-
fixture `Pipeline`
39+
fixture.skip `Pipeline`
4040
.meta({ type: 'critical_path', feature: 'rdi' })
4141
.page(commonUrl)
4242
.beforeEach(async() => {
@@ -129,7 +129,7 @@ test('Verify that link on configuration is valid', async() => {
129129
await goBackHistory();
130130
});
131131

132-
test.only('Verify that user can insert template', async() => {
132+
test('Verify that user can insert template', async() => {
133133
const disabledAttribute = 'isDisabled';
134134
const defaultValue = 'ingest';
135135
const templateWords = 'type: mysql';

tests/e2e/tests/web/critical-path/rdi/dry-run-job.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const rdiInstance: AddNewRdiParameters = {
2121
name: 'testInstance',
2222
url: 'https://11.111.111.111',
2323
username: 'username',
24-
password: 'v3rY$tronGPa33w0Rd3ECDb'
24+
password: '111'
2525
};
2626
const filePath = path.join('..', '..', '..', '..', 'test-data', 'rdi', 'RDI_pipelineJobValid.zip');
2727

tests/e2e/tests/web/critical-path/rdi/navigation.e2e.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ const databaseAPIRequests = new DatabaseAPIRequests();
2222

2323
const rdiInstance: AddNewRdiParameters = {
2424
name: 'testInstance',
25-
url: 'http://localhost:4000',
25+
url: 'https://54.175.165.214',
2626
username: 'username',
27-
password: 'password'
27+
password: '111'
2828
};
2929

3030
//skip the tests until rdi integration is added
@@ -55,37 +55,34 @@ test.before(async() => {
5555
await rdiInstancePage.selectStartPipelineOption(RdiPopoverOptions.Pipeline);
5656

5757
await t.click(rdiInstancePage.NavigationPanel.myRedisDBButton);
58+
await t.click(rdiInstancePage.proceedNavigateDialog);
5859
await t.click(rdiInstancePage.NavigationPanel.managementPageButton);
5960
await t.expect(rdiInstancePage.RdiHeader.uploadFromFileButton.exists).ok('rdi instance page is opened');
6061
const rdiName = rdiInstancePage.RdiHeader.rdiNameLinkBreadcrumbs.textContent;
6162
await t.expect(rdiName).eql(rdiInstance.name, 'instance name in breadcrumbs is not correct');
6263

6364
await rdiInstancePage.selectStartPipelineOption(RdiPopoverOptions.Pipeline);
6465
await t.click(rdiInstancePage.NavigationPanel.myRedisDBButton);
66+
await t.click(rdiInstancePage.proceedNavigateDialog);
6567
await myRedisDatabasePage.setActivePage(RedisOverviewPage.DataBase);
6668
count = await myRedisDatabasePage.NavigationPanel.getButtonsCount();
6769
await t.expect(count).eql(3, 'rdi buttons is displayed');
6870
});
6971

70-
// TODO should be updated
7172
test('Verify that context is saved after navigation panel', async() => {
72-
// check that tab is not highlighted
73-
let classes = await rdiInstancePage.PipelineManagementPanel.configurationTab.getAttribute('class');
74-
await t.expect(classes?.split(' ').length).eql(1, 'the tab is selected');
75-
await t.click(rdiInstancePage.PipelineManagementPanel.configurationTab);
73+
await t.click(rdiInstancePage.NavigationPanel.statusPageButton);
7674

7775
await t.click(rdiInstancePage.RdiHeader.breadcrumbsLink);
7876
await rdiInstancesListPage.clickRdiByName(rdiInstance.name);
79-
await t.expect(rdiInstancePage.selectOptionDialog.exists).notOk('the context is not saved');
80-
classes = await rdiInstancePage.PipelineManagementPanel.configurationTab.getAttribute('class');
81-
await t.expect(classes?.split(' ').length).eql(2, 'the tab is not selected');
77+
// TODO add verification that status page is opened
78+
await t.expect(rdiInstancePage.PipelineManagementPanel.configurationTab.exists).notOk('status page is not opened');
8279
});
8380

8481
test('Verify that Insight and Sign in buttons are displayed ', async() => {
85-
await t.expect(rdiInstancePage.RdiHeader.InsightsPanel.getInsightsPanel().exists).ok('Insight panel is not exist');
82+
await t.expect(rdiInstancePage.RdiHeader.InsightsPanel.explorePanelButton.exists).ok('Insight panel is not exist');
8683
await rdiInstancePage.RdiHeader.InsightsPanel.togglePanel(true);
8784
const tab = await rdiInstancePage.RdiHeader.InsightsPanel.getActiveTabName();
88-
await t.expect(tab).eql('Explore');
85+
await t.expect(tab).eql('Tutorials');
8986
await t.expect(rdiInstancePage.RdiHeader.cloudSignInButton.exists).ok('sight in button is not exist');
9087
});
9188

tests/e2e/tests/web/critical-path/rdi/pipeline.e2e.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ const databaseHelper = new DatabaseHelper();
2323
let foundExportedFiles: string[];
2424

2525
const filePathes = {
26-
successful: path.join('..', '..', '..', '..', 'test-data', 'rdi', 'RDIPipeline.zip'),
2726
unsuccessful: path.join('..', '..', '..', '..', 'test-data', 'rdi', 'UnsuccessRDI_Pipeline.zip'),
28-
fullPipeline: path.join('..', '..', '..', '..', 'test-data', 'rdi', 'RDI_pipelineConfig.zip')
27+
fullPipeline: path.join('..', '..', '..', '..', 'test-data', 'rdi', 'RDI_pipelineConfigurations.zip')
2928
};
3029
const rdiInstance: AddNewRdiParameters = {
3130
name: 'testInstance',
32-
url: 'https://54.175.165.214',
31+
url: 'https://11.111.111.111',
3332
username: 'username',
34-
password: 'v3rY$tronGPa33w0Rd3ECDb'
33+
password: '111'
3534
};
3635

3736
//skip the tests until rdi integration is added
@@ -48,19 +47,16 @@ fixture.skip `Pipeline`
4847
.afterEach(async() => {
4948
await rdiApiRequests.deleteAllRdiApi();
5049
});
51-
test('Verify that new changes are highlight', async() => {
50+
test('Verify that new changes are highlight in the files', async() => {
5251
const text = 'text';
5352

54-
await rdiInstancePage.selectStartPipelineOption(RdiPopoverOptions.Pipeline);
55-
await t.click(rdiInstancePage.templateCancelButton);
56-
let testId = await rdiInstancePage.PipelineManagementPanel.configurationTabLink.getAttribute('data-testid');
57-
await t.expect(testId).notContains('updated', 'config text was not changed');
53+
await rdiInstancePage.selectStartPipelineOption(RdiPopoverOptions.Server);
54+
await t.expect(rdiInstancePage.PipelineManagementPanel.configHighlightingIcon.exists).notOk('highlighted changes icon is displayed ');
5855

5956
await rdiInstancePage.MonacoEditor.sendTextToMonaco(rdiInstancePage.configurationInput, text);
6057
const enteredText = await rdiInstancePage.MonacoEditor.getTextFromMonaco();
6158
await t.expect(enteredText).eql(text, 'config text was not changed');
62-
testId = await rdiInstancePage.PipelineManagementPanel.configurationTabLink.getAttribute('data-testid');
63-
await t.expect(testId).contains('updated', 'config text was not changed');
59+
await t.expect(rdiInstancePage.PipelineManagementPanel.configHighlightingIcon.exists).ok('highlighted changes icon is not displayed ');
6460
});
6561

6662
// https://redislabs.atlassian.net/browse/RI-5199
@@ -132,10 +128,10 @@ test
132128

133129
// https://redislabs.atlassian.net/browse/RI-5143
134130
test('Verify that user can import pipeline', async() => {
135-
const expectedText = 'Uploaded';
131+
const expectedText = 'sources';
136132
// check success uploading
137133
await rdiInstancePage.selectStartPipelineOption(RdiPopoverOptions.File);
138-
await rdiInstancePage.RdiHeader.uploadPipeline(filePathes.successful);
134+
await rdiInstancePage.RdiHeader.uploadPipeline(filePathes.fullPipeline);
139135
await t.click(rdiInstancePage.okUploadPipelineBtn);
140136
const updatedText = await rdiInstancePage.MonacoEditor.getTextFromMonaco();
141137
await t.expect(updatedText).contains(expectedText, 'config text was not updated');

tests/e2e/tests/web/critical-path/rdi/status.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const rdiInstance: AddNewRdiParameters = {
2222
password: 'password'
2323
};
2424

25-
//skip the tests until rdi integration is added
25+
//skip the tests until understand if the server will be able to sent status data
2626
fixture.skip `Pipeline`
2727
.meta({ type: 'critical_path' })
2828
.page(commonUrl)

0 commit comments

Comments
 (0)