Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/control/e2e/additional-features.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function ensurePoweredOn(page) {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down Expand Up @@ -65,7 +65,7 @@ test.describe('US-038: Activate Voice Control', () => {
.locator('app-control-tabbed-view')
.waitFor({ timeout: LOAD_TIMEOUT });

const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');

if (await splash.isVisible().catch(() => false)) {
const voiceAssistant = splash.locator('voice-assistant');
Expand Down
2 changes: 1 addition & 1 deletion apps/control/e2e/camera-control.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function ensurePoweredOn(page) {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down
2 changes: 1 addition & 1 deletion apps/control/e2e/lighting-control.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function ensurePoweredOn(page) {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down
2 changes: 1 addition & 1 deletion apps/control/e2e/phone-recording.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function ensurePoweredOn(page) {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down
18 changes: 9 additions & 9 deletions apps/control/e2e/power-control.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.describe('US-003: Power On Room', () => {
}) => {
// When system is not active, splash screen should be visible
// Wait for either splash (system connected but inactive) or topbar (system active)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

// Wait for system to be connected and UI to render
Expand All @@ -43,7 +43,7 @@ test.describe('US-003: Power On Room', () => {
test('should show "touch to start" message on splash screen', async ({
page,
}) => {
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');

if (await splash.isVisible().catch(() => false)) {
// Check for the touch to start heading
Expand All @@ -53,7 +53,7 @@ test.describe('US-003: Power On Room', () => {
});

test('should display room name on splash screen', async ({ page }) => {
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');

if (await splash.isVisible().catch(() => false)) {
// Room name should be displayed
Expand All @@ -63,7 +63,7 @@ test.describe('US-003: Power On Room', () => {
});

test('should power on when clicking splash screen', async ({ page }) => {
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');

if (await splash.isVisible().catch(() => false)) {
// Click to power on
Expand All @@ -80,7 +80,7 @@ test.describe('US-003: Power On Room', () => {
page,
}) => {
// Wait for splash or topbar to appear first
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand All @@ -105,7 +105,7 @@ test.describe('US-003: Power On Room', () => {
});

test('should display version info on splash screen', async ({ page }) => {
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');

if (await splash.isVisible().catch(() => false)) {
// Version info should be in bottom left
Expand All @@ -123,7 +123,7 @@ test.describe('US-004: Power Off Room', () => {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down Expand Up @@ -185,7 +185,7 @@ test.describe('Power Control - Voice Assistant on Splash', () => {
test('should display voice assistant on splash screen when enabled', async ({
page,
}) => {
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');

if (await splash.isVisible().catch(() => false)) {
// Voice assistant should be in bottom right
Expand Down Expand Up @@ -234,7 +234,7 @@ test.describe('Power Control - Responsive', () => {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down
2 changes: 1 addition & 1 deletion apps/control/e2e/room-joining.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function ensurePoweredOn(page) {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down
2 changes: 1 addition & 1 deletion apps/control/e2e/source-management.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function ensurePoweredOn(page) {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down
2 changes: 1 addition & 1 deletion apps/control/e2e/video-conferencing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function ensurePoweredOn(page) {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down
2 changes: 1 addition & 1 deletion apps/control/e2e/volume-control.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function ensurePoweredOn(page) {
.waitFor({ timeout: LOAD_TIMEOUT });

// Wait for system to be connected (splash or topbar visible)
const splash = page.locator('div[name="splash"]');
const splash = page.locator('[name="splash"]');
const topbar = page.locator('topbar-header');

await Promise.race([
Expand Down
40 changes: 15 additions & 25 deletions apps/control/src/app/bootstrap.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ export class BootstrapComponent extends AsyncHandler implements OnInit {
public loading = signal('');
/** ID of the system to bootstrap */
public system_id = signal('');
/** Selected system to bootstrap */
public selected_system: Space = null;
/** Whether input field is focused */
public input_focus = signal(false);

private readonly _debounced_search = debounced(this.system_id, 300);
private readonly _space_list = resource({
Expand Down Expand Up @@ -243,20 +239,18 @@ export class BootstrapComponent extends AsyncHandler implements OnInit {
// takes precedence over previously stored bootstrap settings.
await syncNativeManagedConfig();
if (this.system_id()) return;
if (localStorage) {
const system_id = localStorage.getItem(CONTROL_STORE_KEY);
// A system pushed via MDM managed config overrides the stored one
const mdm_system_id = getNativeSystemId();
if (mdm_system_id && mdm_system_id !== system_id) {
this.system_id.set(mdm_system_id);
return this.configure(mdm_system_id);
}
if (system_id) {
this._router.navigate(['/tabbed', system_id], {
queryParamsHandling: 'preserve',
});
return;
}
const system_id = localStorage.getItem(CONTROL_STORE_KEY);
// A system pushed via MDM managed config overrides the stored one
const mdm_system_id = getNativeSystemId();
if (mdm_system_id && mdm_system_id !== system_id) {
this.system_id.set(mdm_system_id);
return this.configure(mdm_system_id);
}
if (system_id) {
this._router.navigate(['/tabbed', system_id], {
queryParamsHandling: 'preserve',
});
return;
}
this.loading.set('');
}
Expand All @@ -266,16 +260,12 @@ export class BootstrapComponent extends AsyncHandler implements OnInit {
* @param system_id System to bootstrap
*/
private configure(system_id: string): void {
this.loading.set('Setup');
if (localStorage) {
localStorage.setItem(CONTROL_STORE_KEY, system_id);
localStorage.setItem('trust', 'true');
localStorage.setItem('fixed_device', 'true');
}
localStorage.setItem(CONTROL_STORE_KEY, system_id);
localStorage.setItem('trust', 'true');
localStorage.setItem('fixed_device', 'true');
this._router.navigate(['/tabbed', system_id], {
queryParamsHandling: 'preserve',
});
this.loading.set('');
}

/**
Expand Down
Loading
Loading