Skip to content

Commit

Permalink
Test loading using fake change records
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdu committed Aug 6, 2021
1 parent 6123773 commit 06fc15c
Show file tree
Hide file tree
Showing 14 changed files with 83 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
expectedFiledInChanges

^ #(false true true false false false false false true false false false true false false false false false false) asOrderedCollection
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mock inputs
pickSomeChanges.

self changesBrowser
groupIndex: 5;
versionIndex: 2;
pickButtonClicked.

self changesBrowser
groupIndex: 2;
versionIndex: 1;
pickButtonClicked.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ setUp
super setUp.
CRSessionState reset.
self browserWindow: (CRBrowser openWith: CRFakeFileStream mockChangesFileStream).
self changesBrowser changeListItems do: [:each |
each changeRecord: (each changeRecord as: CRFakeChangeRecord)].
self changesBrowser unpickAllChanges.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
testing-functionality
testLoadAfterPicking

| changeListItems |
changeListItems := self changesBrowser changeListItems.

self pickSomeChanges.
self assert: 4 equals: self changesBrowser numberOfPickedChangeListItems.

self changesBrowser loadPickedChanges.
self assert: self expectedFiledInChanges equals: (changeListItems collect: [:each | each filedIn]).
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
testing-functionality
testLoadWithoutPicking

| changeListItems |
changeListItems := self changesBrowser changeListItems.

self assert: self changesBrowser hasChanges.
self changesBrowser
unpickAllChanges;
loadPickedChanges.
self deny: self changesBrowser hasChanges.
self assert: (changeListItems noneSatisfy: [:each | each filedIn]).
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
"changeListMorph" : "JA 7/1/2021 12:25",
"changesBrowser" : "mg 7/2/2020 14:00",
"click:at:in:" : "gf 6/30/2020 18:19",
"expectedFiledInChanges" : "abd 8/5/2021 22:26",
"expectedGrouping" : "abd 8/5/2021 17:59",
"handIn:" : "abd 8/5/2021 17:41",
"mouse:does:at:in:" : "mg 7/15/2020 20:13",
"mouse:downAt:in:" : "gf 6/30/2020 18:17",
"mouse:upAt:in:" : "gf 6/30/2020 18:19",
"pickSomeChanges" : "abd 8/5/2021 22:16",
"selectFirstChangeListItem" : "JA 7/1/2021 11:38",
"selectMethodChangeListItem" : "JA 7/1/2021 12:07",
"selectSecondChangeListItem" : "JA 7/1/2021 11:47",
"setUp" : "abd 8/4/2021 17:58",
"setUp" : "abd 8/5/2021 22:52",
"tearDown" : "abd 8/5/2021 17:43",
"testAfterLoadingChanges" : "abd 8/5/2021 18:00",
"testBuildingChangesBrowser" : "mg 7/2/2020 13:53",
"testContents" : "abd 8/5/2021 16:24",
"testGroupIndexWhenClicked" : "abd 8/5/2021 18:01",
Expand All @@ -26,7 +27,9 @@
"testIndicesAfterInitialization" : "abd 8/4/2021 17:30",
"testIsLoadButtonEnabled" : "abd 8/5/2021 18:02",
"testIsPickButtonEnabled" : "abd 8/5/2021 18:03",
"testLoadAfterPicking" : "abd 8/5/2021 22:28",
"testLoadButtonLabel" : "abd 8/5/2021 19:25",
"testLoadWithoutPicking" : "abd 8/5/2021 22:44",
"testNoChangesInfoText" : "abd 8/5/2021 18:04",
"testNoSelection" : "abd 8/5/2021 18:12",
"testNumberOfPickedChangeListItems" : "abd 8/5/2021 18:05",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
instance creation
newFrom: aChangeRecord

^ self new copySameFrom: aChangeRecord
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
fileIn

self filedIn: true.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
filedIn: aBool

filedIn := aBool.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
filedIn

^ filedIn ifNil: [false]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"class" : {
"newFrom:" : "abd 8/5/2021 22:05" },
"instance" : {
"fileIn" : "abd 8/5/2021 22:24",
"filedIn" : "abd 8/5/2021 21:59",
"filedIn:" : "abd 8/5/2021 21:51" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "ChangesReloaded-Tests",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"filedIn" ],
"name" : "CRFakeChangeRecord",
"pools" : [
],
"super" : "ChangeRecord",
"type" : "normal" }

0 comments on commit 06fc15c

Please sign in to comment.