Skip to content

Commit

Permalink
Fixed test cases for squeak 6.0 trunk version (#248)
Browse files Browse the repository at this point in the history
* Refactor: Replaced deprecated #startsWith

* Fix: Adopted to Squeak 6.0 submenu changes
  • Loading branch information
yannik-dittmar authored May 17, 2022
1 parent c08b8fe commit ee881e5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ determineActionName

self typeObject hasEntries ifTrue: [ ^ 'entries' ].
self class actionNameSelectors
detect: [ :selectorString | self typeObject selector startsWith: selectorString]
detect: [ :selectorString | self typeObject selector beginsWith: selectorString]
ifFound: [ :selectorString | ^ selectorString ].
self class menuActionMapping
at: self typeObject category
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"createAction" : "lm 7/6/2021 23:28",
"createActionNamed:" : "NL 6/4/2021 16:30",
"createListOfAlgeractions" : "NL 6/4/2021 16:37",
"determineActionName" : "NL 7/12/2021 23:38",
"determineActionName" : "YD 5/16/2022 22:04",
"hasChildren" : "NL 7/5/2021 19:42",
"name" : "NL 7/6/2021 12:17",
"openMenuItem" : "NL 7/6/2021 12:15",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ getCommand
| textFieldContents startIndex |
textFieldContents := self typeObject topmostQuery.
startIndex := 1.
(textFieldContents startsWith: '=')
(textFieldContents beginsWith: '=')
ifTrue: [ startIndex := 2 ].
(textFieldContents startsWith: 'do')
(textFieldContents beginsWith: 'do')
ifTrue: [ startIndex := 3 ].

^ textFieldContents copyFrom: startIndex to: textFieldContents size
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"createActionPrint" : "J.J. 7/30/2015 17:58",
"createListOfAlgeractions" : "J.J. 7/30/2015 22:04",
"doit" : "Jro 6/17/2020 13:19",
"getCommand" : "OH 7/29/2021 19:47",
"getCommand" : "YD 5/16/2022 22:16",
"hasChildren" : "fw 7/30/2015 14:15",
"inspectit" : "J.J. 7/30/2015 17:55",
"isRelevantForAllStrings" : "beb 6/25/2020 10:11",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
testing docking bar types
testOpenSubmenuEntries

|flatWidgetLookName fontSizeName |
| flatWidgetLookName fontSizeName newFontSizeName |

flatWidgetLookName := 'Flat Widget Look'.
self runQuery: flatWidgetLookName.
self assert: (self resultsIncludeName: flatWidgetLookName).

fontSizeName := 'Increase Font Size'.
"Item name changed in squeak v6.0"
newFontSizeName := 'increase font size (+)'.
self runQuery: fontSizeName.
self assert: (self resultsIncludeName: fontSizeName).
self assert: (
(self resultsIncludeName: fontSizeName) or:
[self resultsIncludeName: newFontSizeName]).
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ testTabIntoSubmenus
themesAndColorName := 'Themes & Colors'.
tab := ALGFakeKeyboardEvent new keyString: '<tab>'.
randomCheckBoxName := 'Squeak (duller)'.
randomEntryName := 'Set High-DPI Mode'.
randomEntryName := 'Set Etoys Mode'.
self runQuery: themesAndColorName.
self algInstance keyStroke: tab.
self runQuery: randomCheckBoxName.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"testMethodTypeOpenMethodInBrowser" : "beb 5/12/2020 12:12",
"testOpenApps" : "b 7/31/2021 12:48",
"testOpenInExistingBrowser" : "jRo 5/28/2020 20:32",
"testOpenSubmenuEntries" : "NL 7/12/2021 23:44",
"testOpenSubmenuEntries" : "YD 5/16/2022 22:44",
"testOpenTools" : "b 7/31/2021 12:48",
"testOpenWindowEntry:withAction:" : "b 8/5/2021 17:43",
"testPackageAction" : "b 8/5/2021 17:40",
Expand All @@ -73,7 +73,7 @@
"testSettingsNotEmpty" : "rk 8/6/2020 10:51",
"testSubmenuCheckBoxes" : "b 8/5/2021 17:19",
"testSubmenuCheckBoxesAfterTab" : "b 7/12/2021 19:32",
"testTabIntoSubmenus" : "b 8/5/2021 17:19",
"testTabIntoSubmenus" : "YD 5/16/2022 22:15",
"testTestNotEmpty" : "rk 8/6/2020 10:51",
"testWindowBringToFront" : "b 8/5/2021 17:43",
"testWindowClose" : "b 8/5/2021 17:43",
Expand Down

0 comments on commit ee881e5

Please sign in to comment.