Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit dda5bdb

Browse files
committed
Merge pull request #2859 from adobe/dangoor/testsplit
Fixes 2747, split unit and integration tests
2 parents 84e4a7a + 5938c33 commit dda5bdb

15 files changed

+38
-4
lines changed

test/SpecRunner.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
<div class="nav-collapse">
6262
<ul class="nav">
6363
<li><a id="UnitTestSuite" href="?suite=UnitTestSuite">Unit</a></li>
64+
<li><a id="IntegrationTestSuite" href="?suite=IntegrationTestSuite">Integration</a></li>
6465
<li><a id="PerformanceTestSuite" href="?suite=PerformanceTestSuite">Performance</a></li>
6566
<li><a id="ExtensionSuite" href="?suite=ExtensionTestSuite">Extensions</a></li>
6667
<li><a id="reload" href="#">Reload</a></li>

test/SpecRunner.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ define(function (require, exports, module) {
161161

162162
// Create a top-level filter to show/hide performance and extensions tests
163163
var isPerfSuite = (suite === "PerformanceTestSuite"),
164-
isExtSuite = (suite === "ExtensionTestSuite");
164+
isExtSuite = (suite === "ExtensionTestSuite"),
165+
isIntegrationSuite = (suite === "IntegrationTestSuite");
165166

166167
var topLevelFilter = function (spec) {
167168
var suite = spec.suite;
168169

169170
// unit test suites have no category
170-
if (!isPerfSuite && !isExtSuite) {
171+
if (!isPerfSuite && !isExtSuite && !isIntegrationSuite) {
171172
if (spec.category !== undefined) {
172173
// if an individualy spec has a category, filter it out
173174
return false;
@@ -185,7 +186,15 @@ define(function (require, exports, module) {
185186
return true;
186187
}
187188

188-
var category = (isPerfSuite) ? "performance" : "extension";
189+
var category;
190+
191+
if (isPerfSuite) {
192+
category = "performance";
193+
} else if (isIntegrationSuite) {
194+
category = "integration";
195+
} else {
196+
category = "extension";
197+
}
189198

190199
if (spec.category === category) {
191200
return true;

test/spec/CSSUtils-test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,8 @@ define(function (require, exports, module) {
13141314

13151315

13161316
describe("Working with real public CSSUtils API", function () {
1317+
this.category = "integration";
1318+
13171319
var CSSUtils;
13181320

13191321
beforeEach(function () {
@@ -1349,6 +1351,8 @@ define(function (require, exports, module) {
13491351

13501352

13511353
describe("Working with unsaved changes", function () {
1354+
this.category = "integration";
1355+
13521356
var testPath = SpecRunnerUtils.getTestPath("/spec/CSSUtils-test-files"),
13531357
CSSUtils,
13541358
DocumentManager,

test/spec/CodeHint-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ define(function (require, exports, module) {
4040
initCodeHintTest;
4141

4242
describe("Code Hint Menus", function () {
43+
this.category = "integration";
4344

4445
/**
4546
* Performs setup for a code hint test. Opens a file and set pos.

test/spec/Document-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ define(function (require, exports, module) {
3737

3838

3939
describe("Document", function () {
40-
40+
this.category = "integration";
41+
4142
var testPath = SpecRunnerUtils.getTestPath("/spec/Document-test-files"),
4243
testWindow;
4344

test/spec/DocumentCommandHandlers-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ define(function (require, exports, module) {
3939

4040

4141
describe("DocumentCommandHandlers", function () {
42+
this.category = "integration";
4243

4344
var testPath = SpecRunnerUtils.getTestPath("/spec/DocumentCommandHandlers-test-files"),
4445
testWindow;

test/spec/ExtensionUtils-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ define(function (require, exports, module) {
3434

3535

3636
describe("Extension Utils", function () {
37+
this.category = "integration";
3738

3839
var testWindow;
3940

test/spec/FileIndexManager-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ define(function (require, exports, module) {
3434
SpecRunnerUtils = require("spec/SpecRunnerUtils");
3535

3636
describe("FileIndexManager", function () {
37+
38+
this.category = "integration";
3739

3840
var testPath = SpecRunnerUtils.getTestPath("/spec/FileIndexManager-test-files");
3941
var brackets;

test/spec/InlineEditorProviders-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ define(function (require, exports, module) {
4040
SpecRunnerUtils = require("spec/SpecRunnerUtils");
4141

4242
describe("InlineEditorProviders", function () {
43+
44+
this.category = "integration";
4345

4446
var testPath = SpecRunnerUtils.getTestPath("/spec/InlineEditorProviders-test-files"),
4547
tempPath = SpecRunnerUtils.getTempDirectory(),

test/spec/JSUtils-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ define(function (require, exports, module) {
386386

387387
describe("JS Indexing: ", function () {
388388

389+
this.category = "integration";
390+
389391
var functions; // populated by indexAndFind()
390392

391393
beforeEach(function () {

0 commit comments

Comments
 (0)