Skip to content

Commit

Permalink
Fix part of oppia#3954: Exploration Editor Page Object (oppia#5139)
Browse files Browse the repository at this point in the history
* exporting runFromSettingsTab and providing access to page's components

* Refactor for runFromSettingsTab and remove unused references

* Adding getSettingsTab method to create component

* Refactoring runFromSettingsTab

* editorAndPlayer: ExplorationEditorPage should provide component access instead of direct access

* Fix linting error

* Refactoring for runFromSettingsTab removal

* Deleting runFromSettingsTab

* Removing runFromsettingsTab dependency

* Renamed ResponseEditor and properly referencing runFromSettingsTab

* Fix lint error

* Refactoring for removing runFromSettingsTab

* Adding new objects

* Removing runFromSettingsTab

* Renaming delete to deleteResponse

* Rename ResponseEditor to getResponseEditor

* Adding FeedbackTab page object

* Adding HistoryTab page object

* Removing setDefaultOutcome

* Removing setDefaultOutcome, reduce waitForSystem call, 'Promisify' some clicking action

* Fix lint error

* Removing setDefaultOutcome to replace with new getResponseEditor

* 'Promisify' some clicking to reduce waitForsystem calls and removing setDefaultOutcome

* 'Promisify' clicking action to reduce flakiness

* Adding setLanguage to SettingsTab

* Properly refactor to remove callback mechanism for FeedbackTab workflow

* Adding FeedbackTab and HistoryTab to EditorPage object

* Refactor editorFeatures for new HistoryTab, SettingsTab and FeedbackTab objects

* Remove fdescribe from editorFeatures

* Re-enable checkForConsoleError

* Different exploration title for different tests

* Adding waitForAngular statement to reduce flakiness

* More waitForangular for suggestion test

* Fix lint error

* Addding wait calls to reduce flakiness

* Addding wait calls for addResponse to reduce flakiness

* Fix lint error

* Adding more wait calls to reduce flakiness

* Convert some waitForSystem to waitForAngular

* Refactor editorFeatures for new HistoryTab, FeedbackTab and removing callback mechanism

* Adding new HistoryTab and FeedbackTab objects

* Introducing new HistoryTab page object

* Introducing new FeedbackTab page object

* Adding setLanguage to SettingsTab

* Refactor workflow.js for new ExplorationEditor object

* ExplorationPlayerPage: 'Promisify' some clicking and add waitForAngular to reduce flakiness

* Adding findExploration to libraryPage

* Removing commented setDefaultOutcome in editorFeatures

* Removing unused 'require' and deprecated 'setDefaultOutcome' statement

* ExplorationEditorPage: Renaming exitTutorialIfNecessary to exitTutorial

* Adding a blank line before 'exports' statement

* LibraryPage: Adding getCollection function

* CreatorDashboardPage: Adding editExploration function

* FeedbackTab,HistoryTab,PlayerPage: Refactored isDisplayed usage and reduce wait calls

* ExplorationEditor: Refactoring isDisplayed usage and using ExpectedConditions for stateContentEditor element

* editorAndPlayer: Refactoring for new getCollection and editCollection, some attempts to improve test flow

* editorFeatures: Adding full-stop after each comment :D

* Reducing protractor element

* Integrating ExpectedConditions for better test flow

* Creating new ExplorationEditorMainTab

* workflow: Refactoring for new MainTab object

* ExplorationEditor: Remove checking for state and toast message and migrate methods to new ExplorationTab

* editorAndPlayer,editorFeatures : Refactor for new MainTab object

* editorFeature: Changing fdescribe to describe

* MainTab: Adding tutorial methods

* stateEditor: Refactoring tutorial test for new MainTab object

* Fixing unintentional merged travis file

* TextInput/protractor: Adding test for placeholder and box height

* stateEditor: Refactor for new ExplorationEditor objects and running new tests for response editor

* EditorMainTab: Using regex to parse rule description and click element directly instead of looping through array of element

* EditorMainTab: Adjust for when ruleDescription doesn't have selectors

* TextInputProtractor:Clearing textarea before sending input

* ExplorationPlayerPage: Integrating ExpectedConditions to replace wait calls

* SettingsTab: Adding parameter functions

* Adding protractor classes to elements

* StatsTab: Creating new StatsTab object

* EditorPage: Refactoring for new StatsTab object

* MainTab: Hint/Solution and Parameter functions

* stateEditor: Restructure test for rule parameters, refactor for new objects

* EditorAndPlayer: Find exploration before rating or playing it

* PlayerPage: Using ExpectedConditions only on the specific star to be clicked

* MainTab: Making interaction functions private

* MainTab: Separating deleteInteraction logic from setInteraction

* editorPlayer,stateEditor: Refactor for newly separated deleteInteraction

* StateEditor: Putting back PieChart error for Travis

* EditorPage: Increasing timeout to 10s for toast message

* MainTab: Rewording comments and changing input for replaceAngularSelector to string[] only

* stateEditor: Deleting interaction before creating new one

* EndExplorationProtractor: Adding protractor for EndExploration and write new test suite for it in editorAndPlayer

* MainTab: Replacing Angular Selector with multiple '...' instead of just 1

* editorAndPlayer: Rating test plays the exploration directly from /library

* stateEditor: Adding expectation for rule parameters

* LibraryPage: Adding ExpectedConditions for viewing rating

* MainTab: Adding response body to element for better locator

* editorAndPlayer: Different username for different tests

* editorAndPlayer: Username type

* stateEditor: Changing expectation input for feedbackInstructions

* editorAndPlayer: Adding wait calls and find exploration before playing

* MainTab: Adding ExpectedCondition for closing tutorial

* editorAndPlayer: Finding exploration before checking it

* HistoryTab: Adding ExpectedConditions for closing hisotry state

* Embedding: Refactoring for new EditorPage objects

* Embedding: Refactoring for new EditorPage objects

* Adding blank line before exports statement

* Embedding: Refactoring for new EditorPage objects

* embedding: Creating null declaration before assigning values

* MainTab: Properly re-worded comments and adjusting regex rule for {{abc|NonNegativeInt}}

* extensions: Refactoring for new ExplorationEditorPage objects

* extensions: setContent belongs to MainTab not EditorPage

* learnerDashboard: Re-enable and refactor for new ExplorationEditorPage object

* AdminPage: Reload exploration without /admin

* general: Adding ExpectedConditions to acceptAlert

* LearnerDashboard: Adding ExpectedConditions to all workflows

* SubscriptionDashboard: Adding ExpectedConditions

* CreatorDashboard: Adding ExpectedConditions to workflow

* CollecitonEditor: Adding ExpectedConditions to saveModal

* publicationAndLibrary: Refactor for new ExplorationEditorPage objects

* libraryPage: Refactoring playCollection/Exploration methods and clear search before input

* learnerDash and learner_dashboard.html: Refactor and disable leaving exploration/collection mid-play

* Creator, LearnerDashboard: No ExpectedCondition for non-interactive element

* learnerDashboard: Rewording comments and fix erros

* learnerDashboard: Remove fit

* LibraryPage: Getting all of exploration/collections and clicking first one

* MainTab: Adding ExpectedConditions for setStatename

* LearnerDashboard: Removing ExpectedConditions for non-button

* learnerDashboard: Directly creating explorations instead of loading from admin page

* learnerDashboard: Remove fit

* learnerDashboard: Fix exploration name typo and removing deprecated explorationExist

* workflow: Refactoring editor out for new ExplorationEditorPage object

* userJourney: Removing editor.js references and refactoring for new ExplorationEditorPage objects

* library: saveChanges is a ExplorationEditorPage object

* AdminPage: Removing reloadingExp and reloadingCollection oppia#4887

* stateEditor: Comments should end with periods.

* general: Replacing editor references with new ExplorationEditorPage objects

* HistoryTab: Add openStateHistory and rename node variables

* editorFeatures: Refactor for new openStateHistory

* MainTab: Get state node from exploration graph and add check function for setStateName

* collection_editor_save_modal: Adding protractor tag

* creator_dashboard: Adding protractor tag

* post_publish_modal: Adding protractor tags

* editorAndPlayer: Reducing number of wait calls

* SettingsTab: Adding deleteInteraction method

* ContinueProtractor: Adding ExpectedConditions for clicking continue

* workflow: Creating exploration/collection from /creator_dashboard and adding creation methods as Admin

* general: IMPORTANT Adding waitForLoadingMessage methods for loading new page

* users: Adding waitForLoadingMessage and conditions for _completeSignup

* SubscriptionDashboard: Adding waitForLoadingMessage to get methods

* PreferencesPage: Adding waitForLoadingMessage to get methods

* Library: Adding waitForLoadingMessage to get, find and play methods

* LearnerDashboard: Adding waitForLoadingMessage to get methods and expected conditions for clicking

* ExplorationPlayer:Adding closing conditions to feedback and suggestion methods

* ExplorationEditor:Adding conditions for clicking

* MainTab: Removing clicking on neutral element and adding expected condition for closing modal

* FeedbackTab: Adding condition for accepting suggestion

* CreatorDashboard: Adding waitForLoadingMessage for each page navigation

* CollectionEditor: Adding conditions for finding exploration,save and publish

* editorFeatures: Reduce waitForSystem

* learnerDashboard: Expand tests for incomplete plays of collection and exploration

* SettingsTab: Including ExpectedConditions

* MainTab:Remove check for settting state name

* ExplorationEditor: discardChanges now waits for loading message

* MainTab:Add ExpectedConditions to param methods and setStateName

* CollectionEditor: Hit Tab to fill in found result anyway

* collections: Replacing waitForAngular with waitForMessage and reduce waitForSystem calls

* CollectionEditor: Properly define matched

* editor: Deleting editor.js :D

* CollectionEditor: Adding ExpectedConditions for saveChanges

* FeedbackTab: Adding ECs for readFeedbackMsg and getSuggestionThreads

* AdminPage:Adding ECs to updateRole , delete unused variable and add waitForLoadingMessage to .get method

* MainTab: Adding ECs to tutorial methods and moveToState, rename variable to reflect plurality

* SettingsTab: Adding ECs to PreviewSummaryTile method

* HistoryTab: Rename variable stateNode to reflect plurality

* EditorPage: Adding waitForLoadingMessage to navigationToTab that has loadingMessage

* EditorPage: HistoryTab does have LoadingMessage

* PlayerPage: Adding waitForLoadingMessage to Redirection methods

* ThanksPage: Adding waitForLoadingMessage to .get method

* general: Adding waitForLoadingMessage to openEditor and openPlayer methods

* users: Separate .get logic and add waitForLoadingMessage to _completeSignup

* PreferencesPage: Migrate some methods from userJourney into PreferencesPage object

* userJourneys: Refactor for existing PreferencesPage object, add waitForLoadingMessage after each browser.get() method

* Removing waitForSystem and waitForAngular calls :D

* users: Adding some waiting time in between signing in

* PreferencesPage: Removing unused variable

* LibraryPage: Adding waitForLoadingMessage when create activity from LibraryPage

* SettingsTab: Adding ECs to deleting exploration

* MainTab: Waiting up to 10s for setStateName

* AdminPage: Adding ECs to clicking Role tab

* learnerDashboard: Adding Dummy Exploration back

* Added help table for Number with Units Interaction (oppia#5124)

* Add help table modal

* Add i18n for translation

* Change help-table heading.

* Add unit table also.

* Add requested changes.

* Made requested changes.

* Alligned the columns as requested.

* fixed preview erro in ImageRegions interaction (oppia#5149)

* Fix oppia#5063: Hint button should not appear for terminal or linear interactions (oppia#5125)

* Fixes oppia#5063: Added check for terminal interaction

* Fixes oppia#5063: Added check for linear interaction (eg. continue)

* Drag and drop interaction: Milestone 2.1 (oppia#5118)

* Add config file and object.

* Add requested changes.

* Add warning and checks to ensure continuity.

* Add continuity check and helpful message.

* Add requested changes.

* Made review changes.

* Initialize maxPrevIndex var.

* Remove if block.

* Create Topic Editor (Part 5): Added subtopic page editor (oppia#5142)

* Merged with topic editor

* Added subtopic title editor

* Added subtopic page editor and tests

* fixed errors

* Made review changes

* added local create and delete subtopic page

* made review changes

* fixed errors

* made review change

* Added unit test for exploration reverts effect on exploration issues model (oppia#5147)

* added test to check reverts

* fix backend test

* Addressed all review comments

* Addressed comment

* Playthrough Visualisation: Milestone 2.2 (Part 1) (oppia#5133)

* controller changes and modified tests

* split into helper methods

* make member variables

* changes addresesd

* addressed set of changes

* Addressed review comments

* Remove playthrough_id field and modify all occurences

* Addressed review comments and fixed backend test failures

* Final round of nits addressed, fixed one backend failure

* Minor fix in getNeedsUpdateTooltipMessag. (oppia#5136)

* Fixed error isEditable

* Added more changes

* Playthrough Visualisation: Milestone 2.2 (Part 2) (oppia#5058)

* store controller now updates playthroughs

* completed recording

* fixed lint and injector errors

* added unit tests

* addressed review comments

* addressed review comments

* addressed review comments

* addressed another set of review comments

* fix e2e test failures

* fix frontemd tests

* fixes

* manual testing fixes

* add prioritizing issues functionality

* reorder imports

* fixed e2e test

* remove backend changes here

* Addressed final round of nits

* Create Story Editor (Part 2): Add create and delete story functionalities (oppia#5148)

* Added stories list to topic editor

* fixed errors

* made review and UI changes

* Added story creation and deletion

* Made review changes

* modified story creation

* fixed errors

* Added prompt before story creation

* added story delete

* made initial review changes

* minor changes

* Added discard draft

* changed alt text

* Create Story Editor (Part  3): Create Story Editor UI (oppia#5152)

* Merged with story-editor-2

* created story editor ui

* Added tests

* added story notes editor

* mae review changes

* modified urlservice

* modified urlservice

* Drag and Drop Interaction: Milestone 2.2 (oppia#5137)

* Add relevant js files and templates.

* Remove lint errors.

* Add requested changes.

* change subitem name

* Made review changes.

* Add constant to enable drag and drop UI.

* Remove constant.

* Made review changes.

* Milestone 2.1 & 2.2: Lesson translation dashboard. (oppia#5122)

* Added translation icon on navbar

* 2nd commit

* Added TranslationLangaugeService

* Added Files

* Milestone 2.2

* Disable translation tab button

* Added review changes

* Added contsnt for enabling translation tab.

* Create Story Editor (Part 4): Create story node editor (oppia#5159)

* Merged with story editor ui

* Added story node outline editor

* fixed errors

* Added destination node id editor

* fixed errors

* added node outline finalized

* made review changes

* fixed errors

* Playthrough Visualisation: Milestone 2.2 (Part 3) (oppia#5156)

* Introduce a probabilistic chance of storing playthroughs

* Added docstring

* Use math.random() explicitly

* Remove extra variable definition

* Rename variables

* Fix frontend tests

* Modified private functions

* Generalized Review System - Milestone 1.2 : Suggestion controllers and wiring up to frontend (oppia#5093)

* added controllers

* Added controllers and linked to frontend

* linting fixes

* more linting fixes

* review changes(1) -- fix backend tests and use separate URLs, removed conditionals from tests

* linting fix

* minor fix

* changed access control logic, added tests, and fix travis

* linting fixes

* made more review changes

* propagated changes to frontend and added text field for review changes

* linting fix

* fix travis test

* fixed frontend tests

* made some review changes

* linting fix

* made changes to decorators, URLs as discussed

* linting fixes and more checks

* made review changes

* review changes

* linting fixes

* fix typo

* Rename flag for enabling playthroughs (oppia#5165)

* Rename flag

* Ordered imports

* Swap services in import order

* Final fixes

* Added validation one-off job for CKEditor - Milestone 2 (oppia#5161)

* Added validating list for CKEditor

* Added Validation job for CKEditor

* addressed review comments

* Added MigrationValidation one-off job for CKEditor - Milestone 2 (oppia#5169)

* Added MigrationValidation job for CKEditor

* Added test for ckeditor conversion functions in html_cleaner.py

* updated conversion for ol and ul tags

* fix naming of rte formats and comments

* Added lots of comments, updated conversion for list and block components

* removed spaces from rte names, made comments informative, removed code repetition

* capitalized constant names, made regex better

* Milestone 2.3: Lesson translation dashboard. (oppia#5163)

* Added translation icon on navbar

* 2nd commit

* Added TranslationLangaugeService

* Added Files

* Milestone 2.2

* Disable translation tab button

* Added review changes

* Added Translation graph directive

* Added graph in translation tab

* Made changes in e2e for exploration graph

* Added review changes

* Modify html indent function (oppia#5171)

* Modify check

* Fix indent and placing errors

* Remove trailing spaces

* Modify echo statements in install_third_party.sh

* Adjust tags and text

* Correct text indent

* Adjust text

* Add arg name to arg with default values. (oppia#5180)

* Rename AudioLanguage's "text" attribute to "description" and update e2e documentation for running individual suite (oppia#5126)

* Renaming text to description

* Reduce the number of files that are uploaded to production. (oppia#5181)

* Reduce daysUntilStale to 7 (oppia#5187)

* Updated Migration process on the basis of cases obtained from test server (oppia#5185)

* Update CODEOWNERS to include all storage models & add Sean as an owner (oppia#5186)

* Update CODEOWNERS to include all storage models & add Sean as an owner

* Update Sean's username.

* Generalised Review System Milestone 2: Add user contribution scoring models (oppia#5128)

* added gae model for user contribution scoring

* added services, domain object and tests

* linting fixes

* review changes 1

* removed extra newline

* review changes

* linting fix

* review changes

* linting fixes

* fix backend tests

* Generalised review system: Validation job for the suggestion migration (oppia#5174)

* Add job to validate the suggestion migration job

* Extract relevant commits from change list in ExplorationStateIdMapping (oppia#5189)

MR job

* Create Topic Editor (Part 6): Added skill id management for subtopics (oppia#5166)

* Added skill id management to subtopic editor

* Added create and delete subtopic

* minor change

* Changed skill card to show description

* Added link to skill editor

* added delete subtopic management

* changed the management mechanism

* disabled new structures

* changed delete subtopic algorithm and other review changes

* addressed review comments

* added comments

* made initial review changes

* made review changes

* Added send email when deleted skills encountered

* Added logging

* Fixing merge conflict due to deleting editor.js

* Missing files from rebasing

* general: Adding inline comment for waitForLoadingMessage

* learnerDashboard: Correcting nits

* HistoryTab, MainTab: Breaking after ( for long comments

* learnerDashboard,general: Abstracting safeAcceptAlert() away and add details for it

* MainTab: Reverting changes to tutorial functions, just add ECs to them.

* users: Adding wait calls when logging out and removing waitForSystem from signup method

* Fixing travis file due to merge

* Added validations to story editor (oppia#5195)

* Added check before returning to topic

* Created the files

* Added initial validations and tests

* fixed errors

* Added story graph validations

* Added tests

* fixed errors

* minor change

* fixed bugs in stories list

* modified story validations

* made review changes

* removing the code that uploaded the filepath as an object instead of … (oppia#5173)

* removing the code that uploaded the filepath as an object instead of filename

* removing the setting

* Removed it from the imagePath

* spelling following

* renamed filepathObject to filename

* made the changes as said in the comment.

* made the changes

* vscode

* Added validations to topic editor (oppia#5178)

* Added topic validation

* Merged with subtopic skill editor

* Added tests

* Added some more validations

* made review changes

* minor changes

* modified topic validations

* made review changes

* exploration_editor: Removing duplicated directives

* Checking out .travis and re-enable learnerDashboard

* Checking out app.yaml from upstream/develop
  • Loading branch information
hoangviet1993 authored and seanlip committed Jul 8, 2018
1 parent 035bca9 commit 36949e2
Show file tree
Hide file tree
Showing 40 changed files with 3,725 additions and 1,166 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ env:
- RUN_E2E_TESTS_EDITOR_FEATURES=true
- RUN_E2E_TESTS_EMBEDDING=true
- RUN_E2E_TESTS_EXTENSIONS=true
# TODO(sll): Reinstate this once the tests for the learner dashboard are fixed.
# - RUN_E2E_TESTS_LEARNER_DASHBOARD=true
- RUN_E2E_TESTS_LEARNER_DASHBOARD=true
- RUN_E2E_TESTS_LIBRARY=true
- RUN_E2E_TESTS_USERS=true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="oppia-readonly-rule-tile"
ng-class="{'oppia-editable-section': isEditable}">
<div class="oppia-rule-preview oppia-transition-200">
<div class="oppia-click-to-start-editing protractor-test-oppia-click-to-start-editing"
<div class="oppia-click-to-start-editing protractor-test-open-hint-editor"
ng-if="isEditable" ng-click="openHintEditor()">
<i ng-if="isEditable"
class="material-icons oppia-editor-edit-icon pull-right"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="modal-header">
<div class="modal-header protractor-test-save-modal">
<h3>
<span ng-if="isCollectionPrivate">Save Draft</span>
<span ng-if="!isCollectionPrivate">Publish Changes</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ <h2 class="activity-title protractor-test-exp-summary-tile-title">
<span><[(exploration.title || DEFAULT_EMPTY_TITLE) | truncate:40]></span>
</h2>
</div>
<div class="mask-wrap">
<div class="mask-wrap protractor-test-title-mask">
<div class="title-section-mask"></div>
</div>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="modal-header">
<div class="modal-header protractor-test-hint-modal">
<h3>Add Hint</h3>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="modal-header">
<div class="modal-header protractor-test-add-or-update-solution-modal">
<h3><[stateSolutionService.savedMemento !== null ? 'Update Solution' : 'Add Solution']></h3>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}
</style>

<div class="oppia-share-publish-modal">
<div class="oppia-share-publish-modal protractor-test-share-publish-modal">
<div class="modal-header oppia-share-publish-header">
<img ng-src="<[congratsImgUrl]>">
<h3>Awesome!</h3>
Expand All @@ -75,7 +75,7 @@ <h3>Awesome!</h3>
share-type="exploration"
exploration-id="explorationId">
</sharing-links>
<button class="btn btn-default oppia-share-publish-close"
<button class="btn btn-default oppia-share-publish-close protractor-test-share-publish-close"
ng-click="close()">
Close
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ <h1 class="stat-value"><[subscriptionsList.length]></h1>
translate="I18N_DASHBOARD_COLLECTIONS">
</div>
</div>
<h4 class="oppia-learner-dashboard-menu"
<h4 class="oppia-learner-dashboard-menu protractor-test-incomplete-section"
ng-class="{'oppia-learner-dashboard-section-active': activeSection === LEARNER_DASHBOARD_SECTION_I18N_IDS.INCOMPLETE}"
ng-click="setActiveSection(LEARNER_DASHBOARD_SECTION_I18N_IDS.INCOMPLETE)">
<span translate="<[LEARNER_DASHBOARD_SECTION_I18N_IDS.INCOMPLETE]>"></span>
<span class="caret"></span>
</h4>
<div ng-show="activeSection === LEARNER_DASHBOARD_SECTION_I18N_IDS.INCOMPLETE" class="menu-sub-section">
<div class="oppia-learner-dashboard-submenu"
<div class="oppia-learner-dashboard-submenu protractor-test-incomplete-exp-section"
ng-class="{'oppia-learner-dashboard-sub-section-active': activeSubsection === LEARNER_DASHBOARD_SUBSECTION_I18N_IDS.EXPLORATIONS}"
ng-click="setActiveSubsection(LEARNER_DASHBOARD_SUBSECTION_I18N_IDS.EXPLORATIONS)"
translate="I18N_DASHBOARD_EXPLORATIONS">
Expand All @@ -128,7 +128,7 @@ <h1 class="stat-value"><[subscriptionsList.length]></h1>
<span class="caret"></span>
</h4>
<div ng-show="activeSection === LEARNER_DASHBOARD_SECTION_I18N_IDS.COMPLETED" class="menu-sub-section">
<div class="oppia-learner-dashboard-submenu"
<div class="oppia-learner-dashboard-submenu protractor-test-completed-exp-section"
ng-class="{'oppia-learner-dashboard-sub-section-active': activeSubsection === LEARNER_DASHBOARD_SUBSECTION_I18N_IDS.EXPLORATIONS}"
ng-click="setActiveSubsection(LEARNER_DASHBOARD_SUBSECTION_I18N_IDS.EXPLORATIONS)"
translate="I18N_DASHBOARD_EXPLORATIONS">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
thumbnail-icon-url="activity.thumbnail_icon_url"
thumbnail-bg-color="activity.thumbnail_bg_color"
show-learner-dashboard-icons-if-possible="true"
container-is-narrow="libraryWindowIsNarrow">
container-is-narrow="libraryWindowIsNarrow"
class="protractor-test-collection-summary-tile">
</collection-summary-tile>
<exploration-summary-tile ng-if="activity.activity_type === 'exploration'"
exploration-id="activity.id"
Expand Down
33 changes: 10 additions & 23 deletions core/tests/protractor/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,14 @@ describe('Collections', function() {
users.logout();

users.login('player@collections.com');
browser.get(general.SERVER_URL_PREFIX);
var dropdown = element(by.css('.protractor-test-profile-dropdown'));
browser.actions().mouseMove(dropdown).perform();
dropdown.element(by.css('.protractor-test-dashboard-link')).click();
browser.waitForAngular();
creatorDashboardPage.get();
creatorDashboardPage.clickCreateActivityButton();
creatorDashboardPage.clickCreateCollectionButton();
browser.getCurrentUrl().then(function(url) {
var pathname = url.split('/');
// in the url a # is added at the end that is not part of collection ID
collectionId = pathname[5].slice(0, -1);
});
browser.waitForAngular();
// Add existing explorations.
collectionEditorPage.addExistingExploration(firstExplorationId);
collectionEditorPage.saveDraft();
Expand All @@ -132,16 +127,9 @@ describe('Collections', function() {

it('visits the collection editor', function() {
users.login('alice@collections.com');
browser.get(general.SERVER_URL_PREFIX);
var dropdown = element(by.css('.protractor-test-profile-dropdown'));
browser.actions().mouseMove(dropdown).perform();
dropdown.element(by.css('.protractor-test-dashboard-link')).click();
general.waitForSystem();
browser.waitForAngular();
creatorDashboardPage.get();
creatorDashboardPage.clickCreateActivityButton();
creatorDashboardPage.clickCreateCollectionButton();
general.waitForSystem();
browser.waitForAngular();
// Add existing explorations.
collectionEditorPage.addExistingExploration(firstExplorationId);
collectionEditorPage.addExistingExploration(secondExplorationId);
Expand Down Expand Up @@ -170,51 +158,50 @@ describe('Collections', function() {
it('visits the collection player', function() {
users.login('alice@collections.com');
browser.get('/collection/' + collectionId);
browser.waitForAngular();
general.waitForLoadingMessage();
users.logout();
});

it('checks for errors in a collection with varying node count', function() {
// Checking in a collection with one node.
users.login('player@collections.com');
browser.get('/collection/' + collectionId);
browser.waitForAngular();
general.waitForLoadingMessage();
general.checkForConsoleErrors([]);

// Checking in a collection with two nodes.
browser.get('/collection_editor/create/' + collectionId);
browser.waitForAngular();
general.waitForLoadingMessage();
collectionEditorPage.addExistingExploration(secondExplorationId);
collectionEditorPage.saveDraft();
collectionEditorPage.setCommitMessage('Add Exploration');
collectionEditorPage.closeSaveModal();
browser.waitForAngular();
browser.get('/collection/' + collectionId);
browser.waitForAngular();
general.waitForLoadingMessage();
general.checkForConsoleErrors([]);

// Checking in a collection with three nodes.
browser.get('/collection_editor/create/' + collectionId);
browser.waitForAngular();
general.waitForLoadingMessage();
collectionEditorPage.addExistingExploration(thirdExplorationId);
collectionEditorPage.saveDraft();
collectionEditorPage.setCommitMessage('Add Exploration');
collectionEditorPage.closeSaveModal();
browser.waitForAngular();
browser.get('/collection/' + collectionId);
browser.waitForAngular();
general.waitForLoadingMessage();
general.checkForConsoleErrors([]);

// Checking in a collection with four nodes.
browser.get('/collection_editor/create/' + collectionId);
browser.waitForAngular();
general.waitForLoadingMessage();
collectionEditorPage.addExistingExploration(fourthExplorationId);
collectionEditorPage.saveDraft();
collectionEditorPage.setCommitMessage('Add Exploration');
collectionEditorPage.closeSaveModal();
browser.waitForAngular();
browser.get('/collection/' + collectionId);
browser.waitForAngular();
general.waitForLoadingMessage();
general.checkForConsoleErrors([]);
users.logout();
});
Expand Down
Loading

0 comments on commit 36949e2

Please sign in to comment.