Merge pull request #21928 from cpennington/absolute-path-bokchoy-uploads
Use absolute paths to upload files in more bokchoy tests
This commit is contained in:
@@ -6,6 +6,7 @@ Instructor (2) dashboard page.
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import os.path
|
||||
|
||||
import six
|
||||
from bok_choy.page_object import PageObject
|
||||
@@ -138,7 +139,7 @@ class InstructorDashboardPage(CoursePage):
|
||||
# Separate the list of folders in the path reaching to the current file,
|
||||
# e.g. '... common/test/acceptance/pages/lms/instructor_dashboard.py' will result in
|
||||
# [..., 'common', 'test', 'acceptance', 'pages', 'lms', 'instructor_dashboard.py']
|
||||
folders_list_in_path = __file__.split(os.sep)
|
||||
folders_list_in_path = os.path.abspath(__file__).split(os.sep)
|
||||
|
||||
# Get rid of the last 4 elements: 'acceptance', 'pages', 'lms', and 'instructor_dashboard.py'
|
||||
# to point to the 'test' folder, a shared point in the path's tree.
|
||||
|
||||
@@ -5,6 +5,7 @@ Course Schedule and Details Settings page.
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import os
|
||||
import os.path
|
||||
|
||||
import six
|
||||
from bok_choy.javascript import requirejs
|
||||
@@ -314,7 +315,7 @@ class SettingsPage(CoursePage):
|
||||
# Separate the list of folders in the path reaching to the current file,
|
||||
# e.g. '... common/test/acceptance/pages/lms/instructor_dashboard.py' will result in
|
||||
# [..., 'common', 'test', 'acceptance', 'pages', 'lms', 'instructor_dashboard.py']
|
||||
folders_list_in_path = __file__.split(os.sep)
|
||||
folders_list_in_path = os.path.abspath(__file__).split(os.sep)
|
||||
|
||||
# Get rid of the last 4 elements: 'acceptance', 'pages', 'lms', and 'instructor_dashboard.py'
|
||||
# to point to the 'test' folder, a shared point in the path's tree.
|
||||
|
||||
@@ -11,6 +11,7 @@ The methods in these classes are organized into several conceptual buckets:
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import os.path
|
||||
|
||||
from bok_choy.promise import EmptyPromise
|
||||
from selenium.webdriver import ActionChains
|
||||
@@ -443,7 +444,7 @@ class SignatorySectionPage(CertificatesPage):
|
||||
|
||||
"""
|
||||
# Should grab common point between this page module and the data folder.
|
||||
return os.sep.join(__file__.split(os.sep)[:-4]) + '/data/uploads/' + filename
|
||||
return os.sep.join(os.path.abspath(__file__).split(os.sep)[:-4]) + '/data/uploads/' + filename
|
||||
|
||||
def get_selector(self, css=''):
|
||||
"""
|
||||
|
||||
@@ -6,6 +6,7 @@ End-to-end tests related to the cohort management on the LMS Instructor Dashboar
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user