I have to tell Chrome to use CORS, but how do I tell Siesta to use my new Chrome link?
What does that mean exactly? Do you launch Chrome with certain command line arguments? If so, check the --browser-arg argument of the launcher (bin/webdriver --help)
The problem now is that I can see that the webpage is loading, but Siesta throws the following exception:
Failed to access cross-origin page: https://localhost:56000/MyApp/index.html.
In general tests should reside on the same domain as the app itself,
but you can try to disable web security:
https://www.bryntum.com/blog/testing-x-domain-websites-with-siesta-in-chrome/
And it shows that 1 test failed, although I have 4 tests in the file:
t.diag("Sanity test, loading classes on demand and verifying they were indeed loaded.")
t.ok(Ext, 'ExtJS is here');
t.requireOk('MyApp.view.Viewport');
t.requireOk('MyApp.store.Language');
t.requireOk('MyApp.controller.CaseCreation');
The problem now is that I can see that the webpage is loading, but Siesta throws the following exception:
Please describe your setup in more detailed way. So your project file is hosted on one port, but test page - on another? Can you host your project file on the same port as the test page?
And it shows that 1 test failed, although I have 4 tests in the file:
You probably mean assertions - the "test" term usually means a whole test file or t.it() section in it. Which one exactly is failing?
Result
I can see the siesta browser preview to run the webpage.
But I get the previous result.
My 010_sanity.t.js
describe('Sanity Test', t => {
t.it("Sanity", t => {
t.diag("Sanity test, loading classes on demand and verifying they were indeed loaded.")
t.ok(Ext, 'ExtJS is here');
t.requireOk('MyApp.view.Viewport');
t.requireOk('MyApp.store.Language');
t.requireOk('MyApp.controller.CaseCreation');
});
})
My siesta.js
const project = new Siesta.Project.Browser.ExtJS();
project.configure({
title: 'Basic browser test suite',
transparentEx: true,
autoCheckGlobals: true,
expectedGlobals : [
'Ext'
],
preload: []
});
project.start({
group: 'Application',
// need to set the `preload` to empty array - to avoid the double loading of dependencies
preload: [],
expectedGlobals: [
'MyApp',
'CKEDITOR',
'Fashion'
],
items: [
{
pageUrl: 'https://localhost:46000/MyApp/Client/index.html',
url : '010_sanity.t.js'
}
]
});