Skip to content
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

Improving the dev workflow: Setup browserstack, add necessary configuration files and tests for mobile #5340

Merged
merged 108 commits into from
Aug 4, 2018
Merged
Show file tree
Hide file tree
Changes from 96 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
59adedb
Basic Setup
apb7 Jul 19, 2018
a785896
Add protractor-production to config-file-paths
apb7 Jul 19, 2018
60a731c
Add copyright notice
apb7 Jul 19, 2018
dd93d40
Modify production conf
apb7 Jul 19, 2018
0bff650
Try out linux platform
apb7 Jul 19, 2018
1c09375
Change platform to mac
apb7 Jul 19, 2018
404e8d4
Merge branch 'develop' of https://github.com/oppia/oppia into browser…
apb7 Jul 20, 2018
f07b6bb
Revert Travis changes
apb7 Jul 20, 2018
8b4bc4b
Add sample env file for browserstack
apb7 Jul 20, 2018
9c7d3b4
Add configuration file for browserstack
apb7 Jul 20, 2018
14f5577
Other minor changes
apb7 Jul 20, 2018
16e0cd6
Add env example to config files
apb7 Jul 20, 2018
1ac8185
Add explanation for the process
apb7 Jul 20, 2018
bfb72ea
Add isMobile variable to existing conf file
apb7 Jul 23, 2018
0a6f6f5
Increase timeout for mobile device
apb7 Jul 23, 2018
ffb648d
Remove unused until variable
apb7 Jul 23, 2018
008326b
Add more options to example environment file
apb7 Jul 25, 2018
a3c48a9
Refactor learnerDashboard
apb7 Jul 25, 2018
40eeb8b
Add subscriptions end-to-end tests
apb7 Jul 25, 2018
a6015d1
Add export for completeSignup function
apb7 Jul 25, 2018
4bf14cc
Add reload functions in AdminPage object
apb7 Jul 25, 2018
d406e0d
Add helper functions for mobile in CreatorDashboardPage object
apb7 Jul 25, 2018
3835b02
Add demo test exploration for mobile and exploration id in feconf.py
apb7 Jul 25, 2018
88f0632
Make findExploration and findCollection functions suitable for mobile…
apb7 Jul 25, 2018
4093284
Add new spec and browser.isMobile
apb7 Jul 25, 2018
b79707b
Add end-to-end test suite for mobile
apb7 Jul 25, 2018
4630487
Review changes and spec addition
apb7 Jul 25, 2018
3e4cebe
Add protractor mobile test tags in various html files
apb7 Jul 25, 2018
97e9bd1
Remove trailing space in top_navigation_bar_directive.html
apb7 Jul 25, 2018
8217df9
Fix findCollection
apb7 Jul 25, 2018
09a2950
Add test exploration for rating mechanism
apb7 Jul 25, 2018
d4bc754
Refactor editorAndPlayer
apb7 Jul 25, 2018
18094e9
Add tests for ratings
apb7 Jul 25, 2018
f816deb
Add rating spec
apb7 Jul 25, 2018
91115ef
Review changes: capitalize letters
apb7 Jul 25, 2018
e4dec5d
Add console errors to libraryFlow
apb7 Jul 25, 2018
791c4be
Accept alert for reloadCollection
apb7 Jul 25, 2018
e84ee31
Modify loginFlow suit
apb7 Jul 25, 2018
631e037
Fix protractor mobile test tag
apb7 Jul 25, 2018
81adf35
Parallelize tests in configuration file
apb7 Jul 25, 2018
f88408f
Add refactored specs to Travis
apb7 Jul 25, 2018
92d9be7
Change the word collection to exploration
apb7 Jul 25, 2018
ffa8680
Remove extra spaces in comment
apb7 Jul 25, 2018
8846971
Change line break
apb7 Jul 25, 2018
8c9596d
Add test exploration for learner flow in mobile
apb7 Jul 25, 2018
0552a47
Add test collection for learner flow
apb7 Jul 25, 2018
ebc3585
Add entry in demo collections
apb7 Jul 25, 2018
7802dbe
Modify reloadCollection function to take in the collectionId
apb7 Jul 25, 2018
28ffb55
Add more specs to learnerFlow
apb7 Jul 25, 2018
adc48a6
Remove fit and add it in spec
apb7 Jul 25, 2018
6439520
Testing it out with Travis
apb7 Jul 26, 2018
db0dd1b
Add conditions to Travis
apb7 Jul 26, 2018
c7b854f
Minor tweak
apb7 Jul 26, 2018
57825a9
Remove demo condition in .travis.yml
apb7 Jul 27, 2018
169c0f6
Some review changes
apb7 Jul 27, 2018
24801e8
Add protractor_desktop dir
apb7 Jul 28, 2018
0ea9141
Restructure protractor dir
apb7 Jul 28, 2018
6aabbf7
Restructure protractor_mobile dir
apb7 Jul 28, 2018
32f3410
Add additional functions and do review changes
apb7 Jul 28, 2018
8936847
Restructure conf file
apb7 Jul 28, 2018
93a44b0
Restructure browserstack conf file
apb7 Jul 28, 2018
8fcfd9d
Modify test exploration
apb7 Jul 28, 2018
fb6c144
Modify tags
apb7 Jul 28, 2018
af360dc
Modify tags
apb7 Jul 28, 2018
63a44b9
Restructure travis config
apb7 Jul 28, 2018
01375d2
Merge branch 'develop' of https://github.com/oppia/oppia into browser…
apb7 Jul 28, 2018
6e857b0
Combine console with accesibility and make other changes
apb7 Jul 28, 2018
efb6d59
Remove console test from .travis.yml
apb7 Jul 28, 2018
6e0bee7
Restructure learnerDashboard tests
apb7 Jul 28, 2018
7f25654
Logout users
apb7 Jul 28, 2018
0311d78
Add libraryFlow to full in config
apb7 Jul 28, 2018
9e99692
Change function create exploration function name
apb7 Jul 28, 2018
0967489
Move ratings to libraryFlow
apb7 Jul 28, 2018
70f9c3c
Modifying config files
apb7 Jul 28, 2018
8446790
Minor tweaks
apb7 Jul 28, 2018
cbc746c
Change login name
apb7 Jul 28, 2018
11314e0
Add check for dev mode
apb7 Jul 28, 2018
7042a76
Add comments to config files
apb7 Jul 29, 2018
8fb7d5f
Rename desktop spec and modify config file
apb7 Jul 29, 2018
43aff58
.travis.yml
apb7 Jul 29, 2018
aef0569
Abstract commom functions in learnerFlow
apb7 Jul 29, 2018
978f7e7
Merge branch 'develop' of https://github.com/oppia/oppia into browser…
apb7 Jul 29, 2018
8cb84b3
Add quotes around env vars
apb7 Jul 29, 2018
a9c1dd2
libraryFlow: nit and unification
apb7 Jul 30, 2018
b2454b3
Further unification and review changes
apb7 Aug 1, 2018
0d5b996
Lint fix: fit --> it
apb7 Aug 1, 2018
8d901de
Fix learnerFlow tests
apb7 Aug 1, 2018
909c7fd
Fix var .travis.yml
apb7 Aug 2, 2018
f0b05d5
Modify check in protractor config file
apb7 Aug 2, 2018
cd1c226
Add exploration_player_test.yaml
apb7 Aug 2, 2018
3398940
Move functions to LearnerDashboardPage and unify learnerFlow
apb7 Aug 2, 2018
fe2f70c
Further unification and removal of branching
apb7 Aug 2, 2018
03c11ce
Modify space-before-function-paren rule and fix corresponding errors
apb7 Aug 2, 2018
b7ce549
Modify html tag and learnerFlow for mobile
apb7 Aug 2, 2018
9526b61
Minor tweak
apb7 Aug 2, 2018
61164f2
Merge branch 'develop' of https://github.com/oppia/oppia into browser…
apb7 Aug 2, 2018
37fc3a3
Create submitSearchQuery function
apb7 Aug 3, 2018
6a53974
Reduce branching in libraryFlow
apb7 Aug 3, 2018
b253c5a
Merge branch 'develop' of https://github.com/oppia/oppia into browser…
apb7 Aug 3, 2018
89f31bb
Remove file
apb7 Aug 3, 2018
b42cffd
Unification and fixes
apb7 Aug 3, 2018
99e4474
Fix search service
apb7 Aug 3, 2018
ba52b39
Add necessary tags
apb7 Aug 3, 2018
8096443
Reduce branching and other minor tweaks
apb7 Aug 3, 2018
796ff4c
Rename loginFlow to profileFlow and necessary changes
apb7 Aug 3, 2018
66f71b2
Rename profileFlow to profileMenuFlow and necessary changes
apb7 Aug 3, 2018
ad88702
Add explanation for desktop part of test
apb7 Aug 3, 2018
4e14f53
Remove console error msgs
apb7 Aug 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@
"space-before-function-paren": [
"error",
{
"anonymous": "ignore",
"asyncArrow": "ignore",
"anonymous": "never",
"asyncArrow": "never",
"named": "never",
}
],
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gae_runtime/*
third_party/*
backend_prod_files/*
core/templates/prod/*
core/tests/.browserstack.env
.coverage*
.viminfo
libpeerconnection.log
Expand Down
25 changes: 21 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ language: python
python:
- 2.7

addons:
browserstack:
username: $USERNAME
access_key: $ACCESS_KEY

branches:
only:
- master
Expand All @@ -22,13 +27,19 @@ env:
- RUN_E2E_TESTS_ACCESSIBILITY=true
- RUN_E2E_TESTS_COLLECTIONS=true
- RUN_E2E_TESTS_EDITOR_AND_PLAYER=true
- RUN_E2E_TESTS_STATE_EDITOR=true
- RUN_E2E_TESTS_EDITOR_FEATURES=true
- RUN_E2E_TESTS_EMBEDDING=true
- RUN_E2E_TESTS_EXTENSIONS=true
- RUN_E2E_TESTS_LEARNER_DASHBOARD=true
- RUN_E2E_TESTS_SUBSCRIPTIONS_AND_FEEDBACK_THREADS=true
- RUN_E2E_TESTS_LEARNER=true
- RUN_E2E_TESTS_LIBRARY=true
- RUN_E2E_TESTS_LOGIN=true
- RUN_E2E_TESTS_PUBLICATION=true
- RUN_E2E_TESTS_STATE_EDITOR=true
- RUN_E2E_TESTS_SUBSCRIPTIONS=true
- RUN_E2E_TESTS_USERS=true
# E2E tests for mobile.
- RUN_E2E_TESTS_MOBILE=true

matrix:
allow_failures: []
Expand Down Expand Up @@ -85,13 +96,19 @@ script:
- if [ "$RUN_E2E_TESTS_ACCESSIBILITY" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="accessibility" --prod_env; fi
- if [ "$RUN_E2E_TESTS_COLLECTIONS" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="collections" --prod_env; fi
- if [ "$RUN_E2E_TESTS_EDITOR_AND_PLAYER" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="editorAndPlayer" --prod_env; fi
- if [ "$RUN_E2E_TESTS_STATE_EDITOR" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="stateEditor" --prod_env; fi
- if [ "$RUN_E2E_TESTS_EDITOR_FEATURES" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="editorFeatures" --prod_env; fi
- if [ "$RUN_E2E_TESTS_EMBEDDING" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="embedding" --prod_env; fi
- if [ "$RUN_E2E_TESTS_EXTENSIONS" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="extensions" --prod_env; fi
- if [ "$RUN_E2E_TESTS_LEARNER_DASHBOARD" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="learnerDashboard" --prod_env; fi
- if [ "$RUN_E2E_TESTS_SUBSCRIPTIONS_AND_FEEDBACK_THREADS" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="learnerDashboardSubscriptionsAndFeedbackThreads" --prod_env; fi
- if [ "$RUN_E2E_TESTS_LEARNER" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="learner" --prod_env; fi
- if [ "$RUN_E2E_TESTS_LIBRARY" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="library" --prod_env; fi
- if [ "$RUN_E2E_TESTS_LOGIN" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="login" --prod_env; fi
- if [ "$RUN_E2E_TESTS_PUBLICATION" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="publication" --prod_env; fi
- if [ "$RUN_E2E_TESTS_STATE_EDITOR" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="stateEditor" --prod_env; fi
- if [ "$RUN_E2E_TESTS_SUBSCRIPTIONS" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="subscriptions" --prod_env; fi
- if [ "$RUN_E2E_TESTS_USERS" == 'true' ]; then travis_retry bash scripts/run_e2e_tests.sh --suite="users" --prod_env; fi
# Run e2e tests for mobile in dev mode since the demo explorations and collections are only available in the dev mode and not in production mode.
- if [ "$RUN_E2E_TESTS_MOBILE" == 'true' ] && [ "$TRAVIS_BRANCH" == 'develop' ] && [ "$TRAVIS_EVENT_TYPE" == 'push' ] && [ "$TRAVIS_PULL_REQUEST" == 'false' ]; then travis_retry bash scripts/run_e2e_tests.sh --browserstack; fi

after_success:
- if [ "$RUN_BACKEND_TESTS" == 'true' ] && [ "$REPORT_BACKEND_COVERAGE" == 'true' ]; then codecov; fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ oppia.directive('solutionEditor', [
ui_config: {}
};

$scope.getAnswerHtml = function () {
$scope.getAnswerHtml = function() {
return ExplorationHtmlFormatterService.getAnswerHtml(
StateSolutionService.savedMemento.correctAnswer,
StateInteractionIdService.savedMemento,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,35 +89,35 @@

<ul>
<li ng-class="{'active': NAV_MODE === 'library'}">
<a href="/library">
<a href="/library" class="protractor-mobile-test-library-link">
<i class="material-icons oppia-sidebar-menu-icon">&#xE88A;</i>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the class just be protractor-test-library-link? Are these links in the side navigation bar not clickable on desktop?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto for the other newly added protractor classes!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not have a side nav bar in desktop. It's only for mobile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? I am pretty sure if you resize your Desktop browser to a small enough width, the sidenav will show up, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, I think you're getting this wrong. I will definitely not be running the site on a desktop with the width of a mobile screen? Isn't this what distinguishes mobile and desktop -- the browser width?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My opinion is that these element's tags should not include the word "mobile" if they are accessible on desktop too.
P.S we can talk this over Gitter, should this PR get too lengthy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good :)

Copy link
Contributor

@hoangviet1993 hoangviet1993 Jul 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a close inspection , I would like to drop my review comments about the protractor-test-mobile name for the sidenav link.
The sidenav is not expected to be tested from Desktop 's e2e. We can keep things as is here!

<span translate="I18N_SIDEBAR_LIBRARY_LINK"></span>
</a>
</li>

<li ng-class="{'active': NAV_MODE === 'about'}">
<a href="/about">
<a href="/about" class="protractor-mobile-test-about-link">
<i class="material-icons oppia-sidebar-menu-icon">&#xE887;</i>
<span translate="I18N_SIDEBAR_ABOUT_LINK"></span>
</a>
</li>

<li ng-class="{'active': NAV_MODE === 'get_started'}">
<a href="/get_started">
<a href="/get_started" class="protractor-mobile-test-get-started-link">
<i class="oppia-sidebar-menu-icon fa">&#xf135;</i>
<span translate="I18N_SIDEBAR_GET_STARTED"></span>
</a>
</li>

<li ng-class="{'active': NAV_MODE === 'teach'}">
<a href="/teach">
<a href="/teach" class="protractor-mobile-test-teach-link">
<i class="material-icons oppia-sidebar-menu-icon">&#xE88E;</i>
<span translate="I18N_SIDEBAR_TEACH_WITH_OPPIA"></span>
</a>
</li>

<li ng-class="{'active': NAV_MODE === 'donate'}">
<a href="/donate">
<a href="/donate" class="protractor-mobile-test-donate-link">
<i class="material-icons oppia-sidebar-menu-icon">&#xE87D;</i>
<span translate="I18N_SIDEBAR_DONATE"></span>
</a>
Expand All @@ -131,7 +131,7 @@
</li>

<li ng-class="{'active': NAV_MODE === 'contact'}">
<a href="/contact">
<a href="/contact" class="protractor-mobile-test-contact-link">
<i class="material-icons oppia-sidebar-menu-icon">&#xE0BE;</i>
<span translate="I18N_SIDEBAR_CONTACT_US"></span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ oppia.directive('collectionSummaryTile', [
);
};

$scope.getCompleteThumbnailIconUrl = function () {
$scope.getCompleteThumbnailIconUrl = function() {
return UrlInterpolationService.getStaticImageUrl(
$scope.getThumbnailIconUrl());
};

$scope.getStaticImageUrl = function (url) {
$scope.getStaticImageUrl = function(url) {
return UrlInterpolationService.getStaticImageUrl(url);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ oppia.directive('explorationSummaryTile', [
$scope.$apply();
});

$scope.getCompleteThumbnailIconUrl = function () {
$scope.getCompleteThumbnailIconUrl = function() {
return UrlInterpolationService.getStaticImageUrl(
$scope.getThumbnailIconUrl());
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h3 class="activity-title protractor-test-exp-summary-tile-title" ng-style="isPl
</span>
</li>
</ul>
<button ng-if="isCollectionPreviewTile" class="oppia-learner-confirm-button md-button md-default-theme"
<button ng-if="isCollectionPreviewTile" class="oppia-learner-confirm-button md-button md-default-theme protractor-test-play-exploration-button"
style="display: block; margin: auto; touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
<span translate="I18N_PLAYER_PLAY_EXPLORATION"></span>
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="navbar-header protractor-test-navbar-header pull-left">
<a ng-if="windowIsNarrow" ng-click="toggleSidebar()"
class="navbar-brand oppia-navbar-menu oppia-transition-200" tabindex="0">
class="navbar-brand oppia-navbar-menu oppia-transition-200 protractor-mobile-test-navbar-button"
tabindex="0">
<i class="material-icons oppia-navbar-menu-icon" ng-if="!isSidebarShown()" >&#xE5D2;</i>
<i class="material-icons oppia-navbar-close-icon" ng-if="isSidebarShown()" >&#10005;</i>
</a>
Expand Down Expand Up @@ -112,13 +113,13 @@
<hr class="oppia-top-right-menu-item-separator">
<li>
<a ng-click="closeSubmenuIfNotMobile($event)" href="/creator_dashboard"
class="protractor-test-dashboard-link">
class="protractor-test-dashboard-link protractor-test-creator-dashboard-link">
<span translate="I18N_TOPNAV_CREATOR_DASHBOARD"></span>
</a>
</li>
<li>
<a ng-click="closeSubmenuIfNotMobile($event)" href="/learner_dashboard"
class="protractor-test-dashboard-link">
class="protractor-test-dashboard-link protractor-test-learner-dashboard-link">
<span translate="I18N_TOPNAV_LEARNER_DASHBOARD"></span>
</a>
</li>
Expand Down Expand Up @@ -161,7 +162,7 @@

<li uib-dropdown ng-if="!username" class="oppia-navbar-clickable-dropdown">
<div class="oppia-navbar-button-container" style="margin-right: 10px;">
<button class="btn oppia-navbar-button"
<button class="btn oppia-navbar-button protractor-mobile-test-login"
ng-click="onLoginButtonClicked()">
<span translate="I18N_TOPNAV_SIGN_IN"></span>
<span class="caret"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Solution object factory', function() {

describe('SolutionObjectFactory', function() {
var scope, sof, solution;
beforeEach(inject(function ($injector, $rootScope) {
beforeEach(inject(function($injector, $rootScope) {
scope = $rootScope.$new();
sof = $injector.get('SolutionObjectFactory');
solution = sof.createFromBackendDict({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ oppia.factory('FractionObjectFactory', [
this.denominator = denominator;
};

Fraction.prototype.toString = function () {
Fraction.prototype.toString = function() {
var fractionString = '';
if (this.numerator !== 0) {
fractionString += this.numerator + '/' + this.denominator;
Expand All @@ -60,17 +60,17 @@ oppia.factory('FractionObjectFactory', [
};
};

Fraction.prototype.toFloat = function () {
Fraction.prototype.toFloat = function() {
var totalParts = (this.wholeNumber * this.denominator) + this.numerator;
var floatVal = (totalParts / this.denominator);
return this.isNegative ? -floatVal : floatVal;
};

Fraction.prototype.getIntegerPart = function () {
Fraction.prototype.getIntegerPart = function() {
return this.isNegative ? -this.wholeNumber : this.wholeNumber;
};

Fraction.prototype.convertToSimplestForm = function () {
Fraction.prototype.convertToSimplestForm = function() {
var gcd = function(x, y) {
return y === 0 ? x : gcd(y, x % y);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('URL Interpolation Service', function() {
GLOBALS.DEV_MODE = true;
});

it('should add hash to url if hash is set', function () {
it('should add hash to url if hash is set', function() {
expect(uis._getUrlWithSlug('/hash_test.html')).toBe(
'/hash_test.' + hashes['/hash_test.html'] + '.html'
);
Expand All @@ -42,7 +42,7 @@ describe('URL Interpolation Service', function() {
);
});

it('should build complete URL with prefixes and hash', function () {
it('should build complete URL with prefixes and hash', function() {
expect(uis._getCompleteUrl('/test_folder', '/hash_test.html')).toBe(
'/build/test_folder/hash_test.' + hashes['/hash_test.html'] + '.html'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h2 ng-if="collectionPlaythrough.hasFinishedCollection()" class="oppia-page-head
<img ng-src="<[getStaticImageUrl('/general/collection_mascot.svg')]>" class="mobile-lesson-icon">
<div class="mobile-path-segment" ng-repeat="node in collection.getCollectionNodes()" id="mobile-path-anchor-<[$index]>">
<a href="" style="position: absolute; left: 50%; transform: translate(-50%, 195px); z-index: 1;">
<svg class="protractor-test-collection-exploration"
<svg class="protractor-mobile-test-collection-exploration"
width="100"
height="150"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ oppia.controller('CreatorDashboard', [
return value;
};

$scope.getCompleteThumbnailIconUrl = function (iconUrl) {
$scope.getCompleteThumbnailIconUrl = function(iconUrl) {
return UrlInterpolationService.getStaticImageUrl(iconUrl);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h2 class="oppia-dashboard-title" translate="I18N_DASHBOARD_CREATOR_DASHBOARD"><
<div>
<p translate="I18N_DASHBOARD_EXPLORATIONS_EMPTY_MESSAGE"></p>
<button type="button"
class="btn oppia-dashboard-intro-button oppia-transition-200"
class="btn oppia-dashboard-intro-button oppia-transition-200 protractor-test-create-new-exploration-button"
ng-click="createNewExploration()"
translate="I18N_CREATE_EXPLORATION">
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ oppia.directive('explorationObjectiveEditor', [
'exploration_objective_editor_directive.html'),
controller: [
'$scope', 'ExplorationObjectiveService',
function ($scope, ExplorationObjectiveService) {
function($scope, ExplorationObjectiveService) {
$scope.explorationObjectiveService = ExplorationObjectiveService;
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ oppia.factory('InteractionDetailsCacheService', [function() {
contains: function(interactionId) {
return _cache.hasOwnProperty(interactionId);
},
removeDetails: function (interactionId) {
removeDetails: function(interactionId) {
delete _cache[interactionId];
},
set: function(interactionId, interactionCustomizationArgs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ oppia.factory('ResponsesService', [
callback(_answerGroupsMemento);
};

var _updateAnswerGroupsAudioTranslation = function () {
var _updateAnswerGroupsAudioTranslation = function() {
StateContentIdsToAudioTranslationsService.displayed.
deleteAllFeedbackContentId();
for (var i = 0; i < _answerGroups.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Solution Validity Service', function() {
svs = $injector.get('SolutionValidityService');

it('should store validity of the solution correctly',
function () {
function() {
// Initialize SolutionValidityService.
svs.init();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ oppia.directive('pieChart', [function() {

// Need to wait for load statement in editor template to finish.
// https://stackoverflow.com/questions/42714876/
google.charts.setOnLoadCallback(function () {
google.charts.setOnLoadCallback(function() {
if (!chart) {
chart = new google.visualization.PieChart($element[0]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ oppia.controller('LearnerDashboard', [
ui.placeholder.height(ui.item.height());
$scope.$apply();
},
sort: function (e, ui) {
sort: function(e, ui) {
/* eslint-disable quote-props */
// Reset the position of the window on scrolling. This keeps the mouse
// position and elements in sync.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h1 class="stat-value"><[subscriptionsList.length]></h1>
<p class="oppia-learner-dashboard-intro-card-message" style="padding-top: 15px;"
translate="I18N_LEARNER_DASHBOARD_INTRO_MESSAGE_PART_TWO">
</p>
<a class="btn oppia-learner-dashboard-intro-button oppia-transition-200"
<a class="btn oppia-learner-dashboard-intro-button oppia-transition-200 protractor-mobile-test-learner-dashboard-intro-button"
translate="I18N_ACTION_BROWSE_LESSONS"
ng-href="/library">
</a>
Expand Down
2 changes: 1 addition & 1 deletion core/templates/dev/head/pages/library/Library.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ oppia.controller('Library', [

// Check if actual and expected widths are the same.
// If not produce an error that would be caught by e2e tests.
$timeout(function () {
$timeout(function() {
var actualWidth = $('exploration-summary-tile').width();
if (actualWidth && actualWidth !== LIBRARY_TILE_WIDTH_PX) {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

oppia.directive('skillConceptCardEditor', [
'UrlInterpolationService', 'SkillUpdateService', 'SkillEditorStateService',
function (
function(
UrlInterpolationService, SkillUpdateService, SkillEditorStateService) {
return {
restrict: 'E',
Expand Down
Loading