Skip to content

Commit

Permalink
[#299] Fix ckanext.{json,pdf,recline}preview tests
Browse files Browse the repository at this point in the history
The problem is that we were looking for each *_preview.js, when the included
files are already minified (*_preview.min.js).
  • Loading branch information
vitorbaptista committed Feb 5, 2013
1 parent 7496756 commit efc7472
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ckanext/jsonpreview/tests/test_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_js_included(self):
result = self.app.get(url, status='*')

assert result.status == 200, result.status
assert 'preview_json.js' in result.body, result.body
assert 'preview_json.min.js' in result.body, result.body
assert 'preload_resource' in result.body, result.body
assert 'data-module="jsonpreview"' in result.body, result.body

Expand Down
2 changes: 1 addition & 1 deletion ckanext/pdfpreview/tests/test_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_js_included(self):
result = self.app.get(url, status='*')

assert result.status == 200, result.status
assert 'preview_pdf.js' in result.body, result.body
assert 'preview_pdf.min.js' in result.body, result.body
assert 'preload_resource' in result.body, result.body
assert 'data-module="pdfpreview"' in result.body, result.body

Expand Down
2 changes: 1 addition & 1 deletion ckanext/reclinepreview/tests/test_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_js_included(self):
result = self.app.get(url, status='*')

assert result.status == 200, result.status
assert 'preview_recline.js' in result.body, result.body
assert 'preview_recline.min.js' in result.body, result.body
assert 'preload_resource' in result.body, result.body
assert 'data-module="reclinepreview"' in result.body, result.body

Expand Down

3 comments on commit efc7472

@vitorbaptista
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The js are being minified because there's no debug = true into test-core.ini, so we get debug = false from development.ini.

But, if I add debug = true, a few tests break because there's no /base/css/main.debug.css. @tobes, can you explain the reasoning behind having a main.debug.css? Why do we do it?

@vitorbaptista
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobes
Copy link
Contributor

@tobes tobes commented on efc7472 Feb 14, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.