@@ -82,23 +82,23 @@ val testHappyPathScript = """
8282
8383
8484
85- const feedbackButton = await page.waitForFunction(
86- (expectedText) => {
87- const buttons = document.querySelectorAll('button');
88- return Array.from(buttons).find(button =>
89- button.textContent.includes(expectedText)
90- );
91- },
92- {timeout: 4000000},
93- "How can we make /test better"
94- );
95-
96- if (feedbackButton){
97- console.log("Feedback button found with correct text")
98- }else{
99- console.log("Feedback button not found")
100- throw new Error('Feedback button not found');
101- }
85+ // const feedbackButton = await page.waitForFunction(
86+ // (expectedText) => {
87+ // const buttons = document.querySelectorAll('button');
88+ // return Array.from(buttons).find(button =>
89+ // button.textContent.includes(expectedText)
90+ // );
91+ // },
92+ // {timeout: 4000000},
93+ // "How can we make /test better"
94+ // );
95+ //
96+ // if (feedbackButton){
97+ // console.log("Feedback button found with correct text")
98+ // }else{
99+ // console.log("Feedback button not found")
100+ // throw new Error('Feedback button not found');
101+ // }
102102 } catch (e) {
103103 console.log("Element with text not found")
104104 console.log(e)
@@ -352,23 +352,23 @@ val testRejectPathScript = """
352352
353353 console.log("Input field re-enabled after rejection")
354354
355- const feedbackButton = await page.waitForFunction(
356- (expectedText) => {
357- const buttons = document.querySelectorAll('button');
358- return Array.from(buttons).find(button =>
359- button.textContent.includes(expectedText)
360- );
361- },
362- {timeout: 4000000},
363- "How can we make /test better"
364- );
365-
366- if (feedbackButton){
367- console.log("Feedback button found with correct text")
368- }else{
369- console.log("Feedback button not found")
370- throw new Error('Feedback button not found');
371- }
355+ // const feedbackButton = await page.waitForFunction(
356+ // (expectedText) => {
357+ // const buttons = document.querySelectorAll('button');
358+ // return Array.from(buttons).find(button =>
359+ // button.textContent.includes(expectedText)
360+ // );
361+ // },
362+ // {timeout: 4000000},
363+ // "How can we make /test better"
364+ // );
365+ //
366+ // if (feedbackButton){
367+ // console.log("Feedback button found with correct text")
368+ // }else{
369+ // console.log("Feedback button not found")
370+ // throw new Error('Feedback button not found');
371+ // }
372372
373373 } catch (e) {
374374 console.log("Element with text not found")
@@ -602,23 +602,23 @@ val testCancelButtonScript = """
602602
603603 console.log("Input field re-enabled after cancellation")
604604
605- const feedbackButton = await page.waitForFunction(
606- (expectedText) => {
607- const buttons = document.querySelectorAll('button');
608- return Array.from(buttons).find(button =>
609- button.textContent.includes(expectedText)
610- );
611- },
612- {timeout: 4000000},
613- "How can we make /test better"
614- );
615-
616- if (feedbackButton){
617- console.log("Feedback button found with correct text")
618- }else{
619- console.log("Feedback button not found")
620- throw new Error('Feedback button not found');
621- }
605+ // const feedbackButton = await page.waitForFunction(
606+ // (expectedText) => {
607+ // const buttons = document.querySelectorAll('button');
608+ // return Array.from(buttons).find(button =>
609+ // button.textContent.includes(expectedText)
610+ // );
611+ // },
612+ // {timeout: 4000000},
613+ // "How can we make /test better"
614+ // );
615+ //
616+ // if (feedbackButton){
617+ // console.log("Feedback button found with correct text")
618+ // }else{
619+ // console.log("Feedback button not found")
620+ // throw new Error('Feedback button not found');
621+ // }
622622
623623
624624
@@ -694,23 +694,23 @@ val testDocumentationErrorScript = """
694694
695695 console.log("Input field re-enabled after error")
696696
697- const feedbackButton = await page.waitForFunction(
698- (expectedText) => {
699- const buttons = document.querySelectorAll('button');
700- return Array.from(buttons).find(button =>
701- button.textContent.includes(expectedText)
702- );
703- },
704- { timeout: 4000000 },
705- "How can we make /test better"
706- );
707-
708- if (feedbackButton){
709- console.log("Feedback button found with correct text after error")
710- }else{
711- console.log("Feedback button not found")
712- throw new Error('Feedback button not found');
713- }
697+ // const feedbackButton = await page.waitForFunction(
698+ // (expectedText) => {
699+ // const buttons = document.querySelectorAll('button');
700+ // return Array.from(buttons).find(button =>
701+ // button.textContent.includes(expectedText)
702+ // );
703+ // },
704+ // { timeout: 4000000 },
705+ // "How can we make /test better"
706+ // );
707+ //
708+ // if (feedbackButton){
709+ // console.log("Feedback button found with correct text after error")
710+ // }else{
711+ // console.log("Feedback button not found")
712+ // throw new Error('Feedback button not found');
713+ // }
714714
715715 } catch (e) {
716716 console.log("Test failed")
@@ -784,23 +784,23 @@ val testRemoveFunctionErrorScript = """
784784
785785 console.log("Input field re-enabled after error")
786786
787- const feedbackButton = await page.waitForFunction(
788- (expectedText) => {
789- const buttons = document.querySelectorAll('button');
790- return Array.from(buttons).find(button =>
791- button.textContent.includes(expectedText)
792- );
793- },
794- {timeout: 4000000},
795- "How can we make /test better"
796- );
797-
798- if (feedbackButton){
799- console.log("Feedback button found with correct text after error")
800- }else{
801- console.log("Feedback button not found")
802- throw new Error('Feedback button not found');
803- }
787+ // const feedbackButton = await page.waitForFunction(
788+ // (expectedText) => {
789+ // const buttons = document.querySelectorAll('button');
790+ // return Array.from(buttons).find(button =>
791+ // button.textContent.includes(expectedText)
792+ // );
793+ // },
794+ // {timeout: 4000000},
795+ // "How can we make /test better"
796+ // );
797+ //
798+ // if (feedbackButton){
799+ // console.log("Feedback button found with correct text after error")
800+ // }else{
801+ // console.log("Feedback button not found")
802+ // throw new Error('Feedback button not found');
803+ // }
804804
805805 } catch (e) {
806806 console.log("Test failed")
@@ -874,23 +874,23 @@ val testMethodNotFoundErrorScript = """
874874
875875 console.log("Input field re-enabled after error")
876876
877- const feedbackButton = await page.waitForFunction(
878- (expectedText) => {
879- const buttons = document.querySelectorAll('button');
880- return Array.from(buttons).find(button =>
881- button.textContent.includes(expectedText)
882- );
883- },
884- {timeout: 4000000},
885- "How can we make /test better"
886- );
887-
888- if (feedbackButton){
889- console.log("Feedback button found with correct text after error")
890- }else{
891- console.log("Feedback button not found")
892- throw new Error('Feedback button not found');
893- }
877+ // const feedbackButton = await page.waitForFunction(
878+ // (expectedText) => {
879+ // const buttons = document.querySelectorAll('button');
880+ // return Array.from(buttons).find(button =>
881+ // button.textContent.includes(expectedText)
882+ // );
883+ // },
884+ // {timeout: 4000000},
885+ // "How can we make /test better"
886+ // );
887+ //
888+ // if (feedbackButton){
889+ // console.log("Feedback button found with correct text after error")
890+ // }else{
891+ // console.log("Feedback button not found")
892+ // throw new Error('Feedback button not found');
893+ // }
894894
895895 } catch (e) {
896896 console.log("Test failed")
0 commit comments