-
Notifications
You must be signed in to change notification settings - Fork 274
test(qdoc): Add ui tests for qdoc update readme flow #5435
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
Conversation
56730c2 to
8cc8c6d
Compare
...re/aws/toolkits/jetbrains/uitests/docTests/scripts/UpdateReadmeWithSpecificChangesScripts.kt
Show resolved
Hide resolved
...etbrains/uitests/docTests/updateReadmeTests/UpdateReadmeLatestChanges/MakeChangesFlowTest.kt
Outdated
Show resolved
Hide resolved
...etbrains/uitests/docTests/updateReadmeTests/UpdateReadmeLatestChanges/MakeChangesFlowTest.kt
Outdated
Show resolved
Hide resolved
...brains/uitests/docTests/updateReadmeTests/UpdateReadmeSpecificChanges/MakeChangesFlowTest.kt
Show resolved
Hide resolved
...brains/uitests/docTests/updateReadmeTests/UpdateReadmeSpecificChanges/MakeChangesFlowTest.kt
Show resolved
Hide resolved
|
/retryBuilds |
| const contents = await page.evaluate(el => el.innerHTML, await page.${'$'}(':root')); | ||
|
|
||
| const element = await page.${'$'}('.mynah-chat-prompt-input'); | ||
| if(element) { | ||
|
|
||
| console.log('Typing /doc in the chat window'); | ||
|
|
||
| await page.type('.mynah-chat-prompt-input', '/doc'); | ||
| await page.keyboard.press('Enter'); | ||
|
|
||
| console.log('Attempting to find and click Update an existing README button'); | ||
| await findAndClickButton(page, 'Update an existing README', true, 10000); | ||
| console.log('Attempting to find and click Update README to reflect code button'); | ||
| await findAndClickButton(page, 'Update README to reflect code', true, 10000); |
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.
These few lines appear to be repeated in most tests, can they be abstracted?
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.
abstracting parts of the testing flow can cause issues while trying to read and debug code for someone unfamiliar. So we should keep testing scripts as is to understand what's happening in the test without needing to jump around.
| package software.aws.toolkits.jetbrains.uitests.docTests.scripts | ||
|
|
||
| // language=TS | ||
| val findAndClickButtonScript = """ |
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 awesome! Maybe could be moved to a common utils file so other teams can also use it
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.
sure, doesn't seem blocking though, i can do that in a followup
...sts-starter/tst-243+/software/aws/toolkits/jetbrains/uitests/docTests/scripts/ScriptUtils.kt
Show resolved
Hide resolved
...e/aws/toolkits/jetbrains/uitests/docTests/updateReadmeTests/UpdateReadmeLatestChangesTest.kt
Show resolved
Hide resolved
|
/runUiTests |
…to JS (followups from aws#5435)
…to JS (followups from aws#5435)
Add UI tests to validate the Update an existing README flow
Created a sample repository from scratch,
For Update README to reflect code flow, there are 3 tests which confirm that the user is
Shown the option to confirm / change folder / cancel on selecting the update options
Shown the Update with specific changes flow when selecting Make Changes upon getting updated readme back
The Readme updates with the latest changes
For Make a specific change flow, there are 2 tests which confirm that the user is
Shown the Update with specific changes flow when selecting Make Changes upon getting updated readme back
The Readme is updated with the specific changes requested
* test(qdoc): initial tests for latest code changes flow
* update tstData to test
* update scripts + move test data to subfolder for update readme tests
* update instructions in update readme with specific changes test
* update base readme for testing the update readme flow
* update test assertions for q doc update flow tests
* separate out test cases into individual tests
* remove gradle settings file for q doc update flow test repo
* log result from scripts for debugging
* manually restore readme after each test run
* add end of assertions println for debugging + update readme
* update q tests config for debugging
* update config and rename dummy repo files for create readme tests
* update build file for create readme tests sample repo
* update to print the result on failures only
* remove unused file from test dummy repo
---------
Co-authored-by: Gaurav Gandhi <[email protected]>
Add UI tests to validate the Update an existing README flow
Created a sample repository from scratch,
For Update README to reflect code flow, there are 3 tests which confirm that the user is
Shown the option to confirm / change folder / cancel on selecting the update options
Shown the Update with specific changes flow when selecting Make Changes upon getting updated readme back
The Readme updates with the latest changes
For Make a specific change flow, there are 2 tests which confirm that the user is
Shown the Update with specific changes flow when selecting Make Changes upon getting updated readme back
The Readme is updated with the specific changes requested
* test(qdoc): initial tests for latest code changes flow
* update tstData to test
* update scripts + move test data to subfolder for update readme tests
* update instructions in update readme with specific changes test
* update base readme for testing the update readme flow
* update test assertions for q doc update flow tests
* separate out test cases into individual tests
* remove gradle settings file for q doc update flow test repo
* log result from scripts for debugging
* manually restore readme after each test run
* add end of assertions println for debugging + update readme
* update q tests config for debugging
* update config and rename dummy repo files for create readme tests
* update build file for create readme tests sample repo
* update to print the result on failures only
* remove unused file from test dummy repo
---------
Co-authored-by: Gaurav Gandhi <[email protected]>
…to JS (followups from aws#5435)
* move findAndClickButton to common ScriptUtils & update script syntax to JS (followups from #5435) * initial commit: add qdoc create readme tests --------- Co-authored-by: Gaurav Gandhi <[email protected]>
Types of changes
Description
Add UI tests to validate the
Update an existing READMEflowCreated a sample repository from scratch,
For
Update README to reflect codeflow, there are 3 tests which confirm that the user isconfirm / change folder / cancelon selecting the update optionsUpdate with specific changesflow when selectingMake Changesupon getting updated readme backFor
Make a specific changeflow, there are 2 tests which confirm that the user isUpdate with specific changesflow when selectingMake Changesupon getting updated readme backChecklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.