Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ async function joinAsChecker(
// Give time for the last answer to be saved
await page.waitForTimeout(500);
} catch (e) {
if (preset.pauseOnFailure) await page.pause();
console.error('Error running tests for checker ' + userNumber);
console.error(e);
await screenshot(
Expand Down
186 changes: 108 additions & 78 deletions src/SIL.XForge.Scripture/ClientApp/src/app/app.component.spec.ts

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/SIL.XForge.Scripture/ClientApp/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { FontService } from 'xforge-common/font.service';
import { I18nService } from 'xforge-common/i18n.service';
import { LocationService } from 'xforge-common/location.service';
import { Breakpoint, MediaBreakpointService } from 'xforge-common/media-breakpoints/media-breakpoint.service';
import { DocSubscription } from 'xforge-common/models/realtime-doc';
import { UserDoc } from 'xforge-common/models/user-doc';
import { NoticeService } from 'xforge-common/notice.service';
import { OnlineStatusService } from 'xforge-common/online-status.service';
Expand Down Expand Up @@ -334,7 +335,8 @@ export class AppComponent extends DataLoadingComponent implements OnInit, OnDest
void this.userService.setCurrentProjectId(this.currentUserDoc!, this._selectedProjectDoc.id);
this.projectUserConfigDoc = await this.projectService.getUserConfig(
this._selectedProjectDoc.id,
this.currentUserDoc!.id
this.currentUserDoc!.id,
new DocSubscription('AppComponent', this.destroyRef)
);
if (this.selectedProjectDeleteSub != null) {
this.selectedProjectDeleteSub.unsubscribe();
Expand Down
2 changes: 2 additions & 0 deletions src/SIL.XForge.Scripture/ClientApp/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Routes } from '@angular/router';
import { AuthGuard } from 'xforge-common/auth.guard';
import { SystemAdminAuthGuard } from 'xforge-common/system-admin-auth.guard';
import { SystemAdministrationComponent } from 'xforge-common/system-administration/system-administration.component';
import { BlankPageComponent } from './shared/blank-page/blank-page.component';
import { CheckingOverviewComponent } from './checking/checking-overview/checking-overview.component';
import { CheckingComponent } from './checking/checking/checking.component';
import { ConnectProjectComponent } from './connect-project/connect-project.component';
Expand Down Expand Up @@ -36,6 +37,7 @@ import { TranslateOverviewComponent } from './translate/translate-overview/trans
import { UsersComponent } from './users/users.component';

export const APP_ROUTES: Routes = [
{ path: 'blank-page', component: BlankPageComponent },
{ path: 'callback/auth0', component: MyProjectsComponent, canActivate: [AuthGuard] },
{ path: 'connect-project', component: ConnectProjectComponent, canActivate: [AuthGuard] },
{ path: 'login', redirectTo: 'projects', pathMatch: 'full' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,18 +369,18 @@ describe('ChapterAudioDialogComponent', () => {
expect(result.timingData[1].to).toEqual(1.296);
}));

it('will not save or upload if there is no audio', fakeAsync(() => {
it('will not save or upload if there is no audio', fakeAsync(async () => {
env.component.prepareTimingFileUpload(env.timingFile);
env.component.save();
await env.component.save();
env.fixture.detectChanges();

expect(env.numberOfTimesDialogClosed).toEqual(0);
expect(env.wrapperAudio.classList.contains('invalid')).toBe(true);
}));

it('will not save or upload if there is no timing data', fakeAsync(() => {
it('will not save or upload if there is no timing data', fakeAsync(async () => {
env.component.audioUpdate(env.audioFile);
env.component.save();
await env.component.save();
env.fixture.detectChanges();

expect(env.numberOfTimesDialogClosed).toEqual(0);
Expand Down Expand Up @@ -479,15 +479,15 @@ describe('ChapterAudioDialogComponent', () => {
expect(env.wrapperTiming.classList.contains('valid')).toBe(true);
}));

it('will not try to save dialog if offline', fakeAsync(() => {
it('will not try to save dialog if offline', fakeAsync(async () => {
env.onlineStatus = false;
env.component.audioUpdate(env.audioFile);
tick();
env.component.prepareTimingFileUpload(env.timingFile);
tick();

// SUT
env.component.save();
await env.component.save();
tick();
env.fixture.detectChanges();
flush();
Expand Down
Loading
Loading