-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixes client-side error handling - Adds error handling in case QUnit is not available - Adds handling for Access Denied error in IE - Adds error handling integration tests
- Loading branch information
Showing
20 changed files
with
300 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ module.exports = { | |
"browser": true | ||
}, | ||
"globals": { | ||
"sap": "readonly", | ||
"karma": "readonly" | ||
"sap": "readonly" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
test/integration/application-ui5-tooling-error-handling/karma-empty-testsuite.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function(config) { | ||
"use strict"; | ||
|
||
require("../karma-base.conf")(config); | ||
config.set({ | ||
|
||
frameworks: ["ui5"], | ||
|
||
ui5: { | ||
testpage: "webapp/test/empty-testsuite/testsuite.qunit.html" | ||
} | ||
|
||
}); | ||
}; | ||
|
||
module.exports.shouldFail = true; | ||
module.exports.assertions = ({expect, log}) => { | ||
expect(log).toMatch(/Could not resolve any testpages/); | ||
}; |
19 changes: 19 additions & 0 deletions
19
...egration/application-ui5-tooling-error-handling/karma-initial-testsuite-not-found.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function(config) { | ||
"use strict"; | ||
|
||
require("../karma-base.conf")(config); | ||
config.set({ | ||
|
||
frameworks: ["ui5"], | ||
|
||
ui5: { | ||
testpage: "webapp/test/path-does-not-exist/testsuite.qunit.html" | ||
} | ||
|
||
}); | ||
}; | ||
|
||
module.exports.shouldFail = true; | ||
module.exports.assertions = ({expect, log}) => { | ||
expect(log).toMatch(/Error resolving testsuite/); | ||
}; |
19 changes: 19 additions & 0 deletions
19
...ntegration/application-ui5-tooling-error-handling/karma-testpage-QUnit-not-loaded.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function(config) { | ||
"use strict"; | ||
|
||
require("../karma-base.conf")(config); | ||
config.set({ | ||
|
||
frameworks: ["ui5"], | ||
|
||
ui5: { | ||
testpage: "webapp/test/testpage-QUnit-not-loaded/testsuite.qunit.html" | ||
} | ||
|
||
}); | ||
}; | ||
|
||
module.exports.shouldFail = true; | ||
module.exports.assertions = ({expect, log}) => { | ||
expect(log).toMatch(/Missing QUnit framework/); | ||
}; |
19 changes: 19 additions & 0 deletions
19
test/integration/application-ui5-tooling-error-handling/karma-testpage-not-found.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function(config) { | ||
"use strict"; | ||
|
||
require("../karma-base.conf")(config); | ||
config.set({ | ||
|
||
frameworks: ["ui5"], | ||
|
||
ui5: { | ||
testpage: "webapp/test/testpage-not-found/testsuite.qunit.html" | ||
} | ||
|
||
}); | ||
}; | ||
|
||
module.exports.shouldFail = true; | ||
module.exports.assertions = ({expect, log}) => { | ||
expect(log).toMatch(/Error while loading testpage/); | ||
}; |
19 changes: 19 additions & 0 deletions
19
...integration/application-ui5-tooling-error-handling/karma-testsuite-promise-reject.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function(config) { | ||
"use strict"; | ||
|
||
require("../karma-base.conf")(config); | ||
config.set({ | ||
|
||
frameworks: ["ui5"], | ||
|
||
ui5: { | ||
testpage: "webapp/test/testsuite-promise-reject/testsuite.qunit.html" | ||
} | ||
|
||
}); | ||
}; | ||
|
||
module.exports.shouldFail = true; | ||
module.exports.assertions = ({expect, log}) => { | ||
expect(log).toMatch(/Error from testsuite/); | ||
}; |
7 changes: 7 additions & 0 deletions
7
test/integration/application-ui5-tooling-error-handling/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "application-ui5-tooling-error-handling", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"@openui5/sap.ui.core": "*" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
test/integration/application-ui5-tooling-error-handling/ui5.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
specVersion: "1.0" | ||
type: application | ||
metadata: | ||
name: test.app |
9 changes: 9 additions & 0 deletions
9
...n/application-ui5-tooling-error-handling/webapp/test/empty-testsuite/testsuite.qunit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Testsuite</title> | ||
<script src="testsuite.qunit.js" data-sap-ui-testsuite></script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
10 changes: 10 additions & 0 deletions
10
...ion/application-ui5-tooling-error-handling/webapp/test/empty-testsuite/testsuite.qunit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* global window, parent */ | ||
|
||
window.suite = function() { | ||
"use strict"; | ||
|
||
// eslint-disable-next-line | ||
var oSuite = new parent.jsUnitTestSuite(); | ||
|
||
return oSuite; | ||
}; |
13 changes: 13 additions & 0 deletions
13
...lication-ui5-tooling-error-handling/webapp/test/testpage-QUnit-not-loaded/test.qunit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>QUnit Test</title> | ||
|
||
<script src="wrong/path/to/qunit.js"></script> | ||
|
||
</head> | ||
<body> | ||
<div id="qunit"></div> | ||
</body> | ||
</html> |
9 changes: 9 additions & 0 deletions
9
...ion-ui5-tooling-error-handling/webapp/test/testpage-QUnit-not-loaded/testsuite.qunit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Testsuite</title> | ||
<script src="testsuite.qunit.js" data-sap-ui-testsuite></script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
Oops, something went wrong.