def test_common_problem_component(self):
        """
        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 |
            | Checkboxes           |
            | Dropdown             |
            | Multiple Choice      |
            | Numerical Input      |
            | Text Input           |
        Then I see Problem components in this order:
            | Component            |
            | Blank Common Problem |
            | Checkboxes           |
            | Dropdown             |
            | Multiple Choice      |
            | Numerical Input      |
            | Text Input           |
        """
        # Components to be added.
        components = ['Blank Common Problem', 'Checkboxes', 'Dropdown',
                      'Multiple Choice', 'Numerical Input', 'Text Input']

        self.go_to_unit_page()
        container_page = ContainerPage(self.browser, None)
        # Add components
        add_components(container_page, 'problem', components)
        problems = [x_block.name for x_block in container_page.xblocks[1:]]
        # Assert that components appear in the same order as added.
        self.assertEqual(problems, components)
    def test_common_problem_component(self):
        """
        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 |
            | Checkboxes           |
            | Dropdown             |
            | Multiple Choice      |
            | Numerical Input      |
            | Text Input           |
        Then I see Problem components in this order:
            | Component            |
            | Blank Common Problem |
            | Checkboxes           |
            | Dropdown             |
            | Multiple Choice      |
            | Numerical Input      |
            | Text Input           |
        """
        # Components to be added.
        components = ['Blank Common Problem', 'Checkboxes', 'Dropdown',
                      'Multiple Choice', 'Numerical Input', 'Text Input']

        self.go_to_unit_page()
        container_page = ContainerPage(self.browser, None)
        # Add components
        add_components(container_page, 'problem', components)
        problems = [x_block.name for x_block in container_page.xblocks[1:]]
        # Assert that components appear in the same order as added.
        self.assertEqual(problems, components)
 def test_add_html_component(self):
     """
     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            |
         | Zooming Image Tool      |
         | Raw HTML                |
     Then I see HTML components in this order:
         | Component               |
         | Text                    |
         | Announcement            |
         | Zooming Image Tool      |
         | Raw HTML                |
     """
     # Components to be added
     components = ['Text', 'Announcement', 'Zooming Image Tool', 'Raw HTML']
     self.go_to_unit_page()
     container_page = ContainerPage(self.browser, None)
     # Add components
     add_components(container_page, 'html', components)
     problems = [x_block.name for x_block in container_page.xblocks[1:]]
     # Assert that components appear in same order as added.
     self.assertEqual(problems, components)
 def test_add_html_component(self):
     """
     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            |
         | Zooming Image Tool      |
         | Raw HTML                |
     Then I see HTML components in this order:
         | Component               |
         | Text                    |
         | Announcement            |
         | Zooming Image Tool      |
         | Raw HTML                |
     """
     # Components to be added
     components = ['Text', 'Announcement', 'Zooming Image Tool', 'Raw HTML']
     self.go_to_unit_page()
     container_page = ContainerPage(self.browser, None)
     # Add components
     add_components(container_page, 'html', components)
     problems = [x_block.name for x_block in container_page.xblocks[1:]]
     # Assert that components appear in same order as added.
     self.assertEqual(problems, components)