-
Notifications
You must be signed in to change notification settings - Fork 406
e2e - regression tests #322
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
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
db99c41
e2e - regression tests
tanyatrayanava 7bcefca
Merge branch 'main' into feature/e2e-regression
tanyatrayanava 2cab7ad
e2e - regression tests fix
tanyatrayanava d8c92f7
e2e - fix tests
tanyatrayanava 6eb42be
e2e - remove regexp
tanyatrayanava 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
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 |
---|---|---|
|
@@ -2,7 +2,8 @@ import { acceptLicenseTermsAndAddDatabase, deleteDatabase } from '../../../helpe | |
import { | ||
MyRedisDatabasePage, | ||
CliPage, | ||
WorkbenchPage | ||
WorkbenchPage, | ||
BrowserPage | ||
} from '../../../pageObjects'; | ||
import { rte } from '../../../helpers/constants'; | ||
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf'; | ||
|
@@ -12,6 +13,7 @@ const myRedisDatabasePage = new MyRedisDatabasePage(); | |
const workbenchPage = new WorkbenchPage(); | ||
const cliPage = new CliPage(); | ||
const common = new Common(); | ||
const browserPage = new BrowserPage(); | ||
|
||
let keys: string[]; | ||
|
||
|
@@ -38,3 +40,15 @@ test | |
await t.expect(workbenchPage.overviewTotalKeys.exists).ok('User can see total keys'); | ||
await t.expect(workbenchPage.overviewTotalMemory.exists).ok('User can see total memory'); | ||
}); | ||
test | ||
.meta({ rte: rte.standalone }) | ||
.after(async () => { | ||
//Delete database | ||
await deleteDatabase(ossStandaloneConfig.databaseName); | ||
}) | ||
('Verify that user can connect to DB and see breadcrumbs at the top of the application', async t => { | ||
//Verify that user can see breadcrumbs in Browser and Workbench views | ||
await t.expect(browserPage.breadcrumbsContainer.visible).ok('User can see breadcrumbs in Browser page', { timeout: 20000 }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1 line test? couldn't it be covered over lower levels (such as components) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. another verification is added in this test |
||
await t.click(myRedisDatabasePage.workbenchButton); | ||
await t.expect(browserPage.breadcrumbsContainer.visible).ok('User can see breadcrumbs in Workbench page', { timeout: 20000 }); | ||
}); |
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,34 @@ | ||
import { rte } from '../../../helpers/constants'; | ||
import { acceptLicenseTerms } from '../../../helpers/database'; | ||
import { MyRedisDatabasePage, SettingsPage } from '../../../pageObjects'; | ||
import { commonUrl } from '../../../helpers/conf'; | ||
|
||
const myRedisDatabasePage = new MyRedisDatabasePage(); | ||
const settingsPage = new SettingsPage(); | ||
|
||
const explicitErrorHandler = (): void => { | ||
window.addEventListener('error', e => { | ||
if(e.message === 'ResizeObserver loop limit exceeded') { | ||
e.stopImmediatePropagation(); | ||
} | ||
}) | ||
} | ||
|
||
fixture `Browser - Specify Keys to Scan` | ||
.meta({type: 'regression'}) | ||
.page(commonUrl) | ||
.clientScripts({ content: `(${explicitErrorHandler.toString()})()` }) | ||
.beforeEach(async () => { | ||
await acceptLicenseTerms(); | ||
}) | ||
test | ||
.meta({ rte: rte.none }) | ||
('Verify that the user not enter the value less than 500 - the system automatically applies min value if user enters less than min', async t => { | ||
//Go to Settings page | ||
await t.click(myRedisDatabasePage.settingsButton); | ||
//Specify keys to scan less than 500 | ||
await t.click(settingsPage.accordionAdvancedSettings); | ||
await settingsPage.changeKeysToScanValue('100'); | ||
//Verify the applyed scan value | ||
await t.expect(await settingsPage.keysToScanValue.textContent).eql('500', 'The system automatically applies min value 500'); | ||
}); |
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,38 @@ | ||
import { acceptLicenseTermsAndAddDatabase, deleteDatabase } from '../../../helpers/database'; | ||
import { MyRedisDatabasePage } from '../../../pageObjects'; | ||
import { | ||
commonUrl, | ||
ossStandaloneConfig | ||
} from '../../../helpers/conf'; | ||
import { rte } from '../../../helpers/constants'; | ||
import { Chance } from 'chance'; | ||
|
||
const chance = new Chance(); | ||
const myRedisDatabasePage = new MyRedisDatabasePage(); | ||
|
||
const newDatabaseName = chance.word({ length: 10 }); | ||
|
||
fixture `List of Databases` | ||
.meta({ type: 'regression' }) | ||
.page(commonUrl) | ||
.beforeEach(async () => { | ||
await acceptLicenseTermsAndAddDatabase(ossStandaloneConfig, ossStandaloneConfig.databaseName); | ||
}) | ||
test | ||
.meta({ rte: rte.standalone }) | ||
.after(async () => { | ||
//Delete database | ||
await deleteDatabase(newDatabaseName); | ||
}) | ||
('Verify that user can edit DB alias of Standalone DB', async t => { | ||
await t.click(myRedisDatabasePage.myRedisDBButton); | ||
//Edit alias of added database | ||
await myRedisDatabasePage.clickOnEditDBByName(ossStandaloneConfig.databaseName); | ||
await t.click(myRedisDatabasePage.editAliasButton); | ||
await t.typeText(myRedisDatabasePage.aliasInput, newDatabaseName, { replace: true }); | ||
await t.click(myRedisDatabasePage.applyButton); | ||
await t.click(myRedisDatabasePage.submitChangesButton); | ||
//Verify that database has new alias | ||
await t.expect(myRedisDatabasePage.dbNameList.withExactText(newDatabaseName).exists).ok('The database with new alias is in the list', { timeout: 60000 }); | ||
await t.expect(myRedisDatabasePage.dbNameList.withExactText(ossStandaloneConfig.databaseName).exists).notOk('The database with previous alias is not in the list', { timeout: 60000 }); | ||
}); |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a description on top (I see it didn't happen also on functions above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done