-
Notifications
You must be signed in to change notification settings - Fork 8
Add ui test for Oauth (AST-89331) #1080
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: main
Are you sure you want to change the base?
Add ui test for Oauth (AST-89331) #1080
Conversation
Great job, no security vulnerabilities found in this Pull Request |
const radioButtons = await webView.findWebElements(By.css("input[type='radio']")); | ||
console.log(`Found ${radioButtons.length} radio buttons`); | ||
|
||
// Additional test code... |
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.
where is the test code?
what exactly are we testing here?
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.
It tests the logout button, meaning it clicks on it and then clicks "yes" in the dialog message that appears.
Additionally, after logging out, it checks that there are two buttons:
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.
I added to the test that if the user wasn't logged in, it should first log in and then perform a logout to test this process.
The test also verifies the fields for both OAuth and API Key authentication methods.
await new EditorView().closeAllEditors(); | ||
}); | ||
|
||
it("should open OAuth authentication panel and verify UI elements", retryTest(async 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.
refactor this test and extract code to separate function in order to make it shorter and more readble.
You also have some duplicate code that you can extract into separate function.
example for duplicated code:
await new EditorView().closeAllEditors();
await bench.executeCommand(CX_AUTHENTICATION_COMMAND);
await sleep(3000);
await new EditorView().openEditor("Checkmarx One Authentication");
await webView.switchToFrame(5000);
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.
i Split into multiple tests and manage the duplicate code
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!
Description
References
Testing
Checklist