-
Notifications
You must be signed in to change notification settings - Fork 404
e2e RI-3637 databases import #1405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vlad-dargel
merged 5 commits into
feature/RI-3637_databases-import
from
e2e/feature/RI-3637_databases-import
Nov 21, 2022
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { t } from 'testcafe'; | ||
import { MyRedisDatabasePage } from '../pageObjects'; | ||
|
||
const myRedisDatabasePage = new MyRedisDatabasePage(); | ||
|
||
export class DatabasesActions { | ||
/** | ||
* Verify that databases are displayed | ||
* @param databases The list of databases to verify | ||
*/ | ||
async verifyDatabasesDisplayed(databases: string[]): Promise<void> { | ||
for (const db of databases) { | ||
const databaseName = myRedisDatabasePage.dbNameList.withText(db); | ||
await t.expect(databaseName.exists).ok(`"${db}" database doesn't exist`); | ||
} | ||
} | ||
|
||
/** | ||
* Import database using file | ||
* @param fileParameters The arguments of imported file | ||
*/ | ||
async importDatabase(fileParameters: ImportDatabaseParameters): Promise<void> { | ||
await t | ||
.click(myRedisDatabasePage.importDatabasesBtn) | ||
.setFilesToUpload(myRedisDatabasePage.importDatabaseInput, [fileParameters.path]) | ||
.click(myRedisDatabasePage.submitImportBtn) | ||
.expect(myRedisDatabasePage.successImportMessage.exists).ok(`Successfully added ${fileParameters.type} databases message not displayed`); | ||
} | ||
|
||
} | ||
|
||
/** | ||
* Import database parameters | ||
* @param path The path to file | ||
* @param type The type of application | ||
* @param dbNames The names of databases | ||
* @param userName The username of db | ||
* @param password The password of db | ||
* @param connectionType The connection type of db | ||
* @param fileName The file name | ||
*/ | ||
export type ImportDatabaseParameters = { | ||
path: string, | ||
type?: string, | ||
dbNames?: string[], | ||
userName?: string, | ||
password?: string, | ||
connectionType?: string, | ||
fileName?: string | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
W3siaG9zdCI6ImxvY2FsaG9zdCIsInBvcnQiOiI2Mzc5IiwiYXV0aCI6InBhc3MiLCJ1c2VybmFtZSI6InVzZXJuYW1lVGVzdCIsIm5hbWUiOiJhcmRtV2l0aFBhc3NBbmRVc2VybmFtZSIsInNlcGFyYXRvciI6IjoiLCJjbHVzdGVyIjpmYWxzZSwia2V5IjoiMTY1MDM3MzUyNTY1MV9naHFwciIsIm9yZGVyIjowfSx7Imhvc3QiOiJhcmRtTm9OYW1lIiwicG9ydCI6IjEyMDAxIiwiYXV0aCI6IiIsInVzZXJuYW1lIjoiIiwic2VwYXJhdG9yIjoiOiIsImNsdXN0ZXIiOmZhbHNlLCJrZXkiOiIxNjUwODk3NjIxNzU0X2I1bjB2Iiwib3JkZXIiOjF9XQ== | ||
vlad-dargel marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
[ | ||
{ | ||
"srvRecords": [ | ||
{ | ||
"priority": null, | ||
"weight": null, | ||
"port": null, | ||
"name": null | ||
} | ||
], | ||
"useSRVRecords": false, | ||
"natMaps": [ | ||
{ | ||
"privateHost": null, | ||
"privatePort": null, | ||
"publicHost": null, | ||
"publicPort": null | ||
} | ||
], | ||
"enableNatMaps": false, | ||
"clusterOptions": { | ||
"slotsRefreshInterval": 5000, | ||
"slotsRefreshTimeout": 1000, | ||
"retryDelayOnTryAgain": 100, | ||
"retryDelayOnClusterDown": 100, | ||
"retryDelayOnFailover": 100, | ||
"retryDelayOnMoved": 0, | ||
"maxRedirections": 16, | ||
"dnsLookup": false, | ||
"scaleReads": "master", | ||
"startupNodes": [ | ||
{ | ||
"host": null, | ||
"port": null | ||
} | ||
] | ||
}, | ||
"enableStartupNodes": false, | ||
"sentinelOptions": { | ||
"tls": { | ||
"key": null, | ||
"keyBookmark": null, | ||
"ca": null, | ||
"caBookmark": null, | ||
"cert": null, | ||
"certBookmark": null | ||
}, | ||
"preferredSlaves": [ | ||
{ | ||
"host": null, | ||
"port": null, | ||
"priority": null | ||
} | ||
], | ||
"role": null, | ||
"sentinelPassword": null, | ||
"name": null | ||
}, | ||
"enablePreferredSlaves": false, | ||
"sshKeyPassphrase": null, | ||
"sshKeyFileBookmark": null, | ||
"sshKeyFile": null, | ||
"sshUser": null, | ||
"sshPort": null, | ||
"sshHost": null, | ||
"ssh": false, | ||
"caCertBookmark": null, | ||
"caCert": null, | ||
"certificateBookmark": null, | ||
"certificate": null, | ||
"keyFileBookmark": null, | ||
"keyFile": null, | ||
"ssl": false, | ||
"default": false, | ||
"star": false, | ||
"totalDb": 16, | ||
"db": 0, | ||
"password": "", | ||
"color": "#4B5563", | ||
"host": "localhost", | ||
"keyPrefix": null, | ||
"type": "standalone", | ||
"id": "f99a5d6d-daf4-489c-885b-6f8e411adbc9" | ||
}, | ||
{ | ||
"srvRecords": [ | ||
{ | ||
"priority": null, | ||
"weight": null, | ||
"port": null, | ||
"name": null | ||
} | ||
], | ||
"useSRVRecords": false, | ||
"natMaps": [ | ||
{ | ||
"privateHost": null, | ||
"privatePort": null, | ||
"publicHost": null, | ||
"publicPort": null | ||
} | ||
], | ||
"enableNatMaps": false, | ||
"clusterOptions": { | ||
"slotsRefreshInterval": 5000, | ||
"slotsRefreshTimeout": 1000, | ||
"retryDelayOnTryAgain": 100, | ||
"retryDelayOnClusterDown": 100, | ||
"retryDelayOnFailover": 100, | ||
"retryDelayOnMoved": 0, | ||
"maxRedirections": 16, | ||
"dnsLookup": false, | ||
"scaleReads": "master", | ||
"startupNodes": [ | ||
{ | ||
"host": null, | ||
"port": null | ||
} | ||
] | ||
}, | ||
"enableStartupNodes": false, | ||
"sentinelOptions": { | ||
"tls": { | ||
"key": null, | ||
"keyBookmark": null, | ||
"ca": null, | ||
"caBookmark": null, | ||
"cert": null, | ||
"certBookmark": null | ||
}, | ||
"preferredSlaves": [ | ||
{ | ||
"host": null, | ||
"port": null, | ||
"priority": null | ||
} | ||
], | ||
"role": null, | ||
"sentinelPassword": null, | ||
"name": null | ||
}, | ||
"enablePreferredSlaves": false, | ||
"sshKeyPassphrase": null, | ||
"sshKeyFileBookmark": null, | ||
"sshKeyFile": null, | ||
"sshUser": null, | ||
"sshPort": null, | ||
"sshHost": null, | ||
"ssh": false, | ||
"caCertBookmark": null, | ||
"caCert": null, | ||
"certificateBookmark": null, | ||
"certificate": null, | ||
"keyFileBookmark": null, | ||
"keyFile": null, | ||
"ssl": false, | ||
"default": false, | ||
"star": false, | ||
"totalDb": 16, | ||
"db": 1, | ||
"password": "vfsd", | ||
"color": "#4B5563", | ||
"port": 1111, | ||
"keyPrefix": null, | ||
"type": "standalone", | ||
"connectionName": "vd", | ||
"id": "f99a5d6d-daf4-489c-885b-6f8e411adbc9", | ||
"cluster": true, | ||
"name": "vd long host" | ||
} | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.