Add onboarding weather and template gradients
This commit is contained in:
@@ -32,7 +32,7 @@ test('move client rebinding redirects the live player to the target screen', asy
|
||||
return [[{ id: 12, name: 'Source Screen', slug: 'source-screen' }]];
|
||||
}
|
||||
if (sql.includes('SELECT d.client_name, s.slug AS current_screen_slug')) {
|
||||
return [[{ client_name: 'Lobby Client', current_screen_slug: 'source-screen' }]];
|
||||
return [[{ client_name: 'Stored Client Name', current_screen_slug: 'source-screen' }]];
|
||||
}
|
||||
if (sql.includes('SELECT id, name, slug FROM d_screens WHERE slug = ?') && params && params[0] === 'target-screen') {
|
||||
return [[{ id: 27, name: 'Target Screen', slug: 'target-screen' }]];
|
||||
@@ -126,6 +126,7 @@ test('move client rebinding redirects the live player to the target screen', asy
|
||||
body: {
|
||||
command: 'moveclient',
|
||||
deviceId: 'device-123',
|
||||
clientId: 'tab-123',
|
||||
clientName: 'Lobby Client',
|
||||
targetScreenSlug: 'target-screen',
|
||||
connectionId: 'conn-1',
|
||||
@@ -136,8 +137,16 @@ test('move client rebinding redirects the live player to the target screen', asy
|
||||
|
||||
assert.equal(response.statusCode, 200);
|
||||
assert.equal(response.body.ok, true);
|
||||
assert.equal(response.body.targetScreenSlug, 'target-screen');
|
||||
assert.equal(response.body.playerUrl, 'http://remote-player.example/screen/target-screen');
|
||||
assert.equal(response.body.playerUrl, 'http://remote-player.example/screen/target-screen');
|
||||
assert.equal(calls.some((entry) => entry.kind === 'query'
|
||||
&& entry.sql.includes('SET screen_id = ?, modified_at = CURRENT_TIMESTAMP')
|
||||
&& entry.params[0] === 27
|
||||
&& entry.params[1] === 'device-123'), false);
|
||||
assert.equal(calls.some((entry) => entry.kind === 'query'
|
||||
&& entry.sql.includes('SET client_name = ?, screen_id = ?, modified_at = CURRENT_TIMESTAMP')
|
||||
&& entry.params[0] === 'Lobby Client'
|
||||
&& entry.params[1] === 27
|
||||
&& entry.params[2] === 'tab-123'), true);
|
||||
assert.equal(calls.some((entry) => entry.kind === 'broadcastDashboardState'), true);
|
||||
assert.equal(calls.some((entry) => entry.kind === 'forwardPlayerCommand' && entry.slug === 'source-screen' && entry.payload && entry.payload.command === 'redirect'), false);
|
||||
assert.equal(calls.some((entry) => entry.kind === 'forwardPlayerCommandToBaseUrl' && entry.baseUrl === 'http://remote-player.example'), true);
|
||||
|
||||
Reference in New Issue
Block a user