forked from streamlit/streamlit
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bokeh widgets by adding in side effects to package json (streamli…
- Loading branch information
1 parent
cb9cad0
commit cd67e9f
Showing
9 changed files
with
87 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from playwright.sync_api import Page, expect | ||
|
||
|
||
def test_bokeh_chart(themed_app: Page): | ||
"""Test that st.bokeh_chart renders correctly.""" | ||
bokeh_chart_elements = themed_app.locator("[data-testid=stBokehChart]") | ||
expect(bokeh_chart_elements).to_have_count(4) | ||
|
||
expect(bokeh_chart_elements.nth(0).locator("canvas").nth(0)).to_be_visible() | ||
expect(bokeh_chart_elements.nth(1).locator("canvas").nth(0)).to_be_visible() | ||
expect(bokeh_chart_elements.nth(2).locator("canvas").nth(0)).to_be_visible() | ||
|
||
# show a bokeh slider | ||
expect(bokeh_chart_elements.nth(3).locator("canvas").nth(0)).to_be_visible() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Including this polyfill type declaration prevents typescript checker from | ||
// parsing bokeh-api-2.4.3 JS source file that has TS deems invalid (\u2118) | ||
// https://mothereff.in/js-variables | ||
declare const plugin; | ||
export default plugin; |
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,5 @@ | ||
// Including this polyfill type declaration prevents typescript checker from | ||
// parsing bokeh-gl-2.4.3 JS source file that has TS deems invalid (\u2118) | ||
// https://mothereff.in/js-variables | ||
declare const plugin; | ||
export default plugin; |
5 changes: 5 additions & 0 deletions
5
frontend/lib/src/vendor/bokeh/bokeh-tables-2.4.3.esm.min.d.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,5 @@ | ||
// Including this polyfill type declaration prevents typescript checker from | ||
// parsing bokeh-tables-2.4.3 JS source file that has TS deems invalid (\u2118) | ||
// https://mothereff.in/js-variables | ||
declare const plugin; | ||
export default plugin; |
5 changes: 5 additions & 0 deletions
5
frontend/lib/src/vendor/bokeh/bokeh-widgets-2.4.3.esm.min.d.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,5 @@ | ||
// Including this polyfill type declaration prevents typescript checker from | ||
// parsing bokeh-widgets-2.4.3 JS source file that has TS deems invalid (\u2118) | ||
// https://mothereff.in/js-variables | ||
declare const plugin; | ||
export default plugin; |