Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

ensure /tcktestdir created for FileConnection tests #1862

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/fs-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var initialFiles = [
var initFS = new Promise(function(resolve, reject) {
fs.init(resolve);
}).then(function() {
if (typeof config !== "undefined" && config.midletClassName == "RunTestsMIDlet") {
if (typeof config !== "undefined" && config.main === "com.ibm.tck.client.TestRunner") {
initialDirs.push("/tcktestdir");
}

Expand Down
5 changes: 2 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ var getMobileInfo = new Promise(function(resolve, reject) {
});
});

var loadingMIDletPromises = [initFS, getMobileInfo];

var loadingPromises = [];
var loadingMIDletPromises = [getMobileInfo];
var loadingPromises = [initFS];

loadingPromises.push(load("java/classes.jar", "arraybuffer").then(function(data) {
JARStore.addBuiltIn("java/classes.jar", data);
Expand Down
4 changes: 4 additions & 0 deletions tests/fs/automation.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ casper.test.begin("fs tests", 7, function(test) {
test.assertTextExists("DONE: 137 pass, 0 fail", "run fs.js unit tests");
});

casper
.thenOpen("http://localhost:8000/tests/fs/delete-fs.html")
.waitForText("DONE");

// Run the FileConnection TCK unit tests.
casper
.thenOpen("http://localhost:8000/index.html?main=com.ibm.tck.client.TestRunner&args=-noserver&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
Expand Down