-
Notifications
You must be signed in to change notification settings - Fork 383
RI-6570 Verify read operations for all key types in the browsers module #4723
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
base: feature/RI-6570/PlayWright
Are you sure you want to change the base?
RI-6570 Verify read operations for all key types in the browsers module #4723
Conversation
* extend the API to support adding string keys * extend browser page locators to provide helper for checking the state of the keys details drawer * added e2e test to verify whether the information related to a string key is proplery displayed in the details drawer re #RI-6570
Code Coverage - Backend unit tests
Test suite run success2941 tests passing in 286 suites. Report generated by 🧪jest coverage report action from 76052ac |
* extend the API to support adding ttl to the hash keys * extend browser page locators to provide helper for checking the state of the hash keys details drawer * added e2e test to verify whether the information related to a hash key is proplery displayed in the details drawer re #RI-6570
* extend the API to support adding list keys * extend browser page locators to provide helper for checking the state of the list keys details drawer * added e2e test to verify whether the information related to a list key is proplery displayed in the details drawer re #RI-6570
1c596e2
to
f551b57
Compare
Code Coverage - Frontend unit tests
Test suite run success4792 tests passing in 628 suites. Report generated by 🧪jest coverage report action from 0b2f581 |
* extend the API to support adding ttl to set keys * extend browser page locators to provide helper for checking the state of the set keys details drawer * added e2e test to verify whether the information related to a set key is proplery displayed in the details drawer re #RI-6570
* extend the API to support adding sorted set keys * extend browser page locators to provide helper for checking the state of the sorted set keys details drawer * added e2e test to verify whether the information related to a sorted set key is proplery displayed in the details drawer re #RI-6570
* extend the API to support adding json keys * added e2e test to verify whether the information related to a json key is proplery displayed in the details drawer re #RI-6570
* extend the API to support adding ttl to stream keys * extend browser page locators to provide helper for checking the state of the stream keys details drawer * added e2e test to verify whether the information related to a stream key is proplery displayed in the details drawer re #RI-6570
… to read re #RI-6570
const requestBody = { | ||
keyName: Buffer.from(keyParameters.keyName, 'utf-8'), | ||
members: keyParameters.members.map((member) => ({ | ||
name: Buffer.from(member.name, 'utf-8'), |
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.
Buffer.from(member.name, 'utf-8')
can be probably abstracted as a helper function
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 👍
async isKeyDetailsClosed(): Promise<boolean> { | ||
try { | ||
// Give a small moment for UI transitions to complete | ||
await this.page.waitForTimeout(100) |
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.
this is flaky. Better wait for an element to show
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.
Totally agree, fixed.
} | ||
} | ||
|
||
async getKeyTTL(): Promise<string | null> { |
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.
there is function declared in constructor with very similar name.
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.
Nice catch, refactored.
- remove fixed timeouts causing flaky results sometimes - export common logic for building string buffers and reuse it, as a helper function - cleanup unncesessary helper frunction in the browser objects
Description
Add new E2E tests to check the read functionality for different key types in the Browsers module. These tests make sure that when you click on a key, all its details show up correctly in the Details Panel (name, value(s), TTL, etc.).
How the tests work
Code Changes
How to run the tests
You can always refer to the README, but simply running the following command should do the trick for you