message: entire project load from js test
diff: @@ -112,4 +112,58 @@ describe("Project Store", () => {
  expect(secondSuite.tests.length).toBe(1);
  expect(controlSuite.tests.length).toBe(1);
  });
  + it("should load from JS", () => {
  + const projectRep = {
  + name: "my project",
  + url: "https://en.wikipedia.org",
  + tests: [
  + {
  + id: "1",
  + name: "testcase",
  + commands: []
  + },
  + {
  + id: "2",
  + name: "first test",
  + commands: []
  + },
  + {
  + id: "3",
  + name: "second test",
  + commands: []
  + },
  + {
  + id: "4",
  + name: "third test",
  + commands: []
  + }
  + ],
  + suites: [
  + {
  + id: "1",
  + name: "test suite",
  + tests: ["2", "3"]
  + },
  + {
  + id: "2",
  + name: "second suite",
  + tests: ["1", "2", "4"]
  + }
  + ],
  + urls: [
  + "https://en.wikipedia.org",
  + "http://www.seleniumhq.org"
  + ]
  + };
  +
  + const project = ProjectStore.fromJS(projectRep);
  + expect(project.name).toBe(projectRep.name);
  + expect(project.url).toBe(projectRep.url);
  + expect(project.tests.length).toBe(4);
  + expect(project.tests[0] instanceof TestCase).toBeTruthy();
  + expect(project.suites.length).toBe(2);
  + expect(project.suites[0] instanceof Suite).toBeTruthy();
  + expect(project.urls.length).toBe(2);
  + expect(project.urls[0]).toBe(projectRep.urls[0]);
  + });
  });
  