Skip to content

Commit 6e1e296

Browse files
committed
delay in tests
1 parent 466cfda commit 6e1e296

6 files changed

+42
-66
lines changed

src/SpotifyConnect/SPOCTestApiNext.class.st

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Class {
1010

1111
{
1212
#category : #running,
13-
#'squeak_changestamp' : 'TL 7/12/2024 16:18'
13+
#'squeak_changestamp' : 'TL 7/12/2024 16:45'
1414
}
1515
SPOCTestApiNext >> setUp [
1616

@@ -33,14 +33,15 @@ SPOCTestApiNext >> testApiNextExecute [
3333

3434
{
3535
#category : #testing,
36-
#'squeak_changestamp' : 'TL 6/24/2024 02:08'
36+
#'squeak_changestamp' : 'TL 7/12/2024 16:35'
3737
}
3838
SPOCTestApiNext >> testSkipToNextOn [
3939

4040
| oldPlaybackState newPlaybackState |
4141
oldPlaybackState := self getPlaybackState.
4242
self apiEndpoint skipToNextOn: oldPlaybackState device id.
43+
(Delay forSeconds: 0.6) wait.
4344
newPlaybackState := self getPlaybackState.
44-
"self assert: newPlaybackState track id ~= oldPlaybackState track id."
45+
self assert: newPlaybackState track id ~= oldPlaybackState track id.
4546
self assert: newPlaybackState isPlaying
4647
]

src/SpotifyConnect/SPOCTestApiPause.class.st

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ SPOCTestApiPause >> testApiPauseExecute [
3737

3838
{
3939
#category : #testing,
40-
#'squeak_changestamp' : 'TL 6/24/2024 01:53'
40+
#'squeak_changestamp' : 'TL 7/12/2024 16:39'
4141
}
4242
SPOCTestApiPause >> testPauseOn [
4343

4444
self apiEndpoint pauseOn: self getPlaybackState device id.
45+
(Delay forSeconds: 0.6) wait.
4546
self assert: self getPlaybackState isPlaying not
4647
]

src/SpotifyConnect/SPOCTestApiPlay.class.st

+33
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,36 @@ SPOCTestApiPlay >> testApiPlayTrackwithPlaylistExecute [
8080
res := self apiEndpoint execute: dict.
8181
self assert: res response code = 204
8282
]
83+
84+
{
85+
#category : #testing,
86+
#'squeak_changestamp' : 'TL 7/12/2024 16:40'
87+
}
88+
SPOCTestApiPlay >> testPlayTrackOn [
89+
90+
| playbackState |
91+
self apiEndpoint playTrack: '4PTG3Z6ehGkBFwjybzWkR8' on: self getPlaybackState device id.
92+
(Delay forSeconds: 0.6) wait.
93+
playbackState := self getPlaybackState.
94+
self assert: playbackState track id = '4PTG3Z6ehGkBFwjybzWkR8'.
95+
self assert: playbackState isPlaying
96+
97+
]
98+
99+
{
100+
#category : #testing,
101+
#'squeak_changestamp' : 'TL 7/12/2024 16:41'
102+
}
103+
SPOCTestApiPlay >> testPlayTrackWithAlbumOn [
104+
105+
| playbackState |
106+
self apiEndpoint playTrack: '4PTG3Z6ehGkBFwjybzWkR8'
107+
withAlbum: '6eUW0wxWtzkFdaEFsTJto6'
108+
on: self getPlaybackState device id.
109+
(Delay forSeconds: 0.6) wait.
110+
playbackState := self getPlaybackState.
111+
self assert: playbackState track id = '4PTG3Z6ehGkBFwjybzWkR8'.
112+
self assert: playbackState track album id = '6eUW0wxWtzkFdaEFsTJto6'.
113+
self assert: playbackState isPlaying
114+
115+
]

src/SpotifyConnect/SPOCTestApiPrevious.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Class {
1010

1111
{
1212
#category : #running,
13-
#'squeak_changestamp' : 'TL 6/24/2024 03:21'
13+
#'squeak_changestamp' : 'TL 7/12/2024 16:45'
1414
}
1515
SPOCTestApiPrevious >> setUp [
1616

src/SpotifyConnect/SPOCTestApiSwitchDevice.class.st

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ SPOCTestApiSwitchDevice >> testApiSwitchDeviceExecute [
3333

3434
{
3535
#category : #testing,
36-
#'squeak_changestamp' : 'TL 6/24/2024 02:05'
36+
#'squeak_changestamp' : 'TL 7/12/2024 16:39'
3737
}
3838
SPOCTestApiSwitchDevice >> testSwitchDeviceTo [
3939

4040
| newDeviceID |
4141
newDeviceID := self getPlaybackState device id.
4242
self apiEndpoint switchDeviceTo: newDeviceID.
43+
(Delay forSeconds: 0.6) wait.
4344
self assert: self getPlaybackState device id = newDeviceID
4445
]

src/SpotifyConnect/SPOCTestPlay.class.st

-60
This file was deleted.

0 commit comments

Comments
 (0)