-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix web component static file serving (#942)
- Loading branch information
1 parent
6f021e8
commit 17fb769
Showing
6 changed files
with
46 additions
and
6 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
Empty file.
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
20 changes: 20 additions & 0 deletions
20
mesop/tests/e2e/web_components/web_component_serving_test.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,20 @@ | ||
import {test, expect} from '@playwright/test'; | ||
|
||
test('web components serving blocks non-js/css files', async ({page}) => { | ||
const response = await page.goto( | ||
'/__web-components-module__/mesop/mesop/examples/web_component/quickstart/counter_component.py', | ||
); | ||
expect(response!.status()).toBe(500); | ||
}); | ||
|
||
test('web components serving allows js and css files', async ({page}) => { | ||
const jsResponse = await page.goto( | ||
'/__web-components-module__/mesop/mesop/examples/web_component/quickstart/counter_component.js', | ||
); | ||
expect(jsResponse!.status()).toBe(200); | ||
|
||
const cssResponse = await page.goto( | ||
'/__web-components-module__/mesop/mesop/examples/web_component/testing.css', | ||
); | ||
expect(cssResponse!.status()).toBe(200); | ||
}); |