Skip to content

Commit

Permalink
Merge 885010f into 3b93dc9
Browse files Browse the repository at this point in the history
  • Loading branch information
kolioOtSofia committed Jul 6, 2021
2 parents 3b93dc9 + 885010f commit caf38d7
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 22 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"instance" : {
"buildButtonWithLabel:do:with:" : "SK 6/27/2021 12:34",
"buildGlobalButtonsWith:" : "ClassTest 6/20/2021 19:11",
"buildTestEntityUIFor:testingEntityType:with:" : "SK 6/19/2021 11:01",
"buildTestingEntitiesWith:" : "ClassTest 5/30/2021 16:48",
"buildTestingEntityButtonsOfType:with:" : "ClassTest 6/4/2021 15:02",
"buildTestingEntityHeaderOfType:with:" : "ClassTest 5/30/2021 16:23",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ setUp
browser removeTravisStatuses: browser travisStatuses.
browser removeGitHubActions: browser gitHubActions.
windowsToDelete := OrderedCollection new.
windowsToDelete add: browser
windowsToDelete add: browser.
mockAPI := ATDDGitHubActionMockAPI new
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ tearDown
browser gitHubActions addLast: each ].
browser resumeAll.
windowsToDelete do: [ :each | each changed: #close ].
mockAPI destroy.
self class testHasRun: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests
testCreateGitHubAction

| amount editor |

amount := ATDDGitHubActionEditor allInstances size.
editor := browser createGitHubAction.
self assert: ATDDGitHubActionEditor allInstances size = (amount + 1).
windowsToDelete add: editor
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests
testEditGitHubAction

| amount editor |

amount := ATDDGitHubActionEditor allInstances size.
editor := browser createGitHubAction.
self assert: ATDDGitHubActionEditor allInstances size = (amount + 1).
windowsToDelete add: editor
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
tests
testEditPauseResultsForSelectedGitHubActions

| gha amount window |

gha := ATDDGitHubAction new.
gha repositoryURL: 'hpi-swa-teaching/AutoTDD';
refreshInterval: 300.
"Making it use the Mock API"
gha repository client apiUrl: 'http://localhost:9999/'.
gha resume.
browser gitHubActions addLast: gha.
ATDDBrowser update.
self assert: (browser gitHubActionAt: 1) equals: false.
browser gitHubActionAt: 1 put: true.
self assert: (browser gitHubActionAt: 1) equals: true.
self assert: (browser selectedGitHubActions includes: gha).
amount := ATDDGitHubActionEditor allInstances size.
"Opens an editor for the selected gitHubAction"
window := browser editGitHubActions.
self assert: ATDDGitHubActionEditor allInstances size = (amount + 1).
windowsToDelete add: window.
amount := ATDDGitHubActionResults allInstances size.
"Opens results for the selected gitHubAction"
window := browser resultsGitHubActions.
windowsToDelete add: window.
self assert: ATDDGitHubActionResults allInstances size = (amount + 1).
self assert: (browser selectedGitHubActions allSatisfy: [ :each | each paused not ]).
browser pauseGitHubActions.
self assert: (browser selectedGitHubActions allSatisfy: [ :each | each paused ]).
browser resumeSelectedGitHubActions.
self assert: (browser selectedGitHubActions allSatisfy: [ :each | each paused not ]).
browser removeSelectedGitHubActions.
self assert: browser selectedGitHubActions isEmpty
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
tests
testEditPauseResultsForSelectedTravisStatuses

| travisSatus amount window |

travisSatus := ATDDTravisStatus new.
travisSatus repositoryURL: 'hpi-swa-teaching/AutoTDD';
refreshInterval: 300.
travisSatus resume.
browser travisStatuses addLast: travisSatus.
ATDDBrowser update.
self assert: (browser travisStatusAt: 1) equals: false.
browser travisStatusAt: 1 put: true.
self assert: (browser travisStatusAt: 1) equals: true.
self assert: (browser selectedTravisStatuses includes: travisSatus).
amount := ATDDTravisStatusEditor allInstances size.
"Opens an editor for the selected travisSatus"
window := browser editTravisStatuses.
self assert: ATDDTravisStatusEditor allInstances size = (amount + 1).
windowsToDelete add: window.
amount := ATDDTravisStatusResults allInstances size.
"Opens results for the selected travisSatus"
window := browser resultsTravisStatuses.
windowsToDelete add: window.
self assert: ATDDTravisStatusResults allInstances size = (amount + 1).
self assert: (browser selectedTravisStatuses allSatisfy: [ :each | each paused not ]).
browser pauseTravisStatuses.
self assert: (browser selectedTravisStatuses allSatisfy: [ :each | each paused ]).
browser resumeSelectedTravisStatuses.
self assert: (browser selectedTravisStatuses allSatisfy: [ :each | each paused not ]).
browser removeSelectedTravisStatuses.
self assert: browser selectedTravisStatuses isEmpty
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests
testOpenProfileEditor

| amount window|

amount := ATDDProfileEditor allInstances size.
window := browser openProfileEditor.
self assert: ATDDProfileEditor allInstances size = (amount + 1).
windowsToDelete add: window
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tests
testToggleSounds

| oldValue |

oldValue := ATDDSoundPlayer instance isMuted.
browser toggleSounds.
self assert: ATDDSoundPlayer instance isMuted = (oldValue not).
"reverting to old settings"
browser toggleSounds
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@
"fetchCopyOfGitHubActions" : "ClassTest 6/14/2021 20:10",
"fetchCopyOfTravisStatuses" : "ClassTest 6/27/2021 20:33",
"fetchCopyOfWatchers" : "ClassTest 6/27/2021 20:33",
"setUp" : "ClassTest 6/27/2021 15:40",
"tearDown" : "ClassTest 6/27/2021 15:40",
"setUp" : "ng 7/5/2021 23:10",
"tearDown" : "ng 7/5/2021 23:10",
"testAddButtonAddsNewWatcherToList" : "ng 6/4/2021 17:15",
"testChangingWatchedCategoriesWork" : "ClassTest 6/27/2021 16:43",
"testCreateGitHubAction" : "ng 7/5/2021 23:06",
"testEditButtonWorks" : "ng 6/3/2021 12:12",
"testEditGitHubAction" : "ng 7/5/2021 23:07",
"testEditPauseResultsForSelectedGitHubActions" : "ng 7/6/2021 17:15",
"testEditPauseResultsForSelectedTravisStatuses" : "ng 7/6/2021 17:24",
"testOpenProfileEditor" : "ng 7/6/2021 17:14",
"testOverviewButtonIntegration" : "ClassTest 6/27/2021 16:36",
"testPauseAllButtonPausesAllWatchers" : "ls 6/5/2019 21:37",
"testPauseButtonPausesSelectedWatcher" : "ng 6/3/2021 12:52",
"testResumeAllButtonResumesAllWatchers" : "ls 6/5/2019 21:39",
"testResumeButtonResumesSelectedWatcher" : "ng 6/3/2021 12:42",
"testRunAllButtonRunsEverything" : "ClassTest 6/27/2021 15:42",
"testRunButtonRunsSelectedWatcher" : "ClassTest 6/27/2021 15:42",
"testToggleSounds" : "ng 7/6/2021 17:18",
"testWatcherInfoButtonWorks" : "ng 6/3/2021 12:50",
"testWatcherResultsButtonWorks" : "ng 6/3/2021 12:51" } }
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"preTestWatchers",
"preTestTravisStatuses",
"preTestGitHubActions",
"windowsToDelete" ],
"windowsToDelete",
"mockAPI" ],
"name" : "ATDDBrowserTests",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ tests
testInitialization

self assert: ATDDGitHubActionResults allInstances isEmpty = false.
self assert: resultsWindow shouldSimplifyLog = true
self assert: resultsWindow shouldSimplifyLog = true.
self assert: resultsWindow simplifyLogCheckBoxState = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
tests
testSelectedJob

| temp originalJobs |

temp := ATDDGitHubActionWorkflowJob
newForId: 1
name: 'idk dude'
conclusion: 'success'.
resultsWindow selectedHistory: 1.
originalJobs := resultsWindow jobs.
"jobs needs to be configured manually so that it sends a correct request to the mockAPI"
resultsWindow jobs: { temp }.
resultsWindow selectedJob: 1.
"Simulates clicking on a specific job and then that this loads a log".
self assert: resultsWindow log isEmpty = false.
self assert: (resultsWindow log asString includesSubstring: '69 tests passed') = true.
resultsWindow simplifyLogCheckBoxAction.
self assert: resultsWindow shouldSimplifyLog = false.
"Some text that's in the log when it's not simplified".
self assert: (resultsWindow log asString includesSubstring: 'Starting: Request a runner to run this job') = true.
resultsWindow shouldSimplifyLog: true.
resultsWindow jobs: originalJobs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"testAnsiParsing" : "ClassTest 7/3/2021 21:03",
"testColor" : "ClassTest 7/4/2021 16:56",
"testHistory" : "ng 7/2/2021 14:34",
"testInitialization" : "ng 7/2/2021 14:28",
"testInitialization" : "ng 7/5/2021 19:39",
"testIsSmalltalkCiLog" : "ClassTest 7/3/2021 21:00",
"testParsingSmalltalkCILog" : "ClassTest 7/3/2021 21:01" } }
"testParsingSmalltalkCILog" : "ClassTest 7/3/2021 21:01",
"testSelectedJob" : "ng 7/5/2021 22:44" } }

0 comments on commit caf38d7

Please sign in to comment.