Fix validation for checkboxes in forms.
Remove hard-coded TOS checkbox in registration template. Disable new dashboard in settings; expose password reset end-point in student account app. Added empty JS tests for new JavaScript
This commit is contained in:
@@ -216,6 +216,7 @@
|
||||
exports: 'js/student_account/account',
|
||||
deps: ['jquery', 'underscore', 'backbone', 'gettext', 'jquery.cookie']
|
||||
},
|
||||
|
||||
'js/student_profile/profile': {
|
||||
exports: 'js/student_profile/profile',
|
||||
deps: ['jquery', 'underscore', 'backbone', 'gettext', 'jquery.cookie']
|
||||
@@ -231,6 +232,7 @@
|
||||
exports: 'js/dashboard/donation',
|
||||
deps: ['jquery', 'underscore', 'gettext']
|
||||
},
|
||||
|
||||
// Backbone classes loaded explicitly until they are converted to use RequireJS
|
||||
'js/models/cohort': {
|
||||
exports: 'CohortModel',
|
||||
@@ -257,7 +259,42 @@
|
||||
'js/views/notification': {
|
||||
exports: 'NotificationView',
|
||||
deps: ['backbone', 'jquery', 'underscore']
|
||||
}
|
||||
},
|
||||
|
||||
// Student account registration/login
|
||||
// Loaded explicitly until these are converted to RequireJS
|
||||
'js/student_account/models/LoginModel': {
|
||||
exports: 'js/student_account/models/LoginModel',
|
||||
deps: ['jquery', 'underscore', 'backbone', 'gettext', 'jquery.cookie']
|
||||
},
|
||||
'js/student_account/views/LoginView': {
|
||||
exports: 'js/student_account/views/LoginView',
|
||||
deps: ['js/student_account/models/LoginModel']
|
||||
},
|
||||
'js/student_account/models/PasswordResetModel': {
|
||||
exports: 'js/student_account/models/PasswordResetModel',
|
||||
deps: ['jquery', 'underscore', 'backbone', 'gettext', 'jquery.cookie']
|
||||
},
|
||||
'js/student_account/views/PasswordResetView': {
|
||||
exports: 'js/student_account/views/PasswordResetView',
|
||||
deps: ['js/student_account/models/PasswordResetModel']
|
||||
},
|
||||
'js/student_account/models/RegisterModel': {
|
||||
exports: 'js/student_account/models/RegisterModel',
|
||||
deps: ['jquery', 'underscore', 'backbone', 'gettext', 'jquery.cookie']
|
||||
},
|
||||
'js/student_account/views/RegisterView': {
|
||||
exports: 'js/student_account/views/RegisterView',
|
||||
deps: ['js/student_account/models/RegisterModel']
|
||||
},
|
||||
'js/student_account/views/AccessView': {
|
||||
exports: 'js/student_account/views/AccessView',
|
||||
deps: [
|
||||
'js/student_account/views/LoginView',
|
||||
'js/student_account/views/PasswordResetView',
|
||||
'js/student_account/views/RegisterView'
|
||||
]
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -270,7 +307,11 @@
|
||||
'lms/include/js/spec/views/notification_spec.js',
|
||||
'lms/include/js/spec/dashboard/donation.js',
|
||||
'lms/include/js/spec/student_account/account.js',
|
||||
'lms/include/js/spec/student_profile/profile.js'
|
||||
'lms/include/js/spec/student_account/access_spec.js',
|
||||
'lms/include/js/spec/student_account/login_spec.js',
|
||||
'lms/include/js/spec/student_account/register_spec.js',
|
||||
'lms/include/js/spec/student_account/password_reset_spec.js',
|
||||
'lms/include/js/spec/student_profile/profile.js',
|
||||
]);
|
||||
|
||||
}).call(this, requirejs, define);
|
||||
|
||||
19
lms/static/js/spec/student_account/access_spec.js
Normal file
19
lms/static/js/spec/student_account/access_spec.js
Normal file
@@ -0,0 +1,19 @@
|
||||
define(['js/student_account/views/AccessView'],
|
||||
function() {
|
||||
'use strict';
|
||||
|
||||
describe("edx.student.account.AccessView", function() {
|
||||
it("initially displays the correct form", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("toggles between the login and registration forms", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays the reset password form", function() {
|
||||
// TODO
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
39
lms/static/js/spec/student_account/login_spec.js
Normal file
39
lms/static/js/spec/student_account/login_spec.js
Normal file
@@ -0,0 +1,39 @@
|
||||
define(['js/student_account/views/LoginView'],
|
||||
function() {
|
||||
'use strict';
|
||||
|
||||
describe("edx.student.account.LoginView", function() {
|
||||
it("logs the user in", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays third party auth login buttons", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("validates the email field", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("validates the password field", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays login errors", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays an error if the form definition could not be loaded", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays an error if the server could not be contacted while logging in", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("allows the user to navigate to the password assistance form", function() {
|
||||
// TODO
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
23
lms/static/js/spec/student_account/password_reset_spec.js
Normal file
23
lms/static/js/spec/student_account/password_reset_spec.js
Normal file
@@ -0,0 +1,23 @@
|
||||
define(['js/student_account/views/PasswordResetView'],
|
||||
function() {
|
||||
'use strict';
|
||||
|
||||
describe("edx.student.account.PasswordResetView", function() {
|
||||
it("allows the user to request a new password", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("validates the email field", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays password reset errors", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays an error if the server could not be contacted", function() {
|
||||
// TODO
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
31
lms/static/js/spec/student_account/register_spec.js
Normal file
31
lms/static/js/spec/student_account/register_spec.js
Normal file
@@ -0,0 +1,31 @@
|
||||
define(['js/student_account/views/RegisterView'],
|
||||
function() {
|
||||
'use strict';
|
||||
|
||||
describe("edx.student.account.RegisterView", function() {
|
||||
it("registers a new user", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays third party auth registration buttons", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("validates form fields", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays registration errors", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays an error if the form definition could not be loaded", function() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
it("displays an error if the server could not be contacted while registering", function() {
|
||||
// TODO
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user