Skip to content

Commit 9b6cc5f

Browse files
author
Dennis Labordus
committed
Better solution and explaination
Signed-off-by: Dennis Labordus <[email protected]>
1 parent e214685 commit 9b6cc5f

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

integration-testing/TestSuite002-versions-compas.robot

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,8 @@ TestCase002-30
164164
# Next select the first version from the list and compare this to the current open edited version.
165165
Click ${compas-versions-editor-selector} mwc-list > mwc-check-list-item:nth-child(1) mwc-checkbox
166166
Click ${compas-versions-editor-selector} mwc-fab[label="Compare version (current)"] > button
167-
# Needed field is non-interactive, so fetching won't work using 'Get Text'.
168-
# Alternative way is using JavaScript to retrieve the value and compare it.
169-
${listItemValue}= Evaluate JavaScript mwc-dialog#compareDialog > plain-compare-list
170-
... (element) => {
171-
... return element.shadowRoot.querySelector('mwc-list > mwc-list-item > span').textContent
172-
... }
173-
Should Contain ${listItemValue} Substation
167+
# The following part won't work in Presentor Mode (-v enable_presenter_mode:true), because the field is non-interactive.
168+
Get Text mwc-dialog#compareDialog > plain-compare-list mwc-list > mwc-list-item > span:has-text("Substation")
174169
Click mwc-dialog#compareDialog > mwc-button[slot="secondaryAction"] > button
175170
Wait for dialog is closed
176171

@@ -206,13 +201,8 @@ TestCase002-32
206201
Click ${compas-versions-editor-selector} mwc-list > mwc-check-list-item:nth-child(1) mwc-checkbox
207202
Click ${compas-versions-editor-selector} mwc-list > mwc-check-list-item:nth-child(2) mwc-checkbox
208203
Click ${compas-versions-editor-selector} mwc-fab[label="Compare versions"] > button
209-
# Needed field is non-interactive, so fetching won't work using 'Get Text'.
210-
# Alternative way is using JavaScript to retrieve the value and compare it.
211-
${listItemValue}= Evaluate JavaScript mwc-dialog#compareDialog > plain-compare-list
212-
... (element) => {
213-
... return element.shadowRoot.querySelector('mwc-list > mwc-list-item > span').textContent
214-
... }
215-
Should Contain ${listItemValue} Substation
204+
# The following part won't work in Presentor Mode (-v enable_presenter_mode:true), because the field is non-interactive.
205+
Get Text mwc-dialog#compareDialog > plain-compare-list mwc-list > mwc-list-item > span:has-text("Substation")
216206
Click mwc-dialog#compareDialog > mwc-button[slot="secondaryAction"] > button
217207
Wait for dialog is closed
218208

0 commit comments

Comments
 (0)