-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workbench): fetch icon font for applications deployed in a subdir…
…ectory Previously, the workbench icon font was not loaded for applications deployed in a subdirectory because the path to the icon font was absolute and not root-relative, preventing the HTML base mechanism from kicking in. closes #466
- Loading branch information
1 parent
badf715
commit 02db939
Showing
8 changed files
with
112 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
projects/scion/e2e-testing/src/workbench/basehref.e2e-spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2018-2023 Swiss Federal Railways | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
import {expect} from '@playwright/test'; | ||
import {test} from '../fixtures'; | ||
|
||
test.describe('HTML base HREF', () => { | ||
|
||
/** | ||
* This test expects the application to be deployed on 'http://localhost:4300/subdir' with '/subdir/' configured as the base URL. | ||
* | ||
* Start the app using the following command: | ||
* | ||
* ``` | ||
* npm run workbench-testing-app:basehref:serve | ||
* ``` | ||
*/ | ||
test('should fetch the icon font if deployed in a subdirectory', async ({page, appPO}) => { | ||
const response = page.waitForResponse(/scion-workbench-icons\.(ttf|woff)/); | ||
await appPO.navigateTo({url: 'http://localhost:4300/subdir', microfrontendSupport: false}); | ||
|
||
// Expect the icon font to be loaded. | ||
const iconFontLoaded = (await response).ok(); | ||
await expect(iconFontLoaded).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters