|
1 | 1 | import { ExploreTabs, rte } from '../../../../helpers/constants';
|
2 | 2 | import { DatabaseHelper } from '../../../../helpers/database';
|
3 |
| -import { MyRedisDatabasePage, WorkbenchPage } from '../../../../pageObjects'; |
| 3 | +import { BrowserPage, MyRedisDatabasePage, WorkbenchPage } from '../../../../pageObjects'; |
4 | 4 | import { commonUrl, ossStandaloneConfig } from '../../../../helpers/conf';
|
5 | 5 | import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
|
6 | 6 |
|
7 | 7 | const myRedisDatabasePage = new MyRedisDatabasePage();
|
8 | 8 | const workbenchPage = new WorkbenchPage();
|
9 | 9 | const databaseHelper = new DatabaseHelper();
|
10 | 10 | const databaseAPIRequests = new DatabaseAPIRequests();
|
| 11 | +const browserPage = new BrowserPage(); |
11 | 12 |
|
12 | 13 | fixture `Default scripts area at Workbench`
|
13 | 14 | .meta({ type: 'regression', rte: rte.standalone })
|
@@ -42,16 +43,29 @@ test('Verify that user can see the [Manual] option in the Enablement area', asyn
|
42 | 43 | }
|
43 | 44 | });
|
44 | 45 | test('Verify that user can see saved article in Enablement area when he leaves Workbench page and goes back again', async t => {
|
| 46 | + const tooltipText = 'Open Workbench in the left menu to see the command results.'; |
45 | 47 | await workbenchPage.InsightsPanel.togglePanel(true);
|
46 | 48 | const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
|
47 | 49 | await t.click(tutorials.documentButtonInQuickGuides);
|
48 | 50 | await t.expect(tutorials.internalLinkWorkingWithHashes.visible).ok('The working with hachs link is not visible', { timeout: 5000 });
|
49 | 51 | // Open Working with Hashes section
|
50 | 52 | await t.click(tutorials.internalLinkWorkingWithHashes);
|
| 53 | + let selector = tutorials.getRunSelector('Create'); |
| 54 | + |
| 55 | + // https://redislabs.atlassian.net/browse/RI-5340 |
| 56 | + // Verify that user can see “Open Workbench in the left menu to see the command results.” tooltip when hovering over Run button |
| 57 | + await t.hover(selector); |
| 58 | + await t.expect(browserPage.tooltip.textContent).eql(tooltipText, 'Tooltip is not displayed or text is invalid'); |
| 59 | + |
51 | 60 | // Check the button from Hash page is visible
|
52 | 61 | await tutorials.runBlockCode('Create');
|
53 |
| - let selector = await tutorials.getRunSelector('Create'); |
54 | 62 | await t.expect(selector.visible).ok('The end of the page is not visible');
|
| 63 | + |
| 64 | + // Verify that user can see the “success” icon during 5 s after a command has been run and button can't be clicked at that time |
| 65 | + await t.expect(selector.withAttribute('disabled').exists).ok('Run button is not disabled', { timeout: 5000 }); |
| 66 | + await t.wait(5000); |
| 67 | + await t.expect(selector.withAttribute('disabled').exists).notOk('Run button is still disabled'); |
| 68 | + |
55 | 69 | // Go to Browser page
|
56 | 70 | await t.click(myRedisDatabasePage.NavigationPanel.browserButton);
|
57 | 71 | // Go back to Workbench page
|
@@ -127,7 +141,7 @@ test('Verify that the same type of content is supported in the “Tutorials” a
|
127 | 141 | 'Redis for time series',
|
128 | 142 | 'Probabilistic data structures'
|
129 | 143 | ];
|
130 |
| - const command = 'HSET bikes:10000 '; |
| 144 | + // const command = 'HSET bikes:10000 '; |
131 | 145 |
|
132 | 146 | // Verify the redis stack links
|
133 | 147 | await workbenchPage.InsightsPanel.togglePanel(true);
|
|
0 commit comments