'Publish first unit in LMS and verify that Courseware page has given Groups'

def publish_unit_and_verify_groups_in_lms(self, courseware_page, group_names, publish=True):

    self.publish_unit_in_lms_and_view(courseware_page, publish)
    self.assertEqual(u'split_test', courseware_page.xblock_component_type())
    self.assertTrue(courseware_page.q(css='.split-test-select').is_present())
    rendered_group_names = self.get_select_options(page=courseware_page, selector='.split-test-select')
    self.assertListEqual(group_names, rendered_group_names)
