Skip to content

Commit

Permalink
use delay for better test running
Browse files Browse the repository at this point in the history
  • Loading branch information
tanja04 committed Jul 12, 2024
1 parent fe83c25 commit 466cfda
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/SpotifyConnect/SPOCTestApiPrevious.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ SPOCTestApiPrevious >> testApiPreviousExecute [

{
#category : #testing,
#'squeak_changestamp' : 'VE 7/9/2024 11:32'
#'squeak_changestamp' : 'TL 7/12/2024 16:26'
}
SPOCTestApiPrevious >> testSkipToPreviousOn [

| oldPlaybackState newPlaybackState |
oldPlaybackState := self getPlaybackState.
self apiEndpoint skipToPreviousOn: oldPlaybackState device id.
(Delay forSeconds: 0.6) wait.
newPlaybackState := self getPlaybackState.
self assert: newPlaybackState track id ~= oldPlaybackState track id.
self assert: newPlaybackState isPlaying
Expand Down
3 changes: 2 additions & 1 deletion src/SpotifyConnect/SPOCTestApiVolume.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SPOCTestApiVolume >> testApiVolumeExecute [

{
#category : #testing,
#'squeak_changestamp' : 'TL 6/24/2024 02:41'
#'squeak_changestamp' : 'TL 7/12/2024 16:27'
}
SPOCTestApiVolume >> testChangeVolumeTo [

Expand All @@ -46,6 +46,7 @@ SPOCTestApiVolume >> testChangeVolumeTo [
device supportsVolume
ifTrue: [newVolume := 70.
self apiEndpoint changeVolumeTo: newVolume on: device id.
(Delay forSeconds: 0.6) wait.
self assert: self getPlaybackState device volume = newVolume]
ifFalse: [self assert: true]
]
3 changes: 2 additions & 1 deletion src/SpotifyConnect/SPOCTestPlay.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ SPOCTestPlay >> testPlayOn [

{
#category : #testing,
#'squeak_changestamp' : 'TL 6/24/2024 02:30'
#'squeak_changestamp' : 'TL 7/12/2024 16:28'
}
SPOCTestPlay >> testPlayTrackOn [

| playbackState |
self apiEndpoint playTrack: '4PTG3Z6ehGkBFwjybzWkR8' on: self getPlaybackState device id.
(Delay forSeconds: 0.6) wait.
playbackState := self getPlaybackState.
self assert: playbackState track id = '4PTG3Z6ehGkBFwjybzWkR8'.
self assert: playbackState isPlaying
Expand Down

0 comments on commit 466cfda

Please sign in to comment.