Skip to content

Commit e5a38f7

Browse files
committed
if acknowledge message pop, would click it for user
1 parent a1992af commit e5a38f7

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

ui-tests-starter/tst-243+/software/aws/toolkits/jetbrains/uitests/testTests/QTestGenerationChatTestScripts.kt

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ val testHappyPathScript = """
7070
);
7171
7272
console.log("Input field re-enabled after acceptance")
73+
74+
await page.evaluate(() => {
75+
const acknowledgeButton = Array.from(document.querySelectorAll('button')).find(
76+
button => button.textContent.trim() === 'Acknowledge'
77+
);
78+
if (acknowledgeButton) {
79+
acknowledgeButton.click();
80+
}
81+
});
82+
83+
84+
7385
7486
const feedbackButton = await page.waitForFunction(
7587
(expectedText) => {
@@ -334,6 +346,16 @@ val testRejectPathScript = """
334346
);
335347
336348
console.log("Input field re-enabled after rejection")
349+
350+
await page.evaluate(() => {
351+
const acknowledgeButton = Array.from(document.querySelectorAll('button')).find(
352+
button => button.textContent.trim() === 'Acknowledge'
353+
);
354+
if (acknowledgeButton) {
355+
acknowledgeButton.click();
356+
}
357+
});
358+
337359
const feedbackButton = await page.waitForFunction(
338360
(expectedText) => {
339361
const buttons = document.querySelectorAll('button');
@@ -506,6 +528,7 @@ val testProgressBarScript = """
506528
testNavigation().catch(console.error);
507529
""".trimIndent()
508530

531+
@Language("JavaScript")
509532
val testCancelButtonScript = """
510533
const puppeteer = require('puppeteer');
511534
async function testNavigation() {
@@ -575,6 +598,17 @@ val testCancelButtonScript = """
575598
);
576599
577600
console.log("Input field re-enabled after cancellation")
601+
602+
await page.evaluate(() => {
603+
const acknowledgeButton = Array.from(document.querySelectorAll('button')).find(
604+
button => button.textContent.trim() === 'Acknowledge'
605+
);
606+
if (acknowledgeButton) {
607+
acknowledgeButton.click();
608+
}
609+
});
610+
611+
578612
579613
const feedbackButton = await page.waitForFunction(
580614
(expectedText) => {
@@ -661,6 +695,15 @@ val testDocumentationErrorScript = """
661695
);
662696
663697
console.log("Input field re-enabled after error")
698+
699+
await page.evaluate(() => {
700+
const acknowledgeButton = Array.from(document.querySelectorAll('button')).find(
701+
button => button.textContent.trim() === 'Acknowledge'
702+
);
703+
if (acknowledgeButton) {
704+
acknowledgeButton.click();
705+
}
706+
});
664707
665708
const feedbackButton = await page.waitForFunction(
666709
(expectedText) => {
@@ -746,6 +789,15 @@ val testRemoveFunctionErrorScript = """
746789
747790
console.log("Input field re-enabled after error")
748791
792+
await page.evaluate(() => {
793+
const acknowledgeButton = Array.from(document.querySelectorAll('button')).find(
794+
button => button.textContent.trim() === 'Acknowledge'
795+
);
796+
if (acknowledgeButton) {
797+
acknowledgeButton.click();
798+
}
799+
});
800+
749801
const feedbackButton = await page.waitForFunction(
750802
(expectedText) => {
751803
const buttons = document.querySelectorAll('button');
@@ -830,6 +882,15 @@ val testMethodNotFoundErrorScript = """
830882
831883
console.log("Input field re-enabled after error")
832884
885+
await page.evaluate(() => {
886+
const acknowledgeButton = Array.from(document.querySelectorAll('button')).find(
887+
button => button.textContent.trim() === 'Acknowledge'
888+
);
889+
if (acknowledgeButton) {
890+
acknowledgeButton.click();
891+
}
892+
});
893+
833894
const feedbackButton = await page.waitForFunction(
834895
(expectedText) => {
835896
const buttons = document.querySelectorAll('button');

0 commit comments

Comments
 (0)