Commit 8ab2e3c3 by Jay Zoldak

Merge pull request #1179 from edx/zoldak/enable-component-acceptance-tests

Re-enable the component acceptance tests
parents 38642d28 50dc93dc
......@@ -168,6 +168,18 @@ def log_into_studio(
assert_in(uname, world.css_text('h2.title', timeout=10))
def add_course_author(user, course):
"""
Add the user to the instructor group of the course
so they will have the permissions to see it in studio
"""
for role in ("staff", "instructor"):
groupname = get_course_groupname_for_role(course.location, role)
group, __ = Group.objects.get_or_create(name=groupname)
user.groups.add(group)
user.save()
def create_a_course():
course = world.CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course')
world.scenario_dict['COURSE'] = course
......@@ -176,13 +188,7 @@ def create_a_course():
if not user:
user = get_user_by_email('robot+studio@edx.org')
# Add the user to the instructor group of the course
# so they will have the permissions to see it in studio
for role in ("staff", "instructor"):
groupname = get_course_groupname_for_role(course.location, role)
group, __ = Group.objects.get_or_create(name=groupname)
user.groups.add(group)
user.save()
add_course_author(user, course)
# Navigate to the studio dashboard
world.visit('/')
......
......@@ -2,85 +2,87 @@
Feature: CMS.Component Adding
As a course author, I want to be able to add a wide variety of components
#Scenario: I can add components
# Given I have opened a new course in studio
# And I am editing a new unit
# When I add the following components:
# | Component |
# | Discussion |
# | Blank HTML |
# | LaTex |
# | Blank Problem|
# | Dropdown |
# | Multi Choice |
# | Numerical |
# | Text Input |
# | Advanced |
# | Circuit |
# | Custom Python|
# | Image Mapped |
# | Math Input |
# | Problem LaTex|
# | Adaptive Hint|
# | Video |
# Then I see the following components:
# | Component |
# | Discussion |
# | Blank HTML |
# | LaTex |
# | Blank Problem|
# | Dropdown |
# | Multi Choice |
# | Numerical |
# | Text Input |
# | Advanced |
# | Circuit |
# | Custom Python|
# | Image Mapped |
# | Math Input |
# | Problem LaTex|
# | Adaptive Hint|
# | Video |
Scenario: I can add single step components
Given I am in Studio editing a new unit
When I add this type of single step component:
| Component |
| Discussion |
| Video |
Then I see this type of single step component:
| Component |
| Discussion |
| Video |
#Scenario: I can delete Components
# Given I have opened a new course in studio
# And I am editing a new unit
# And I add the following components:
# | Component |
# | Discussion |
# | Blank HTML |
# | LaTex |
# | Blank Problem|
# | Dropdown |
# | Multi Choice |
# | Numerical |
# | Text Input |
# | Advanced |
# | Circuit |
# | Custom Python|
# | Image Mapped |
# | Math Input |
# | Problem LaTex|
# | Adaptive Hint|
# | Video |
# When I will confirm all alerts
# And I delete all components
# Then I see no components
Scenario: I can add HTML components
Given I am in Studio editing a new unit
When I add this type of HTML component:
| Component |
| Text |
| Announcement |
| E-text Written in LaTeX |
Then I see HTML components in this order:
| Component |
| Text |
| Announcement |
| E-text Written in LaTeX |
Scenario: I can add Common Problem components
Given I am in Studio editing a new unit
When I add this type of Problem component:
| Component |
| Blank Common Problem |
| Dropdown |
| Multiple Choice |
| Numerical Input |
| Text Input |
Then I see Problem components in this order:
| Component |
| Blank Common Problem |
| Dropdown |
| Multiple Choice |
| Numerical Input |
| Text Input |
Scenario: I can add Advanced Problem components
Given I am in Studio editing a new unit
When I add this type of Advanced Problem component:
| Component |
| Blank Advanced Problem |
| Circuit Schematic Builder |
| Custom Python-Evaluated Input |
| Drag and Drop |
| Image Mapped Input |
| Math Expression Input |
| Problem Written in LaTeX |
| Problem with Adaptive Hint |
Then I see Problem components in this order:
| Component |
| Blank Advanced Problem |
| Circuit Schematic Builder |
| Custom Python-Evaluated Input |
| Drag and Drop |
| Image Mapped Input |
| Math Expression Input |
| Problem Written in LaTeX |
| Problem with Adaptive Hint |
Scenario: I see a prompt on delete
Given I have opened a new course in studio
And I am editing a new unit
And I add the following components:
| Component |
| Discussion |
And I delete a component
Then I am shown a prompt
Given I am in Studio editing a new unit
And I add a "Discussion" "single step" component
And I delete a component
Then I am shown a prompt
Scenario: I can delete Components
Given I am in Studio editing a new unit
And I add a "Discussion" "single step" component
And I add a "Text" "HTML" component
And I add a "Blank Common Problem" "Problem" component
And I add a "Blank Advanced Problem" "Advanced Problem" component
And I delete all components
Then I see no components
Scenario: I see a notification on save
Given I have opened a new course in studio
And I am editing a new unit
And I add the following components:
| Component |
| Discussion |
Scenario: I see a notification on save
Given I am in Studio editing a new unit
And I add a "Discussion" "single step" component
And I edit and save a component
Then I am shown a notification
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment