Skip to content

Commit 15bbcaa

Browse files
committed
fix by pr comment
1 parent 977e01f commit 15bbcaa

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/e2e/common-actions/databases-actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ export class DatabasesActions {
7171
}
7272

7373
/**
74-
* Find file by name starts from directory
74+
* Get files count by name starts from directory
7575
* @param dir The path directory of file
7676
* @param fileStarts The file name should start from
7777
*/
78-
async findFileByFileStarts(dir: string, fileStarts: string): Promise<number> {
78+
async getFileCount(dir: string, fileStarts: string): Promise<number> {
7979
if (fs.existsSync(dir)) {
8080
const matchedFiles: string[] = [];
8181
const files = fs.readdirSync(dir);

tests/e2e/tests/web/critical-path/browser/large-data.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,6 @@ test
118118
// Verify that user can download String key value as txt file when it has > 5000 characters
119119
await t.click(browserPage.downloadAllValueBtn);
120120
// Verify that user can see default file name is “string_value” when downloading String key value
121-
foundStringDownloadedFiles = await databasesActions.findFileByFileStarts(fileDownloadPath, downloadedFile);
121+
foundStringDownloadedFiles = await databasesActions.getFileCount(fileDownloadPath, downloadedFile);
122122
await t.expect(foundStringDownloadedFiles).gt(0, 'String value file not saved');
123123
});

tests/e2e/tests/web/critical-path/monitor/save-commands.e2e.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,22 @@ test('Verify the Profiler Button panel when toggle was switched to ON and user p
9494
});
9595
test('Verify that when user see the toggle is OFF - Profiler logs are not being saved', async t => {
9696
// Remember the number of files in Temp
97-
const numberOfDownloadFiles = await databasesActions.findFileByFileStarts(fileDownloadPath, fileStarts);
97+
const numberOfDownloadFiles = await databasesActions.getFileCount(fileDownloadPath, fileStarts);
9898

9999
// Start Monitor without Save logs
100100
await browserPage.Profiler.startMonitor();
101101
await t.wait(3000);
102102
// Check the download files
103-
await t.expect(await databasesActions.findFileByFileStarts(fileDownloadPath, fileStarts)).eql(numberOfDownloadFiles, 'The Profiler logs are saved');
103+
await t.expect(await databasesActions.getFileCount(fileDownloadPath, fileStarts)).eql(numberOfDownloadFiles, 'The Profiler logs are saved');
104104
});
105105
test('Verify that when user see the toggle is ON - Profiler logs are being saved', async t => {
106106
// Remember the number of files in Temp
107-
const numberOfDownloadFiles = await databasesActions.findFileByFileStarts(fileDownloadPath, fileStarts);
107+
const numberOfDownloadFiles = await databasesActions.getFileCount(fileDownloadPath, fileStarts);
108108

109109
// Start Monitor with Save logs
110110
await browserPage.Profiler.startMonitorWithSaveLog();
111111
// Download logs and check result
112112
await browserPage.Profiler.stopMonitor();
113113
await t.click(browserPage.Profiler.downloadLogButton);
114-
await t.expect(await databasesActions.findFileByFileStarts(fileDownloadPath, fileStarts)).gt(numberOfDownloadFiles, 'The Profiler logs not saved', { timeout: 5000 });
114+
await t.expect(await databasesActions.getFileCount(fileDownloadPath, fileStarts)).gt(numberOfDownloadFiles, 'The Profiler logs not saved', { timeout: 5000 });
115115
});

0 commit comments

Comments
 (0)