Skip to content

Commit ea5a9e7

Browse files
author
ALENA NABOKA
committed
debug
1 parent a5c6d9d commit ea5a9e7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tests/e2e/pageObjects/cli-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class CliPage {
8585
* @param keyCommand The command from cli to add key
8686
* @param amount The amount of the keys
8787
*/
88-
async addKeysFromCliWithDelimiter(keyCommand: string, amount: number): Promise<void> {
88+
async addKeysFromCliWithDelimiter(keyCommand: string, amount: number): Promise<void> {
8989
//Open CLI
9090
await t.click(this.cliExpandButton);
9191
//Add keys
@@ -99,7 +99,7 @@ export class CliPage {
9999
* Delete keys from CLI with delimiter
100100
* @param amount The amount of the keys
101101
*/
102-
async deleteKeysFromCliWithDelimiter(amount: number): Promise<void> {
102+
async deleteKeysFromCliWithDelimiter(amount: number): Promise<void> {
103103
//Open CLI
104104
await t.click(this.cliExpandButton);
105105
//Add keys

tests/e2e/tests/critical-path/memory-efficiency/memory-efficiency.e2e.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,23 @@ test.only
223223
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
224224
})('Analysis history', async t => {
225225
const numberOfKeys = [];
226+
const dbSize = (await cliPage.getSuccessCommandResultFromCli('dbsize')).split(' ');
227+
console.log(`dbSize: ${dbSize}`);
228+
const existedNumberOfKeys = parseInt(dbSize[dbSize.length - 1]);
229+
console.log(`existedNumberOfKeys: ${existedNumberOfKeys}`);
226230
for (let i = 0; i < 6; i++) {
227231
await cliPage.sendCommandInCli(`set ${keyNamesReport[i]} ${chance.word()}`);
228232
await t.click(memoryEfficiencyPage.newReportBtn);
233+
const compareValue = parseInt(await memoryEfficiencyPage.donutTotalKeys.sibling(1).textContent);
234+
await t.expect(compareValue).eql((existedNumberOfKeys + i + 1), 'New report is not displayed', { timeout: 2000 });
229235
numberOfKeys.push(await memoryEfficiencyPage.donutTotalKeys.sibling(1).textContent);
230236
}
231237
await t.click(memoryEfficiencyPage.selectedReport);
232238
// Verify that user can see up to the 5 most recent previous results per database in the history
233239
await t.expect(memoryEfficiencyPage.reportItem.count).eql(5, 'Number of saved reports is not correct');
234240
// Verify that user can switch between reports and see all data updated in each report
241+
console.log(`numberOfKeys in generated report: ${numberOfKeys}`);
235242
for (let i = 0; i < 5; i++) {
236-
// await t.debug();
237243
await t.click(memoryEfficiencyPage.reportItem.nth(i));
238244
const actualNumber = await memoryEfficiencyPage.donutTotalKeys.sibling(1).textContent;
239245
console.log(`actualNumber: ${actualNumber}`);

0 commit comments

Comments
 (0)