Skip to content

Commit

Permalink
Update tests for gridstack 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Sep 10, 2020
1 parent d5fcb58 commit e41c709
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tests/test_notebook_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def assert_config(metadata_name, gridstack_property):
if activeView is None or activeView == 'grid_default':

assert_config('defaultCellHeight', 'cellHeight')
assert_config('cellMargin', 'verticalMargin')
assert_config('maxColumns', 'width')
assert_config('cellMargin', 'margin')
assert_config('maxColumns', 'column')
else:
assert 'cellHeight' not in gridstack_config
assert 'verticalMargin' not in gridstack_config
assert 'width' not in gridstack_config
assert 'margin' not in gridstack_config
assert 'column' not in gridstack_config
2 changes: 1 addition & 1 deletion tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def test_resources_gridstack_show_handles(http_server_client, base_url, sh
elem = tree.xpath("//div[@class='gridhandle']")
assert (show_handles and elem) or (not show_handles and not elem)

gridstack_config = tree.xpath("//script[contains(text(), 'gridstack')]")[0].text
gridstack_config = tree.xpath("//script[contains(text(), 'GridStack')]")[0].text

if show_handles:
assert "handles: 'e, se, s, sw, w'" in gridstack_config
Expand Down
4 changes: 2 additions & 2 deletions tests/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ async def test_template_test(http_server_client, base_url):
assert not elem

assert "cellHeight: 40" in html_body
assert "width: 12" in html_body
assert "verticalMargin: 10" in html_body
assert "column: 12" in html_body
assert "margin: 10" in html_body

0 comments on commit e41c709

Please sign in to comment.