forked from oppia/oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added new exploration similar to protractor_test_1 in embedding test * fixed linting * removed XHR from embedding pages, added forms * removed browser.executeScript, removed form elements * resolved review requests * resolved review requests * fixed lint error * create new exploration for second embedder test * review changes
- Loading branch information
1 parent
94c3c83
commit 21564df
Showing
4 changed files
with
351 additions
and
140 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,40 @@ | ||
<h2>v0.0.1 (unminified)</h2> | ||
<p>For instructions: see the README file in /assets/scripts.</p> | ||
|
||
<style type="text/css"> | ||
.protractor-test-results { | ||
display: none; | ||
} | ||
</style> | ||
|
||
<script src="/assets/scripts/oppia-player-0.0.1.js"></script> | ||
<script src="/assets/scripts/embedding_tests.js"></script> | ||
<script src="../../third_party/static/jquery-3.2.1/jquery.min.js"></script> | ||
|
||
<input class="protractor-test-exploration-id-input-field" type="text" placeholder="explorationId"> | ||
<input class="protractor-test-exploration-id-submit-button" type="submit" value="Update Exploration ID" onclick="onChangeExpId()"> | ||
|
||
<div class="protractor-test-embedded-exploration"> | ||
<h3>Standard embedding of the latest version</h3> | ||
<oppia oppia-id="12"></oppia> | ||
<div class="protractor-test-results"> | ||
<div class="protractor-test-embedded-exploration"> | ||
<h3>Standard embedding of the latest version</h3> | ||
<oppia oppia-id="idToBeReplaced"></oppia> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
// To keep track of next exploration id to be replaced. | ||
var placeholderExplorationId = 'idToBeReplaced'; | ||
var onChangeExpId = function() { | ||
var newExplorationId = $( | ||
'.protractor-test-exploration-id-input-field').val(); | ||
$('div > iframe').each(function(index) { | ||
var src = $(this).attr('src'); | ||
src = src.replace(placeholderExplorationId, newExplorationId); | ||
$(this).attr('src', src); | ||
}); | ||
placeholderExplorationId = newExplorationId; | ||
|
||
// Show the contents. | ||
$('.protractor-test-results').show(); | ||
}; | ||
</script> |
Oops, something went wrong.