Skip to content

Commit

Permalink
increase delay again
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Jan 27, 2024
1 parent 01c4669 commit 6c07007
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ testCORSFilterFunctionalTest

self assert: (driver findElementByID: 'allowed-origins') getText equals: 'None'.
(((driver findElementByID: 'get-requests') findElementsByTagName: 'button') detect: [ :button | button getText = 'Same Origin' ]) click.
(Delay forMilliseconds: 300) wait.
(Delay forMilliseconds: 1000) wait.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Success'.

self clickRestart.
(((driver findElementByID: 'get-requests') findElementsByTagName: 'button') detect: [ :button | button getText = 'Cross Origin' ]) click.
(Delay forMilliseconds: 300) wait.
(Delay forMilliseconds: 1000) wait.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Error'.

self clickRestart.
((driver findElementsByTagName: 'button') detect: [ :button | button getText = 'Allow other origin' ]) click.
(((driver findElementByID: 'get-requests') findElementsByTagName: 'button') detect: [ :button | button getText = 'Same Origin' ]) click.
(Delay forMilliseconds: 300) wait.
(Delay forMilliseconds: 1000) wait.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Success'.

self clickRestart.
(((driver findElementByID: 'get-requests') findElementsByTagName: 'button') detect: [ :button | button getText = 'Cross Origin' ]) click.
(Delay forMilliseconds: 300) wait.
(Delay forMilliseconds: 1000) wait.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Success'.

self clickRestart.
Expand All @@ -39,7 +39,7 @@ testCORSFilterFunctionalTest
"the following statement is to circumvent testing issue with the dev toolbar being over the delete buttons"
(driver findElementByID: 'result') moveToElement.
(((driver findElementByID: 'delete-requests') findElementsByTagName: 'button') detect: [ :button | button getText = 'Cross Origin' ]) click.
(Delay forMilliseconds: 300) wait.
(Delay forMilliseconds: 1000) wait.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Error'.

((driver findElementsByTagName: 'button') detect: [ :button | button getText = 'Allow DELETE' ]) click.
Expand All @@ -49,14 +49,14 @@ testCORSFilterFunctionalTest
(driver findElementByID: 'result') moveToElement.
(((driver findElementByID: 'delete-requests') findElementsByTagName: 'button')
detect: [ :button | button getText = 'Same Origin' ]) click.
(Delay forMilliseconds: 300) wait.
(Delay forMilliseconds: 1000) wait.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Success'.

self clickRestart.
"the following statement is to circumvent testing issue with the dev toolbar being over the delete buttons"
(driver findElementByID: 'result') moveToElement.
(((driver findElementByID: 'delete-requests') findElementsByTagName: 'button') detect: [ :button | button getText = 'Cross Origin' ]) click.
(Delay forMilliseconds: 300) wait.
(Delay forMilliseconds: 1000) wait.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Success'.

] ensure: [ WACORSResourceExample unregister; unregisterCorsAdaptor ]

0 comments on commit 6c07007

Please sign in to comment.