Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed Nov 4, 2024
1 parent 7490d15 commit d1dee00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/yafowil/widget/ace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
resources.add(wr.ScriptResource(
name='yafowil-ace-js',
directory=os.path.join(resources_dir, 'default'),
path='yafowil-ace/default',
depends=[
'jquery-js',
'ace-js'
Expand All @@ -37,6 +38,7 @@
resources.add(wr.StyleResource(
name='yafowil-ace-css',
directory=os.path.join(resources_dir, 'default'),
path='yafowil-ace/default',
resource='widget.min.css'
))

Expand Down Expand Up @@ -78,6 +80,7 @@
bootstrap5_resources.add(wr.ScriptResource(
name='yafowil-ace-js',
directory=os.path.join(resources_dir, 'bootstrap5'),
path='yafowil-ace/bootstrap5',
depends=[
'jquery-js',
'ace-js'
Expand All @@ -88,6 +91,7 @@
bootstrap5_resources.add(wr.StyleResource(
name='yafowil-ace-css',
directory=os.path.join(resources_dir, 'bootstrap5'),
path='yafowil-ace/bootstrap5',
resource='widget.min.css'
))

Expand Down
4 changes: 2 additions & 2 deletions src/yafowil/widget/ace/tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ def test_resources(self):
self.assertTrue(os.path.exists(scripts[0].file_path))

self.assertTrue(scripts[1].directory.endswith(np('/ace/resources/default')))
self.assertEqual(scripts[1].path, 'yafowil-ace')
self.assertEqual(scripts[1].path, 'yafowil-ace/default')
self.assertEqual(scripts[1].file_name, 'widget.min.js')
self.assertTrue(os.path.exists(scripts[1].file_path))

styles = resources.styles
self.assertEqual(len(styles), 1)

self.assertTrue(styles[0].directory.endswith(np('/ace/resources/default')))
self.assertEqual(styles[0].path, 'yafowil-ace')
self.assertEqual(styles[0].path, 'yafowil-ace/default')
self.assertEqual(styles[0].file_name, 'widget.min.css')
self.assertTrue(os.path.exists(styles[0].file_path))

0 comments on commit d1dee00

Please sign in to comment.