frontend: remove component test files

This commit is contained in:
juancarmore 2025-08-06 22:18:20 +02:00
parent 1161f1bb21
commit 9d9cb3d5b4
29 changed files with 0 additions and 857 deletions

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ConsoleNavComponent } from './console-nav.component';
describe('ConsoleNavComponent', () => {
let component: ConsoleNavComponent;
let fixture: ComponentFixture<ConsoleNavComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ConsoleNavComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ConsoleNavComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DialogComponent } from './dialog.component';
describe('DialogComponent', () => {
let component: DialogComponent;
let fixture: ComponentFixture<DialogComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [DialogComponent]
})
.compileComponents();
fixture = TestBed.createComponent(DialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,22 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ShareRecordingDialogComponent } from './share-recording-dialog.component';
describe('ShareRecordingDialogComponent', () => {
let component: ShareRecordingDialogComponent;
let fixture: ComponentFixture<ShareRecordingDialogComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ShareRecordingDialogComponent]
}).compileComponents();
fixture = TestBed.createComponent(ShareRecordingDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LogoSelectorComponent } from './logo-selector.component';
describe('LogoSelectorComponent', () => {
let component: LogoSelectorComponent;
let fixture: ComponentFixture<LogoSelectorComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [LogoSelectorComponent]
})
.compileComponents();
fixture = TestBed.createComponent(LogoSelectorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ProFeatureBadgeComponent } from './pro-feature-badge.component';
describe('ProFeatureBadgeComponent', () => {
let component: ProFeatureBadgeComponent;
let fixture: ComponentFixture<ProFeatureBadgeComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ProFeatureBadgeComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ProFeatureBadgeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RecordingListsComponent } from './recording-lists.component';
describe('RecordingListsComponent', () => {
let component: RecordingListsComponent;
let fixture: ComponentFixture<RecordingListsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RecordingListsComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RecordingListsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,218 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { RoomsListsComponent } from './rooms-lists.component';
import { MeetRoom } from '../../typings/ce';
describe('RoomsListsComponent', () => {
let component: RoomsListsComponent;
let fixture: ComponentFixture<RoomsListsComponent>;
const mockRooms: MeetRoom[] = [
{
roomId: 'test-room-1',
creationDate: 1642248000000, // 2024-01-15T10:00:00Z
markedForDeletion: false,
autoDeletionDate: undefined,
roomIdPrefix: 'test',
moderatorRoomUrl: 'http://localhost/room/test-room-1?secret=mod-123',
speakerRoomUrl: 'http://localhost/room/test-room-1?secret=pub-123',
preferences: {
chatPreferences: { enabled: true },
recordingPreferences: { enabled: false },
virtualBackgroundPreferences: { enabled: true }
}
},
{
roomId: 'test-room-2',
creationDate: 1642334400000, // 2024-01-16T14:30:00Z
markedForDeletion: true,
autoDeletionDate: 1643673600000, // 2024-02-01T00:00:00Z
roomIdPrefix: 'test',
moderatorRoomUrl: 'http://localhost/room/test-room-2?secret=mod-456',
speakerRoomUrl: 'http://localhost/room/test-room-2?secret=pub-456',
preferences: {
chatPreferences: { enabled: true },
recordingPreferences: { enabled: false },
virtualBackgroundPreferences: { enabled: true }
}
}
];
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RoomsListsComponent, NoopAnimationsModule, MatSnackBarModule]
}).compileComponents();
fixture = TestBed.createComponent(RoomsListsComponent);
component = fixture.componentInstance;
// Set up test data
component.rooms = mockRooms;
component.loading = false;
component.canDeleteRooms = true;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should initialize with correct default values', () => {
expect(component.rooms).toEqual(mockRooms);
expect(component.canDeleteRooms).toBe(true);
expect(component.loading).toBe(false);
expect(component.showFilters).toBe(false);
expect(component.showSelection).toBe(true);
expect(component.emptyMessage).toBe('No rooms found');
});
it('should update displayed columns based on showSelection', () => {
component.showSelection = false;
component.ngOnInit();
expect(component.displayedColumns).not.toContain('select');
component.showSelection = true;
component.ngOnInit();
expect(component.displayedColumns).toContain('select');
});
it('should determine room status correctly', () => {
expect(component.isRoomActive(mockRooms[0])).toBe(true);
expect(component.isRoomActive(mockRooms[1])).toBe(false);
expect(component.isRoomInactive(mockRooms[0])).toBe(false);
expect(component.isRoomInactive(mockRooms[1])).toBe(true);
});
it('should return correct status information', () => {
expect(component.getRoomStatus(mockRooms[0])).toBe('Active');
expect(component.getRoomStatus(mockRooms[1])).toBe('Inactive');
expect(component.getStatusIcon(mockRooms[0])).toBe('check_circle');
expect(component.getStatusIcon(mockRooms[1])).toBe('delete_outline');
expect(component.getStatusColor(mockRooms[0])).toBe('var(--ov-meet-color-success)');
expect(component.getStatusColor(mockRooms[1])).toBe('var(--ov-meet-color-error)');
});
it('should handle auto-deletion information correctly', () => {
expect(component.hasAutoDeletion(mockRooms[0])).toBe(false);
expect(component.hasAutoDeletion(mockRooms[1])).toBe(true);
expect(component.getAutoDeletionStatus(mockRooms[0])).toBe('Not scheduled');
expect(component.getAutoDeletionStatus(mockRooms[1])).toBe('Scheduled');
expect(component.getAutoDeletionIcon(mockRooms[0])).toBe('close');
expect(component.getAutoDeletionIcon(mockRooms[1])).toBe('auto_delete');
});
it('should handle room selection correctly', () => {
const room = mockRooms[0];
expect(component.isRoomSelected(room)).toBe(false);
component.toggleRoomSelection(room);
expect(component.isRoomSelected(room)).toBe(true);
component.toggleRoomSelection(room);
expect(component.isRoomSelected(room)).toBe(false);
});
it('should determine if room can be selected', () => {
expect(component.canSelectRoom(mockRooms[0])).toBe(true); // Active room
expect(component.canSelectRoom(mockRooms[1])).toBe(false); // Marked for deletion
});
it('should determine room permissions correctly', () => {
expect(component.canOpenRoom(mockRooms[0])).toBe(true);
expect(component.canOpenRoom(mockRooms[1])).toBe(false);
expect(component.canEditRoom(mockRooms[0])).toBe(true);
expect(component.canEditRoom(mockRooms[1])).toBe(false);
expect(component.canDeleteRoom(mockRooms[0])).toBe(true);
expect(component.canDeleteRoom(mockRooms[1])).toBe(false);
});
it('should emit room actions correctly', () => {
spyOn(component.roomAction, 'emit');
component.openRoom(mockRooms[0]);
expect(component.roomAction.emit).toHaveBeenCalledWith({
rooms: [mockRooms[0]],
action: 'open'
});
component.deleteRoom(mockRooms[0]);
expect(component.roomAction.emit).toHaveBeenCalledWith({
rooms: [mockRooms[0]],
action: 'delete'
});
component.viewSettings(mockRooms[0]);
expect(component.roomAction.emit).toHaveBeenCalledWith({
rooms: [mockRooms[0]],
action: 'settings'
});
});
it('should handle batch delete correctly', () => {
spyOn(component.roomAction, 'emit');
// Select some rooms
component.toggleRoomSelection(mockRooms[0]);
component.bulkDeleteSelected();
expect(component.roomAction.emit).toHaveBeenCalledWith({
rooms: [mockRooms[0]],
action: 'bulkDelete'
});
});
it('should emit filter changes', () => {
spyOn(component.filterChange, 'emit');
component.nameFilterControl.setValue('test');
// Trigger change detection to simulate the valueChanges observable
fixture.detectChanges();
// The filter change should be emitted through the form control subscription
expect(component.filterChange.emit).toHaveBeenCalled();
});
it('should show empty state when no rooms', () => {
component.rooms = [];
fixture.detectChanges();
const emptyState = fixture.nativeElement.querySelector('.no-rooms-state');
expect(emptyState).toBeTruthy();
});
it('should show loading state', () => {
component.loading = true;
fixture.detectChanges();
const loadingContainer = fixture.nativeElement.querySelector('.loading-container');
expect(loadingContainer).toBeTruthy();
});
it('should clear selection correctly', () => {
// Select a room first
component.toggleRoomSelection(mockRooms[0]);
expect(component.selectedRooms().size).toBe(1);
// Clear selection
component.clearSelection();
expect(component.selectedRooms().size).toBe(0);
});
it('should get selected rooms correctly', () => {
component.toggleRoomSelection(mockRooms[0]);
const selectedRooms = component.getSelectedRooms();
expect(selectedRooms).toEqual([mockRooms[0]]);
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SelectableCardComponent } from './selectable-card.component';
describe('SelectableCardComponent', () => {
let component: SelectableCardComponent;
let fixture: ComponentFixture<SelectableCardComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [SelectableCardComponent]
})
.compileComponents();
fixture = TestBed.createComponent(SelectableCardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ShareMeetingLinkComponent } from './share-meeting-link.component';
describe('ShareMeetingLinkComponent', () => {
let component: ShareMeetingLinkComponent;
let fixture: ComponentFixture<ShareMeetingLinkComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ShareMeetingLinkComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ShareMeetingLinkComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SpinnerComponent } from './spinner.component';
describe('SpinnerComponent', () => {
let component: SpinnerComponent;
let fixture: ComponentFixture<SpinnerComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [SpinnerComponent]
})
.compileComponents();
fixture = TestBed.createComponent(SpinnerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { StepIndicatorComponent } from './step-indicator.component';
describe('StepIndicatorComponent', () => {
let component: StepIndicatorComponent;
let fixture: ComponentFixture<StepIndicatorComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [StepIndicatorComponent]
})
.compileComponents();
fixture = TestBed.createComponent(StepIndicatorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { WizardNavComponent } from './wizard-nav.component';
describe('WizardNavComponent', () => {
let component: WizardNavComponent;
let fixture: ComponentFixture<WizardNavComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [WizardNavComponent]
})
.compileComponents();
fixture = TestBed.createComponent(WizardNavComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AboutComponent } from './about.component';
describe('AboutComponent', () => {
let component: AboutComponent;
let fixture: ComponentFixture<AboutComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AboutComponent]
})
.compileComponents();
fixture = TestBed.createComponent(AboutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ConsoleComponent } from './console.component';
describe('ConsoleComponent', () => {
let component: ConsoleComponent;
let fixture: ComponentFixture<ConsoleComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ConsoleComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ConsoleComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DevelopersSettingsComponent } from './developers.component';
describe('AccessPermissionsComponent', () => {
let component: DevelopersSettingsComponent;
let fixture: ComponentFixture<DevelopersSettingsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [DevelopersSettingsComponent]
})
.compileComponents();
fixture = TestBed.createComponent(DevelopersSettingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OverviewComponent } from './overview.component';
describe('OverviewComponent', () => {
let component: OverviewComponent;
let fixture: ComponentFixture<OverviewComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [OverviewComponent]
})
.compileComponents();
fixture = TestBed.createComponent(OverviewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RecordingsComponent } from './recordings.component';
describe('RecordingsComponent', () => {
let component: RecordingsComponent;
let fixture: ComponentFixture<RecordingsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RecordingsComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RecordingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RoomWizardComponent } from './room-wizard.component';
describe('RoomWizardComponent', () => {
let component: RoomWizardComponent;
let fixture: ComponentFixture<RoomWizardComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RoomWizardComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RoomWizardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RecordingLayoutComponent } from './recording-layout.component';
describe('RecordingLayoutComponent', () => {
let component: RecordingLayoutComponent;
let fixture: ComponentFixture<RecordingLayoutComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RecordingLayoutComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RecordingLayoutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RecordingPreferencesComponent } from './recording-preferences.component';
describe('RecordingPreferencesComponent', () => {
let component: RecordingPreferencesComponent;
let fixture: ComponentFixture<RecordingPreferencesComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RecordingPreferencesComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RecordingPreferencesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RecordingTriggerComponent } from './recording-trigger.component';
describe('RecordingTriggerComponent', () => {
let component: RecordingTriggerComponent;
let fixture: ComponentFixture<RecordingTriggerComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RecordingTriggerComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RecordingTriggerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RoomWizardRoomDetailsComponent } from './room-details.component';
describe('BasicInfoComponent', () => {
let component: RoomWizardRoomDetailsComponent;
let fixture: ComponentFixture<RoomWizardRoomDetailsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RoomWizardRoomDetailsComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RoomWizardRoomDetailsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RoomPreferencesComponent } from './room-preferences.component';
describe('RoomPreferencesComponent', () => {
let component: RoomPreferencesComponent;
let fixture: ComponentFixture<RoomPreferencesComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RoomPreferencesComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RoomPreferencesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RoomsComponent } from './rooms.component';
describe('RoomConfigComponent', () => {
let component: RoomsComponent;
let fixture: ComponentFixture<RoomsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RoomsComponent]
})
.compileComponents();
fixture = TestBed.createComponent(RoomsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,21 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ErrorComponent } from './error.component';
describe('GenericErrorComponent', () => {
let component: ErrorComponent;
let fixture: ComponentFixture<ErrorComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ErrorComponent]
}).compileComponents();
fixture = TestBed.createComponent(ErrorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,21 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginComponent } from './login.component';
describe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [LoginComponent]
}).compileComponents();
fixture = TestBed.createComponent(LoginComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MeetingComponent } from './meeting.component';
describe('CallComponent', () => {
let component: MeetingComponent;
let fixture: ComponentFixture<MeetingComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [MeetingComponent]
}).compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(MeetingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RoomRecordingsComponent } from './room-recordings.component';
describe('RoomRecordingsComponent', () => {
let component: RoomRecordingsComponent;
let fixture: ComponentFixture<RoomRecordingsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RoomRecordingsComponent]
}).compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(RoomRecordingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ViewRecordingComponent } from './view-recording.component';
describe('ViewRecordingComponent', () => {
let component: ViewRecordingComponent;
let fixture: ComponentFixture<ViewRecordingComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ViewRecordingComponent]
}).compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ViewRecordingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});