This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from vatsalj/gsoc-SplitImage
Issue #191: Unit tests for SplitImage.
- Loading branch information
Showing
5 changed files
with
113 additions
and
26 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,46 @@ | ||
/** | ||
* @fileOverview tests.js Gives testing code for the show page. | ||
* @fileOverview show.js Gives testing code for the show page. | ||
* This spec is managed by the Jasmine testing library. | ||
**/ | ||
|
||
describe ("SplitImaage Show Suite", function() { | ||
|
||
describe ("SplitImage Show Suite", function() { | ||
|
||
var show_fixtures = [ | ||
'<a class="home_domain">Privly</a>', | ||
'<a id="logout_link">Logout</a>', | ||
'<div id="drop_zone"></div>', | ||
'<input type="file" id="files" multiple />', | ||
'<button id="update"></button>', | ||
] | ||
|
||
beforeEach(function() { | ||
for (var i=0; i<show_fixtures.length; i++) { | ||
document.body.innerHTML += show_fixtures[i]; | ||
} | ||
}); | ||
|
||
afterEach(function() { | ||
document.body.innerHTML = ''; | ||
}); | ||
|
||
it("initializes properly", function() { | ||
// pass | ||
|
||
initializeApplication(); | ||
|
||
var domain = privlyNetworkService.contentServerDomain(); | ||
|
||
if( privlyNetworkService.platformName() !== "HOSTED" ) { | ||
|
||
// if the app is not hosted, the user should first be directed to the | ||
// content_server page of the app bundle. | ||
expect($(".home_domain").attr("href")).toBe('../Help/content_server.html'); | ||
} else { | ||
|
||
// if the application is hosted, the URL should connect to the domain's root | ||
expect($(".home_domain").attr("href")).toBe("http://" + window.location.href.split("/")[2]); | ||
} | ||
expect(domain.split("/")[2]).toBe($(".home_domain").text()); | ||
}); | ||
|
||
}); | ||
|
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