Get help with testing, discuss unit testing strategies etc.


Post by ivangureev »

Hello! I'm trying to integrate Siesta coverage report at TeamCity using this guide https://www.bryntum.com/blog/our-new-pub ... tallation/
Found problems with https protocol when Extjs framework is loading.
Can you tell me, what am I doing wrong or is it Siesta bug?
[blocked] The page at 'https://myhost.ru/repository/download/bt2/7447:id/frontend/index.html' was loaded over HTTPS, but ran insecure content from 'https://cdn.sencha.io/ext-4.2.0-gpl/resources/css/ext-all.css': this content should also be loaded over HTTPS.
 index.html:6
[blocked] The page at 'https://myhost.ru/repository/download/bt2/7447:id/frontend/index.html' was loaded over HTTPS, but ran insecure content from 'https://cdn.sencha.io/ext-4.2.0-gpl/ext-all-debug.js': this content should also be loaded over HTTPS.
 index.html:1
Uncaught ReferenceError: Ext is not defined siesta-coverage-report.js:13
Uncaught ReferenceError: Ext is not defined index.html:13
Attachments
teamCity coverage problem.jpg
teamCity coverage problem.jpg (329.46 KiB) Viewed 2687 times

Post by arcady »

This is a browser exception if I'm not mistaken.
Try using CDN that supports SSL. Like these for example:
//cdn.sencha.io/ext-4.2.0-gpl/resources/css/ext-all.css
//cdn.sencha.io/ext-4.2.0-gpl/ext-all-debug.js
You see, I intentionally haven't specified a protocol to be used. In this case a browser will decide what protocol to use (it's gonna be SSL in your case).

Post by ivangureev »

Thank you for fast reply, arcady!
The problem is `index.html` that Siesta creates for html coverage
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        
        <link rel="stylesheet" type="text/css" href="https://cdn.sencha.io/ext-4.2.0-gpl/resources/css/ext-all.css">
        <link rel="stylesheet" type="text/css" href="css/siesta-coverage-report.css">

        <script type="text/javascript" src="https://cdn.sencha.io/ext-4.2.0-gpl/ext-all-debug.js"></script>  
        <script type="text/javascript" src="siesta-coverage-report.js"></script>
        
        <script type="text/javascript">
            Ext.onReady(function () {
                var report      = new Siesta.Harness.Browser.UI.CoverageReport({
                    standalone          : true,
                    dataUrl             : 'coverage-data.json'
                })
                
                new Ext.container.Viewport({
                    layout              : 'fit',
                    items               : [
                        report
                    ]
                })
            })
        </script>
    </head>
    <body>
    </body>
</html>
As you can see siesta specify the protocol http:
...
<link rel="stylesheet" type="text/css" href="https://cdn.sencha.io/ext-4.2.0-gpl/resources/css/ext-all.css">
<script type="text/javascript" src="https://cdn.sencha.io/ext-4.2.0-gpl/ext-all-debug.js"></script> 
...
Is there any way to change `index.html` template?

Post by nickolay »

Thanks for pointing, we'll update the sources! Right now you can modify the "siesta/bin/coverage/index.html" file in your package.

Post Reply