-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved functionality to API specific file; more tests
Front-end tests are fully implemented. Front-end code also works now! API specific stuff has been moved to it's own file is tested.
- Loading branch information
Showing
10 changed files
with
436 additions
and
264 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
let modal = ` | ||
<div class="modal fade" tabindex="-1" role="dialog" id="adobe-instructions-modal"> | ||
<div class="modal-dialog modal-lg" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title">How to Obtain your Adobe Credentials</h4> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
</div> | ||
<div class="modal-body"> | ||
<!-- add smallest transparent gif to the images, along with the actual source. Lazy load the images later --> | ||
<span id="cred-instructions-0" data-current-instruction="true" data-next-step="cred-instructions-1"><h5>Find your user profile on the top menu</h5><i class="far fa-4x fa-spin fa-spinner"></i><img class="img-responsive img-thumbnail" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src="0.jpg" /></span> | ||
<span id="cred-instructions-1" data-prev-step="cred-instructions-0" data-next-step="cred-instructions-2" class="collapse"><h5>Click "Edit your profile"</h5><img class="img-responsive img-thumbnail" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src="1.jpg" /></span> | ||
<span id="cred-instructions-2" data-prev-step="cred-instructions-1" class="collapse"><h5>Scroll to "Web Service". Your credentials are located here.</h5><img class="img-responsive img-thumbnail" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src="2.jpg" /></span> | ||
</div> | ||
<div class="modal-footer"> | ||
<nav aria-label="Instructions navigation"> | ||
<ul class="pagination justify-content-center"> | ||
<li class="page-item disabled previous"><a class="page-link" href="#"><span aria-hidden="true">←</span> Previous Step</a></li> | ||
<li class="page-item next"><a class="page-link" href="#">Next Step <span aria-hidden="true">→</span></a></li> | ||
</ul> | ||
</nav> | ||
<button style="display:none;" type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
</div> | ||
</div><!-- /.modal-content --> | ||
</div><!-- /.modal-dialog --> | ||
</div><!-- /.modal -->`; | ||
|
||
let modal_at_step_1 = ` | ||
<div class="modal fade" tabindex="-1" role="dialog" id="adobe-instructions-modal"> | ||
<div class="modal-dialog modal-lg" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title">How to Obtain your Adobe Credentials</h4> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
</div> | ||
<div class="modal-body"> | ||
<!-- add smallest transparent gif to the images, along with the actual source. Lazy load the images later --> | ||
<span id="cred-instructions-0" class="collapse"><h5>Find your user profile on the top menu</h5><img class="img-responsive img-thumbnail" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src="0.jpg" /></span> | ||
<span id="cred-instructions-1" data-current-instruction="true" data-prev-step="cred-instructions-0" data-next-step="cred-instructions-2" data-next-step="cred-instructions-2"><h5>Click "Edit your profile"</h5><img class="img-responsive img-thumbnail" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src="1.jpg" /></span> | ||
<span id="cred-instructions-2" data-prev-step="cred-instructions-1"><h5>Scroll to "Web Service". Your credentials are located here.</h5><img class="img-responsive img-thumbnail" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src="2.jpg" /></span> | ||
</div> | ||
<div class="modal-footer"> | ||
<nav aria-label="Instructions navigation"> | ||
<ul class="pagination justify-content-center"> | ||
<li class="page-item disabled previous"><a class="page-link" href="#"><span aria-hidden="true">←</span> Previous Step</a></li> | ||
<li class="page-item next"><a class="page-link" href="#">Next Step <span aria-hidden="true">→</span></a></li> | ||
</ul> | ||
</nav> | ||
<button style="display:none;" type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
</div> | ||
</div><!-- /.modal-content --> | ||
</div><!-- /.modal-dialog --> | ||
</div><!-- /.modal -->`; | ||
|
||
module.exports = {modal, modal_at_step_1}; |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
var adobe_api = require('./adobe-api-helpers.js'); | ||
var expectedValues = require('./__mocks__/expected-values.js').modules; | ||
var htmlSnippets = require('./__mocks__/html-segments-for-client.js'); | ||
|
||
test("wsse creates and updates value", () => { | ||
adobe_api.getNewAuthToken(); | ||
let oldToken = adobe_api.getNewAuthToken(); | ||
expect(oldToken).not.toBe(''); | ||
//verify that update works | ||
let newToken = adobe_api.getNewAuthToken(); | ||
expect(newToken).not.toBe(oldToken); | ||
}); | ||
|
||
test("reportsuite API request", done => { | ||
function callback(reportsuites){ | ||
expect(reportsuites).toEqual(expectedValues.reportsuitesRequest.report_suites); | ||
done(); | ||
} | ||
|
||
adobe_api.getListOfReportSuites(callback); | ||
}); | ||
|
||
test("evars API request", done => { | ||
document.body.innerHTML = htmlSnippets.displaySystem + htmlSnippets.progressDisplay; | ||
function callback(evars){ | ||
expect(evars).toEqual(expectedValues.evars); | ||
done(); | ||
} | ||
|
||
adobe_api.getListOfEvars(expectedValues.selectedFormDataAll, callback); | ||
}); | ||
|
||
test("props API request", done => { | ||
document.body.innerHTML = htmlSnippets.displaySystem + htmlSnippets.progressDisplay; | ||
function callback(evars){ | ||
expect(evars).toEqual(expectedValues.props); | ||
done(); | ||
} | ||
|
||
adobe_api.getListOfProps(expectedValues.selectedFormDataAll, callback); | ||
}); | ||
|
||
test("events API request", done => { | ||
document.body.innerHTML = htmlSnippets.displaySystem + htmlSnippets.progressDisplay; | ||
function callback(evars){ | ||
expect(evars).toEqual(expectedValues.events); | ||
done(); | ||
} | ||
|
||
adobe_api.getListOfEvents(expectedValues.selectedFormDataAll, callback); | ||
}); |
Oops, something went wrong.