Skip to content

Commit a6e5f7c

Browse files
authored
SF-3483 Upgrade to Application Builder and Angular 19 (#3338)
1 parent 514a7ac commit a6e5f7c

File tree

215 files changed

+7330
-6411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+7330
-6411
lines changed

scripts/db_tools/tsconfig.json

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"compilerOptions": {
55
"module": "commonjs"
66
}
7-
87
},
98
"compilerOptions": {
109
"baseUrl": "./",
@@ -23,24 +22,17 @@
2322
"module": "ES2020",
2423
"allowSyntheticDefaultImports": true,
2524
"allowJs": true,
26-
"lib": [
27-
"es2018",
28-
"dom"
29-
],
25+
"lib": ["es2018", "dom"],
3026
"emitDecoratorMetadata": true,
31-
"suppressImplicitAnyIndexErrors": true,
3227
"esModuleInterop": true,
33-
"typeRoots": ["node_modules/@types", "../../src/RealtimeServer/typings",
34-
],
28+
"typeRoots": ["node_modules/@types", "../../src/RealtimeServer/typings"],
3529
"resolveJsonModule": true,
3630
"paths": {
37-
"xforge-common/*": [
38-
"../../src/SIL.XForge.Scripture/ClientApp/src/xforge-common/*"
39-
],
40-
"*": [ "../../src/RealtimeServer/typings/*"]
31+
"xforge-common/*": ["../../src/SIL.XForge.Scripture/ClientApp/src/xforge-common/*"],
32+
"*": ["../../src/RealtimeServer/typings/*"]
4133
},
4234
"inlineSourceMap": false,
4335
"inlineSources": true,
44-
"noEmit": false,
36+
"noEmit": false
4537
}
4638
}

src/RealtimeServer/package-lock.json

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/RealtimeServer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
"sharedb-mingo-memory": "^4.0.1",
6767
"ts-jest": "^29.1.2",
6868
"ts-mockito": "^2.6.1",
69-
"typescript": "~5.2.2"
69+
"typescript": "~5.7.3"
7070
}
7171
}

src/SIL.XForge.Scripture/ClientApp/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# compiled output
44
/dist
5-
/dist-server
65
/tmp
76
/out-tsc
87

src/SIL.XForge.Scripture/ClientApp/.storybook/main.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module.exports = {
77
},
88
docs: {},
99
staticDirs: [
10-
{ from: '../src/assets', to: '/assets' },
11-
{ from: '../src/app/checking/checking/test-audio', to: '/assets/audio/' }
10+
// Note that 'embedded' directories appear to need to be higher, not lower.
11+
{ from: '../src/app/checking/checking/test-audio', to: '/assets/audio' },
12+
{ from: '../src/assets', to: '/assets' }
1213
]
1314
};

src/SIL.XForge.Scripture/ClientApp/angular.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
},
2020
"architect": {
2121
"build": {
22-
"builder": "@angular-devkit/build-angular:browser",
22+
"builder": "@angular-devkit/build-angular:application",
2323
"options": {
2424
"outputPath": "dist",
2525
"index": "src/index.html",
26-
"main": "src/main.ts",
26+
"browser": "src/main.ts",
2727
"tsConfig": "src/tsconfig.app.json",
2828
"progress": true,
29-
"polyfills": "src/polyfills.ts",
29+
"polyfills": ["src/polyfills.ts"],
3030
"assets": [
3131
"src/favicon.ico",
3232
"src/assets",
@@ -36,7 +36,7 @@
3636
],
3737
"styles": ["src/styles.scss", "src/material-styles.scss", "src/themes/themes.scss"],
3838
"stylePreprocessorOptions": {
39-
"includePaths": ["node_modules"]
39+
"includePaths": ["node_modules", "."]
4040
},
4141
"allowedCommonJsDependencies": [
4242
"@bugsnag/browser",
@@ -58,9 +58,7 @@
5858
],
5959
"scripts": [],
6060
"aot": false,
61-
"vendorChunk": true,
6261
"extractLicenses": true,
63-
"buildOptimizer": false,
6462
"sourceMap": true,
6563
"optimization": false,
6664
"namedChunks": true,
@@ -84,9 +82,7 @@
8482
"outputHashing": "all",
8583
"namedChunks": true,
8684
"aot": true,
87-
"vendorChunk": false,
88-
"buildOptimizer": true,
89-
"serviceWorker": true
85+
"serviceWorker": "ngsw-config.json"
9086
},
9187
"staging": {
9288
"budgets": [
@@ -105,9 +101,7 @@
105101
"outputHashing": "all",
106102
"namedChunks": true,
107103
"aot": true,
108-
"vendorChunk": false,
109-
"buildOptimizer": true,
110-
"serviceWorker": true
104+
"serviceWorker": "ngsw-config.json"
111105
},
112106
"pwaTest": {
113107
"fileReplacements": [
@@ -118,8 +112,7 @@
118112
],
119113
"outputHashing": "all",
120114
"namedChunks": true,
121-
"vendorChunk": false,
122-
"serviceWorker": true
115+
"serviceWorker": "ngsw-config.json"
123116
},
124117
"development": {}
125118
},
@@ -133,7 +126,6 @@
133126
"buildTarget": "SIL.XForge.Scripture:build:production"
134127
},
135128
"development": {
136-
"publicHost": "localhost:4200",
137129
"buildTarget": "SIL.XForge.Scripture:build:development"
138130
}
139131
},

src/SIL.XForge.Scripture/ClientApp/e2e/e2e-utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@ export async function createShareLinksAsAdmin(
193193
await page.getByRole('link', { name: 'Users' }).click();
194194
await page.getByRole('button', { name: 'Share' }).click();
195195

196-
await page.getByTitle('Change invitation language').click();
196+
await page.getByText('Invitation will be shared in').getByText('(change)').click();
197197
await page.getByRole('option', { name: 'English (US)' }).click();
198198

199199
const roleToLink: { [role: string]: string } = {};
200200

201201
let optionCount = Number.POSITIVE_INFINITY;
202202
for (let i = 0; i < optionCount; i++) {
203-
await page.getByTitle('Change invitation role').click();
203+
await page.getByText('Anyone with the link can').getByText('(change)').click();
204204
const options = await page.getByRole('option').all();
205205
optionCount = options.length;
206206

@@ -281,7 +281,7 @@ export async function enableFeatureFlag(page: Page, flag: string): Promise<void>
281281
}
282282

283283
export async function enableDeveloperMode(page: Page, options = { closeMenu: false }): Promise<void> {
284-
await page.getByRole('button', { name: 'Help' }).click();
284+
await page.getByRole('button').filter({ hasText: 'help' }).click();
285285

286286
// Playwright refuses to click the version number because it's disabled. We override this with force: true. However,
287287
// this sometimes fails to enable developer mode, probably because the click event was fired before the menu was fully

src/SIL.XForge.Scripture/ClientApp/e2e/workflows/edit-translation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function editTranslation(
8888
// FIXME(application-bug) We have to click a *different* verse and then back to the one we want to add a note to
8989
await user.click(getSegment(page, 'target', chapter, verse + 1));
9090
await user.click(segment);
91-
await user.click(page.getByRole('button', { name: 'Add Comment' }));
91+
await user.click(page.getByRole('button').filter({ hasText: 'add_comment' }));
9292
await page.getByRole('textbox', { name: 'Your comment' }).click();
9393
await page.getByRole('textbox', { name: 'Your comment' }).fill('How do you like my translation of this verse?');
9494
await user.click(page.getByRole('radio', { name: 'Save' }));
@@ -124,7 +124,7 @@ export async function editTranslation(
124124
await user.click(page.getByRole('button', { name: 'Select' }));
125125

126126
// Swap the source and target sides
127-
await user.click(page.getByRole('button', { name: 'Swap source and target' }));
127+
await user.click(page.getByRole('button').filter({ hasText: 'swap_horiz' }));
128128

129129
// Delete the project so edits don't persist and cloud the history
130130
await deleteProject(page, DEFAULT_PROJECT_SHORTNAME);

src/SIL.XForge.Scripture/ClientApp/e2e/workflows/generate-draft.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,12 @@ export async function generateDraft(
7474
await expect(closeLocator).toBeVisible({ timeout: 5 * 60_000 });
7575
await user.click(closeLocator);
7676

77-
// The stepper renders every step to the page at once, so we need to keep track of which step we're on
78-
let currentStep = 0;
77+
// The stepper renders every step to the page at once. Get the step we're on.
7978
function getStep(): Locator {
80-
return page.locator(`#cdk-step-content-0-${currentStep}`);
79+
return page.locator('.mat-horizontal-stepper-content-current');
8180
}
8281
async function goToNextStepExpectingHeading(expectedHeading: string): Promise<void> {
8382
await user.click(getStep().getByRole('button', { name: 'Next' }));
84-
currentStep++;
8583
await expect(getStep().getByRole('heading', { name: expectedHeading })).toBeVisible();
8684
await user.wait(1500);
8785
}

0 commit comments

Comments
 (0)