From 925feccaa5fdc76adcf198e2b6425fec3762a341 Mon Sep 17 00:00:00 2001 From: Maximiliano Tabacman Date: Sun, 10 Sep 2023 10:04:17 -0300 Subject: [PATCH] Fixes #217 --- ...inedWebInteractionInterpreterTest.class.st | 21 +++++++++++++++++++ ...CombinedWebInteractionInterpreter.class.st | 7 +++++++ .../WebInteractionInterpreter.class.st | 2 +- ...WebInteractionInterpreterBehavior.class.st | 6 ++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/source/Willow-Core-Tests/CombinedWebInteractionInterpreterTest.class.st b/source/Willow-Core-Tests/CombinedWebInteractionInterpreterTest.class.st index a41c345e..14c1da69 100644 --- a/source/Willow-Core-Tests/CombinedWebInteractionInterpreterTest.class.st +++ b/source/Willow-Core-Tests/CombinedWebInteractionInterpreterTest.class.st @@ -684,6 +684,27 @@ CombinedWebInteractionInterpreterTest >> testSetValueToWithoutTriggeringChangeOf '' ] +{ #category : #'tests - Configuring' } +CombinedWebInteractionInterpreterTest >> testShowLoadingNotificationDisplayingApplying [ + + | interpreter html | + + interpreter := self combinedInterpreter. + + interpreter + showLoadingNotificationDisplaying: 'Loading...' + applying: [ :view | view addClass willow ]. + html := self renderUsing: [ :canvas | + canvas + render: okButton; + render: cancelButton + ]. + self + assert: html + equals: + '' +] + { #category : #'tests - Configuring - DOM' } CombinedWebInteractionInterpreterTest >> testShowLoadingNotificationStyledAsAll [ diff --git a/source/Willow-Core/CombinedWebInteractionInterpreter.class.st b/source/Willow-Core/CombinedWebInteractionInterpreter.class.st index 910adb70..2993f627 100644 --- a/source/Willow-Core/CombinedWebInteractionInterpreter.class.st +++ b/source/Willow-Core/CombinedWebInteractionInterpreter.class.st @@ -165,6 +165,13 @@ CombinedWebInteractionInterpreter >> setValueTo: aValueProvider withoutTriggerin interpretersDo: [ :interpreter | interpreter setValueTo: aValueProvider withoutTriggeringChangeOf: aView ] ] +{ #category : #Configuring } +CombinedWebInteractionInterpreter >> showLoadingNotificationDisplaying: aWebView applying: aComponentCommand [ + + self interpretersDo: [ :interpreter | + interpreter showLoadingNotificationDisplaying: aWebView applying: aComponentCommand ] +] + { #category : #Configuring } CombinedWebInteractionInterpreter >> showLoadingNotificationStyledAsAll: classes [ diff --git a/source/Willow-Core/WebInteractionInterpreter.class.st b/source/Willow-Core/WebInteractionInterpreter.class.st index f41dad38..ebbd661f 100644 --- a/source/Willow-Core/WebInteractionInterpreter.class.st +++ b/source/Willow-Core/WebInteractionInterpreter.class.st @@ -207,7 +207,7 @@ WebInteractionInterpreter >> setValueTo: aValueProvider withoutTriggeringChangeO WebInteractionInterpreter >> showLoadingNotificationDisplaying: aWebView applying: aComponentCommand [ interaction onTriggerExecute: - (LoadingNotificationCommand displaying: aWebView applying: aComponentCommand) + ( LoadingNotificationCommand displaying: aWebView applying: aComponentCommand ) ] { #category : #Configuring } diff --git a/source/Willow-Core/WebInteractionInterpreterBehavior.class.st b/source/Willow-Core/WebInteractionInterpreterBehavior.class.st index ae074bbd..3620a826 100644 --- a/source/Willow-Core/WebInteractionInterpreterBehavior.class.st +++ b/source/Willow-Core/WebInteractionInterpreterBehavior.class.st @@ -153,6 +153,12 @@ WebInteractionInterpreterBehavior >> show: aRenderable whileCallingServerToRende render: anIdentifiedWebView ] +{ #category : #Configuring } +WebInteractionInterpreterBehavior >> showLoadingNotificationDisplaying: aWebView applying: aComponentCommand [ + + self subclassResponsibility +] + { #category : #Configuring } WebInteractionInterpreterBehavior >> showLoadingNotificationStyledAsAll: classes [