diff --git a/lms/djangoapps/portal/features/common.py b/lms/djangoapps/courseware/features/common.py similarity index 97% rename from lms/djangoapps/portal/features/common.py rename to lms/djangoapps/courseware/features/common.py index 8bfb548367..2e19696ad4 100644 --- a/lms/djangoapps/portal/features/common.py +++ b/lms/djangoapps/courseware/features/common.py @@ -1,5 +1,4 @@ -from lettuce import world, step # , before, after -from factories import * +from lettuce import world, step from django.core.management import call_command from nose.tools import assert_equals, assert_in from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/features/courses.py b/lms/djangoapps/courseware/features/courses.py index 9b1316b00d..77756adca2 100644 --- a/lms/djangoapps/courseware/features/courses.py +++ b/lms/djangoapps/courseware/features/courses.py @@ -8,8 +8,6 @@ from logging import getLogger logger = getLogger(__name__) ## support functions - - def get_courses(): ''' Returns dict of lists of courses available, keyed by course.org (ie university). @@ -20,29 +18,6 @@ def get_courses(): courses = sorted(courses, key=lambda course: course.number) return courses -# def get_courseware(course_id): -# """ -# Given a course_id (string), return a courseware array of dictionaries for the -# top two levels of navigation. Example: - -# [ -# {'chapter_name': 'Overview', -# 'sections': ['Welcome', 'System Usage Sequence', 'Lab0: Using the tools', 'Circuit Sandbox'] -# }, -# {'chapter_name': 'Week 1', -# 'sections': ['Administrivia and Circuit Elements', 'Basic Circuit Analysis', 'Resistor Divider', 'Week 1 Tutorials'] -# }, -# {'chapter_name': 'Midterm Exam', -# 'sections': ['Midterm Exam'] -# } -# ] -# """ - -# course = get_course_by_id(course_id) -# chapters = course.get_children() -# courseware = [ {'chapter_name':c.display_name, 'sections':[s.display_name for s in c.get_children()]} for c in chapters] -# return courseware - def get_courseware_with_tabs(course_id): """ diff --git a/lms/djangoapps/courseware/features/courseware.feature b/lms/djangoapps/courseware/features/courseware.feature index 21c7e84541..279e5732c9 100644 --- a/lms/djangoapps/courseware/features/courseware.feature +++ b/lms/djangoapps/courseware/features/courseware.feature @@ -9,10 +9,3 @@ Feature: View the Courseware Tab And I click on View Courseware When I click on the "Courseware" tab Then the "Courseware" tab is active - - # TODO: fix this one? Not sure whether you should get a 404. - # Scenario: I cannot get to the courseware tab when not logged in - # Given I am not logged in - # And I visit the homepage - # When I visit the courseware URL - # Then the login dialog is visible diff --git a/lms/djangoapps/portal/features/homepage.feature b/lms/djangoapps/courseware/features/homepage.feature similarity index 100% rename from lms/djangoapps/portal/features/homepage.feature rename to lms/djangoapps/courseware/features/homepage.feature diff --git a/lms/djangoapps/portal/features/homepage.py b/lms/djangoapps/courseware/features/homepage.py similarity index 100% rename from lms/djangoapps/portal/features/homepage.py rename to lms/djangoapps/courseware/features/homepage.py diff --git a/lms/djangoapps/portal/features/login.feature b/lms/djangoapps/courseware/features/login.feature similarity index 100% rename from lms/djangoapps/portal/features/login.feature rename to lms/djangoapps/courseware/features/login.feature diff --git a/lms/djangoapps/portal/features/login.py b/lms/djangoapps/courseware/features/login.py similarity index 99% rename from lms/djangoapps/portal/features/login.py rename to lms/djangoapps/courseware/features/login.py index 094db078ca..b394f359d5 100644 --- a/lms/djangoapps/portal/features/login.py +++ b/lms/djangoapps/courseware/features/login.py @@ -33,8 +33,6 @@ def click_the_dropdown(step): e.click() #### helper functions - - def user_is_an_unactivated_user(uname): u = User.objects.get(username=uname) u.is_active = False diff --git a/lms/djangoapps/courseware/features/openended.feature b/lms/djangoapps/courseware/features/openended.feature index 3c7043ba54..cc9f6e1c5f 100644 --- a/lms/djangoapps/courseware/features/openended.feature +++ b/lms/djangoapps/courseware/features/openended.feature @@ -3,31 +3,35 @@ Feature: Open ended grading In order to complete the courseware questions I want the machine learning grading to be functional - Scenario: An answer that is too short is rejected - Given I navigate to an openended question - And I enter the answer "z" - When I press the "Check" button - And I wait for "8" seconds - And I see the grader status "Submitted for grading" - And I press the "Recheck for Feedback" button - Then I see the red X - And I see the grader score "0" + # Commenting these all out right now until we can + # make a reference implementation for a course with + # an open ended grading problem that is always available + # + # Scenario: An answer that is too short is rejected + # Given I navigate to an openended question + # And I enter the answer "z" + # When I press the "Check" button + # And I wait for "8" seconds + # And I see the grader status "Submitted for grading" + # And I press the "Recheck for Feedback" button + # Then I see the red X + # And I see the grader score "0" - Scenario: An answer with too many spelling errors is rejected - Given I navigate to an openended question - And I enter the answer "az" - When I press the "Check" button - And I wait for "8" seconds - And I see the grader status "Submitted for grading" - And I press the "Recheck for Feedback" button - Then I see the red X - And I see the grader score "0" - When I click the link for full output - Then I see the spelling grading message "More spelling errors than average." + # Scenario: An answer with too many spelling errors is rejected + # Given I navigate to an openended question + # And I enter the answer "az" + # When I press the "Check" button + # And I wait for "8" seconds + # And I see the grader status "Submitted for grading" + # And I press the "Recheck for Feedback" button + # Then I see the red X + # And I see the grader score "0" + # When I click the link for full output + # Then I see the spelling grading message "More spelling errors than average." - Scenario: An answer makes its way to the instructor dashboard - Given I navigate to an openended question as staff - When I submit the answer "I love Chemistry." - And I wait for "8" seconds - And I visit the staff grading page - Then my answer is queued for instructor grading \ No newline at end of file + # Scenario: An answer makes its way to the instructor dashboard + # Given I navigate to an openended question as staff + # When I submit the answer "I love Chemistry." + # And I wait for "8" seconds + # And I visit the staff grading page + # Then my answer is queued for instructor grading diff --git a/lms/djangoapps/portal/features/registration.feature b/lms/djangoapps/courseware/features/registration.feature similarity index 94% rename from lms/djangoapps/portal/features/registration.feature rename to lms/djangoapps/courseware/features/registration.feature index d8a6796ee3..d9b588534b 100644 --- a/lms/djangoapps/portal/features/registration.feature +++ b/lms/djangoapps/courseware/features/registration.feature @@ -14,4 +14,4 @@ Feature: Register for a course And I visit the dashboard When I click the link with the text "Unregister" And I press the "Unregister" button in the Unenroll dialog - Then I should see "Looks like you haven't registered for any courses yet." somewhere in the page \ No newline at end of file + Then I should see "Looks like you haven't registered for any courses yet." somewhere in the page diff --git a/lms/djangoapps/portal/features/registration.py b/lms/djangoapps/courseware/features/registration.py similarity index 100% rename from lms/djangoapps/portal/features/registration.py rename to lms/djangoapps/courseware/features/registration.py diff --git a/lms/djangoapps/portal/features/signup.feature b/lms/djangoapps/courseware/features/signup.feature similarity index 100% rename from lms/djangoapps/portal/features/signup.feature rename to lms/djangoapps/courseware/features/signup.feature diff --git a/lms/djangoapps/portal/features/signup.py b/lms/djangoapps/courseware/features/signup.py similarity index 100% rename from lms/djangoapps/portal/features/signup.py rename to lms/djangoapps/courseware/features/signup.py diff --git a/lms/djangoapps/courseware/features/smart-accordion.feature b/lms/djangoapps/courseware/features/smart-accordion.feature index 90d097144a..ccf1d45601 100644 --- a/lms/djangoapps/courseware/features/smart-accordion.feature +++ b/lms/djangoapps/courseware/features/smart-accordion.feature @@ -23,37 +23,41 @@ Feature: There are courses on the homepage As an acceptance test I want to count all the chapters, sections, and tabs for each course - Scenario: Navigate through course MITx/3.091x/2012_Fall - Given I am registered for course "MITx/3.091x/2012_Fall" - And I log in - Then I verify all the content of each course + # Commenting these all out for now because they don't always run, + # they have too many prerequesites, e.g. the course exists, and + # is within the start and end dates, etc. - Scenario: Navigate through course MITx/6.002x/2012_Fall - Given I am registered for course "MITx/6.002x/2012_Fall" - And I log in - Then I verify all the content of each course + # Scenario: Navigate through course MITx/3.091x/2012_Fall + # Given I am registered for course "MITx/3.091x/2012_Fall" + # And I log in + # Then I verify all the content of each course - Scenario: Navigate through course MITx/6.00x/2012_Fall - Given I am registered for course "MITx/6.00x/2012_Fall" - And I log in - Then I verify all the content of each course + # Scenario: Navigate through course MITx/6.002x/2012_Fall + # Given I am registered for course "MITx/6.002x/2012_Fall" + # And I log in + # Then I verify all the content of each course - Scenario: Navigate through course HarvardX/PH207x/2012_Fall - Given I am registered for course "HarvardX/PH207x/2012_Fall" - And I log in - Then I verify all the content of each course + # Scenario: Navigate through course MITx/6.00x/2012_Fall + # Given I am registered for course "MITx/6.00x/2012_Fall" + # And I log in + # Then I verify all the content of each course - Scenario: Navigate through course BerkeleyX/CS169.1x/2012_Fall - Given I am registered for course "BerkeleyX/CS169.1x/2012_Fall" - And I log in - Then I verify all the content of each course + # Scenario: Navigate through course HarvardX/PH207x/2012_Fall + # Given I am registered for course "HarvardX/PH207x/2012_Fall" + # And I log in + # Then I verify all the content of each course - Scenario: Navigate through course BerkeleyX/CS169.2x/2012_Fall - Given I am registered for course "BerkeleyX/CS169.2x/2012_Fall" - And I log in - Then I verify all the content of each course + # Scenario: Navigate through course BerkeleyX/CS169.1x/2012_Fall + # Given I am registered for course "BerkeleyX/CS169.1x/2012_Fall" + # And I log in + # Then I verify all the content of each course - Scenario: Navigate through course BerkeleyX/CS184.1x/2012_Fall - Given I am registered for course "BerkeleyX/CS184.1x/2012_Fall" - And I log in - Then I verify all the content of each course \ No newline at end of file + # Scenario: Navigate through course BerkeleyX/CS169.2x/2012_Fall + # Given I am registered for course "BerkeleyX/CS169.2x/2012_Fall" + # And I log in + # Then I verify all the content of each course + + # Scenario: Navigate through course BerkeleyX/CS184.1x/2012_Fall + # Given I am registered for course "BerkeleyX/CS184.1x/2012_Fall" + # And I log in + # Then I verify all the content of each course \ No newline at end of file diff --git a/lms/djangoapps/portal/README.md b/lms/djangoapps/portal/README.md deleted file mode 100644 index 09930ec8fb..0000000000 --- a/lms/djangoapps/portal/README.md +++ /dev/null @@ -1,15 +0,0 @@ -## acceptance_testing - -This fake django app is here to support acceptance testing using lettuce + -splinter (which wraps selenium). - -First you need to make sure that you've installed the requirements. -This includes lettuce, selenium, splinter, etc. -Do this with: -```pip install -r test-requirements.txt``` - -The settings.py environment file used is named acceptance.py. -It uses a test SQLite database defined as ../db/test-mitx.db. -You need to first start up the server separately, then run the lettuce scenarios. - -Full documentation can be found on the wiki at this link. diff --git a/lms/djangoapps/portal/__init__.py b/lms/djangoapps/portal/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lms/djangoapps/portal/features/factories.py b/lms/djangoapps/portal/features/factories.py deleted file mode 100644 index 71781ea3d6..0000000000 --- a/lms/djangoapps/portal/features/factories.py +++ /dev/null @@ -1,37 +0,0 @@ -import factory -from student.models import User, UserProfile, Registration -from datetime import datetime -import uuid - - -class UserProfileFactory(factory.Factory): - FACTORY_FOR = UserProfile - - user = None - name = 'Jack Foo' - level_of_education = None - gender = 'm' - mailing_address = None - goals = 'World domination' - - -class RegistrationFactory(factory.Factory): - FACTORY_FOR = Registration - - user = None - activation_key = uuid.uuid4().hex - - -class UserFactory(factory.Factory): - FACTORY_FOR = User - - username = 'robot' - email = 'robot+test@edx.org' - password = 'test' - first_name = 'Robot' - last_name = 'Test' - is_staff = False - is_active = True - is_superuser = False - last_login = datetime(2012, 1, 1) - date_joined = datetime(2011, 1, 1) diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index 412815a402..b6941f4a70 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -38,4 +38,4 @@ MITX_FEATURES['STUB_VIDEO_FOR_TESTING'] = True # Include the lettuce app for acceptance testing, including the 'harvest' django-admin command INSTALLED_APPS += ('lettuce.django',) -LETTUCE_APPS = ('portal',) # dummy app covers the home page, login, registration, and course enrollment +LETTUCE_APPS = ('courseware',)