Skip to content

Commit

Permalink
Small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
bouraqadi committed May 17, 2024
1 parent 523d327 commit 0f8525a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Pharo/PharoJs-TestFramework/PjTWebAppTestCase.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Trait {
{ #category : #asserting }
PjTWebAppTestCase >> assertHidden: element [

self waitUntil: [(self computedDisplayStyleOf: element) = 'none']
self waitUntil: [ (self isHidden: element) ]
]

{ #category : #asserting }
Expand All @@ -25,7 +25,7 @@ PjTWebAppTestCase >> assertInnerHtmlOfElementById: id equals: expectedValue [
{ #category : #asserting }
PjTWebAppTestCase >> assertShowing: element [

self waitWhile: [ (self computedDisplayStyleOf: element) = 'none' ]
self waitWhile: [ (self isShowing: element) ]
]

{ #category : #asserting }
Expand Down Expand Up @@ -80,6 +80,18 @@ PjTWebAppTestCase >> document [
self explicitRequirement
]

{ #category : #asserting }
PjTWebAppTestCase >> isHidden: element [

^(self computedDisplayStyleOf: element) = 'none'
]

{ #category : #asserting }
PjTWebAppTestCase >> isShowing: element [

^ (self isHidden: element) not
]

{ #category : #'UI handling' }
PjTWebAppTestCase >> newEvent: eventName [

Expand Down

0 comments on commit 0f8525a

Please sign in to comment.