generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Test Starter): Detect deprecations in 'theme' property of test c…
…onfiguration (#387) JIRA: CPOUI5FOUNDATION-844
- Loading branch information
1 parent
d2b97ac
commit 619457f
Showing
6 changed files
with
278 additions
and
0 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
34 changes: 34 additions & 0 deletions
34
test/fixtures/linter/rules/NoDeprecatedApi/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,34 @@ | ||
sap.ui.define(function () { | ||
"use strict"; | ||
return { | ||
name: "QUnit test suite with deprecated themes (JS)", | ||
defaults: { | ||
page: "ui5://test-resources/sap/ui/demo/todo/Test.qunit.html?testsuite={suite}&test={name}", | ||
qunit: { | ||
version: 2 | ||
}, | ||
sinon: { | ||
version: 4 | ||
}, | ||
ui5: { | ||
language: "EN", | ||
theme: "sap_bluecrystal" // positive finding | ||
} | ||
}, | ||
tests: { | ||
"unit/unitTests": { | ||
theme: "sap_belize", // negative finding (wrong place) | ||
title: "Unit tests for Todo App", | ||
ui5: { | ||
theme: "sap_belize_plus", // positive finding | ||
} | ||
}, | ||
"integration/opaTests": { | ||
title: "Integration tests for Todo App", | ||
ui5: { | ||
theme: "sap_belize_hcb", // positive finding | ||
} | ||
} | ||
} | ||
}; | ||
}); |
36 changes: 36 additions & 0 deletions
36
test/fixtures/linter/rules/NoDeprecatedApi/testsuite.qunit.ts
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,36 @@ | ||
export default { | ||
name: "QUnit test suite with deprecated themes (TS)", | ||
defaults: { | ||
page: "ui5://test-resources/ui5/walkthrough/Test.qunit.html?testsuite={suite}&test={name}", | ||
qunit: { | ||
version: 2 | ||
}, | ||
sinon: { | ||
version: 4 | ||
}, | ||
ui5: { | ||
language: "EN", | ||
theme: "sap_belize" // positive finding | ||
} | ||
}, | ||
tests: { | ||
"unit/unitTests": { | ||
title: "UI5 TypeScript Walkthrough - Unit Tests", | ||
ui5: { | ||
theme: "sap_bluecrystal" // positive finding | ||
} | ||
}, | ||
"integration/opaTests": { | ||
title: "Integration tests for Todo App", | ||
ui5: { | ||
theme: "sap_horizon", // negative finding | ||
} | ||
}, | ||
anythingHere: { | ||
title: "Without string property name", | ||
ui5: { | ||
theme: "sap_belize_hcb", // positive finding | ||
} | ||
} | ||
} | ||
}; |
34 changes: 34 additions & 0 deletions
34
test/fixtures/linter/rules/NoDeprecatedApi/testsuite2.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,34 @@ | ||
sap.ui.define(function () { | ||
"use strict"; | ||
return { | ||
name: "QUnit test suite with deprecated themes (JS) - Property names are surrounded by quotes", | ||
"defaults": { | ||
page: "ui5://test-resources/sap/ui/demo/todo/Test.qunit.html?testsuite={suite}&test={name}", | ||
qunit: { | ||
version: 2 | ||
}, | ||
sinon: { | ||
version: 4 | ||
}, | ||
"ui5": { | ||
language: "EN", | ||
"theme": `sap_belize_hcw`, // positive finding (with backticks) | ||
} | ||
}, | ||
'tests': { // mixture of "" and '' | ||
'unit/unitTests': { | ||
theme: "sap_belize", // negative finding (wrong place) | ||
title: "Unit tests for Todo App", | ||
"ui5": { | ||
"theme": 'sap_belize_plus', // positive finding | ||
} | ||
}, | ||
"integration/opaTests": { | ||
title: "Integration tests for Todo App", | ||
'ui5': { | ||
'theme': "sap_belize_hcb", // positive finding | ||
} | ||
} | ||
} | ||
}; | ||
}); |
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
Binary file not shown.