fix: cypress tests

This commit is contained in:
Mihajlo Medjedovic 2024-05-02 12:39:07 +02:00
parent 510e412ff2
commit 3dd85cc60b
4 changed files with 5 additions and 25 deletions

View File

@ -224,11 +224,7 @@ const rejectExcel = (callback?: any) => {
.should('contain', 'Approve') .should('contain', 'Approve')
.then((allButtons: any) => { .then((allButtons: any) => {
for (let approvalButton of allButtons) { for (let approvalButton of allButtons) {
if ( if (approvalButton.innerText.toLowerCase().includes('approve')) {
approvalButton.innerText
.toLowerCase()
.includes('approve')
) {
approvalButton.click() approvalButton.click()
break break
} }

View File

@ -410,11 +410,7 @@ const rejectExcel = (callback?: any) => {
.should('contain', 'Approve') .should('contain', 'Approve')
.then((allButtons: any) => { .then((allButtons: any) => {
for (let approvalButton of allButtons) { for (let approvalButton of allButtons) {
if ( if (approvalButton.innerText.toLowerCase().includes('approve')) {
approvalButton.innerText
.toLowerCase()
.includes('approve')
) {
approvalButton.click() approvalButton.click()
break break
} }
@ -443,11 +439,7 @@ const acceptExcel = (callback?: any) => {
.should('contain', 'Approve') .should('contain', 'Approve')
.then((allButtons: any) => { .then((allButtons: any) => {
for (let approvalButton of allButtons) { for (let approvalButton of allButtons) {
if ( if (approvalButton.innerText.toLowerCase().includes('approve')) {
approvalButton.innerText
.toLowerCase()
.includes('approve')
) {
approvalButton.click() approvalButton.click()
break break
} }

View File

@ -702,11 +702,7 @@ const approveTable = (callback?: any) => {
.should('contain', 'Approve') .should('contain', 'Approve')
.then((allButtons: any) => { .then((allButtons: any) => {
for (let approvalButton of allButtons) { for (let approvalButton of allButtons) {
if ( if (approvalButton.innerText.toLowerCase().includes('approve')) {
approvalButton.innerText
.toLowerCase()
.includes('approve')
) {
approvalButton.click() approvalButton.click()
break break
} }

View File

@ -128,11 +128,7 @@ const rejectExcel = (callback?: any) => {
.should('contain', 'Approve') .should('contain', 'Approve')
.then((allButtons: any) => { .then((allButtons: any) => {
for (let approvalButton of allButtons) { for (let approvalButton of allButtons) {
if ( if (approvalButton.innerText.toLowerCase().includes('approve')) {
approvalButton.innerText
.toLowerCase()
.includes('approve')
) {
approvalButton.click() approvalButton.click()
break break
} }