Skip to content

Commit 8cc8c6d

Browse files
Gaurav Gandhigandhi-21
authored andcommitted
update test assertions for q doc update flow tests
1 parent fe6b1bb commit 8cc8c6d

File tree

5 files changed

+10
-16
lines changed

5 files changed

+10
-16
lines changed

ui-tests-starter/tst-243+/software/aws/toolkits/jetbrains/uitests/docTests/UpdateReadmeWithLatestChangesFlowTest.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ class UpdateReadmeWithLatestChangesFlowTest {
148148
// required wait time for the system to be fully ready
149149
Thread.sleep(30000)
150150

151-
val result = executePuppeteerScript(updateReadmeLatestChangesTestScript)
152-
assertTrue(result.contains("Test Successful"))
153-
assertFalse(result.contains("Error: Test Failed"))
151+
executePuppeteerScript(updateReadmeLatestChangesTestScript)
154152

155153
val readmePath = Paths.get("tstData", "qdoc", "updateFlow", "README.md")
156154
val readme = File(readmePath.toUri())

ui-tests-starter/tst-243+/software/aws/toolkits/jetbrains/uitests/docTests/UpdateReadmeWithSpecificChangesFlowTest.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,8 @@ class UpdateReadmeWithSpecificChangesFlowTest {
114114
// required wait time for the system to be fully ready
115115
Thread.sleep(30000)
116116

117-
val result = executePuppeteerScript(updateReadmeSpecificChangesTestScript)
118-
assertTrue(result.contains("Test Successful"))
119-
assertFalse(result.contains("Error: Test Failed"))
117+
executePuppeteerScript(updateReadmeSpecificChangesTestScript)
118+
120119
val readmePath = Paths.get("tstData", "qdoc", "updateFlow", "README.md")
121120
val readme = File(readmePath.toUri())
122121
assertTrue(readme.exists())

ui-tests-starter/tst-243+/software/aws/toolkits/jetbrains/uitests/docTests/scripts/UpdateReadmeWithLatestChangesScripts.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,6 @@ val updateReadmeLatestChangesScript = """
9393
await new Promise(resolve => setTimeout(resolve, 90000));
9494
console.log('Attempting to find and click Accept button')
9595
await findAndClickButton(page, 'Accept', true, 10000)
96-
97-
// find and confirm the readme was generated successfully
98-
99-
10096
}
10197
}
10298
@@ -147,7 +143,7 @@ val updateReadmeLatestChangesMakeChangesFlowScript = """
147143
await new Promise(resolve => setTimeout(resolve, 90000));
148144
console.log('Attempting to find and click Make changes button');
149145
await findAndClickButton(page, 'Make changes', true, 10000);
150-
const makeChangeText = await page.${'$'}('[placeholder="Describe documentation changes"]');
146+
const makeChangeText = await page.waitForSelector('[placeholder="Describe documentation changes"]');
151147
if (!makeChangeText) {
152148
console.log('Error: Test Failed');
153149
console.log('Unable to find placeholder description test in Make Changes flow');

ui-tests-starter/tst-243+/software/aws/toolkits/jetbrains/uitests/docTests/scripts/UpdateReadmeWithSpecificChangesScripts.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ val updateReadmeSpecificChangesMakeChangesFlowScript = """
3636
await findAndClickButton(page, 'Yes', true, 10000);
3737
3838
console.log('Typing specific change instructions in the chat window');
39-
await page.type('.mynah-chat-prompt-input', 'Add new section titled Programming Languages which describes the programming languages and version of programming language used in this project.');
39+
await page.type('.mynah-chat-prompt-input', 'Add a section with Installation instructions for this repository. Title this new section \"### Installation\"');
4040
await page.keyboard.press('Enter');
4141
4242
console.log('Waiting for updated README to be generated');
4343
await new Promise(resolve => setTimeout(resolve, 90000));
4444
console.log('Attempting to find and click Make changes button');
4545
await findAndClickButton(page, 'Make changes', true, 10000);
46-
46+
const makeChangeText = await page.waitForSelector('[placeholder="Describe documentation changes"]');
4747
if (!makeChangeText) {
4848
console.log('Error: Test Failed');
4949
console.log('Unable to find placeholder description test in Make Changes flow');
@@ -109,9 +109,6 @@ val updateReadmeSpecificChangesScript = """
109109
110110
console.log('Attempting to find and click Accept button');
111111
await findAndClickButton(page, 'Accept', true, 10000);
112-
113-
// find and confirm the updated readme
114-
115112
}
116113
}
117114
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
rootProject.name = "q-doc-update-ui-test"

0 commit comments

Comments
 (0)