-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix part of #3954 - LearnerDashboardPage.js #4138
Changes from 1 commit
3eb5ecd
191a1ed
268a80e
111b314
19bc125
4f4f6e9
9603377
00ced47
4c3195c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Copyright 2017 The Oppia Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS-IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @fileoverview Page object for the learner dashboard, for use in Protractor | ||
* tests. | ||
*/ | ||
|
||
var collectionEditor = require('./collectionEditor.js'); | ||
|
||
var LearnerDashboardPage = function() { | ||
var LEARNER_DASHBOARD_URL = '/learner_dashboard'; | ||
var dropdown = element(by.css('.protractor-test-profile-dropdown')); | ||
var subscriptionButton = | ||
element(by.css('.protractor-test-subscription-button')); | ||
var createCollection = element(by.css('.protractor-test-create-collection')); | ||
|
||
this.get = function() { | ||
return browser.get(LEARNER_DASHBOARD_URL); | ||
}; | ||
|
||
this.subscribeCreatorOne = function() { | ||
browser.get('/profile/creator1learnerDashboard'); | ||
browser.waitForAngular(); | ||
subscriptionButton.click(); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing semicolons, here and below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, didn't see those. Will add them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
this.subscribeCreatorOne = function() { | ||
browser.get('/profile/creator2learnerDashboard'); | ||
browser.waitForAngular(); | ||
subscriptionButton.click(); | ||
} | ||
|
||
this.selectDropdown = function() { | ||
browser.actions().mouseMove(dropdown).perform(); | ||
dropdown.element(by.css('.protractor-test-dashboard-link')).click(); | ||
browser.waitForAngular(); | ||
} | ||
|
||
this.createExploration = function() { | ||
createCollection.click(); | ||
browser.waitForAngular(); | ||
} | ||
|
||
this.publishExploration = function() { | ||
collectionEditor.addExistingExploration('14'); | ||
collectionEditor.saveDraft(); | ||
collectionEditor.closeSaveModal(); | ||
collectionEditor.publishCollection(); | ||
collectionEditor.setTitle('Test Collection'); | ||
collectionEditor.setObjective('This is a test collection.'); | ||
collectionEditor.setCategory('Algebra'); | ||
collectionEditor.saveChanges(); | ||
browser.waitForAngular(); | ||
}; | ||
|
||
}; | ||
|
||
exports.LearnerDashboardPage = LearnerDashboardPage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there as I was calling it before. Forgot to remove it. Will change that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done