Skip to content

Commit

Permalink
trace 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Brichau committed Jan 27, 2024
1 parent 7039160 commit 6f4df67
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@ testing
testCORSFilterFunctionalTest
[
WACORSResourceExample register; registerCorsAdaptor.

self selectTest: 'WACORSFilterFunctionalTest'.

self should: [ driver findElementByPartialLinkText: 'Register CORS Resource' ] raise: BPNoSuchElementException.

self assert: (driver findElementByID: 'allowed-origins') getText equals: 'None'.
(((driver findElementByID: 'get-requests') findElementsByTagName: 'button') detect: [ :button | button getText = 'Same Origin' ]) click.
Transcript show: 'clicked 1'.
(Delay forMilliseconds: 1000) wait.
(Delay forMilliseconds: 300) 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.
Transcript show: 'clicked 2'.
(Delay forMilliseconds: 1000) wait.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Error'.
self assert: ((driver findElementByID: 'result') findElementByTagName: 'p') getText equals: 'Error'.
Transcript show: 'FOOBAR'.

self clickRestart.
((driver findElementsByTagName: 'button') detect: [ :button | button getText = 'Allow other origin' ]) click.
Expand Down

0 comments on commit 6f4df67

Please sign in to comment.