Skip to content

Commit 2c61aa2

Browse files
committed
Remove other references to Quickfiles
1 parent 4fa4be0 commit 2c61aa2

File tree

3 files changed

+0
-33
lines changed

3 files changed

+0
-33
lines changed

api/osf_api.py

-31
Original file line numberDiff line numberDiff line change
@@ -61,29 +61,6 @@ def get_user_addon(session, provider, user=None):
6161
return session.get(addon_url)
6262

6363

64-
def upload_single_quickfile(session):
65-
"""Upload a new quickfile. Delete existing quickfiles first.
66-
Note: Currently using v2.0 of the API. Certain lines will need to be changed on update.
67-
TODO: Make this more general.
68-
"""
69-
70-
user = current_user(session)
71-
quickfiles_url = user.relationships.quickfiles['links']['related']['href']
72-
delete_all_quickfiles(session, quickfiles_url)
73-
74-
upload_url = user.relationships.quickfiles['links']['upload']['href']
75-
return upload_fake_file(session, upload_url=upload_url, quickfile=True)
76-
77-
78-
def delete_all_quickfiles(session, quickfiles_url):
79-
""" Delete all quickfiles. Just pass in the quickfiles url for the currently logged in user.
80-
"""
81-
82-
for quickfile in session.get(quickfiles_url)['data']:
83-
delete_url = quickfile['links']['delete']
84-
delete_file(session, delete_url)
85-
86-
8764
def get_all_institutions(session=None, data_type='names'):
8865
if not session:
8966
session = get_default_session()
@@ -225,12 +202,10 @@ def upload_fake_file(
225202
name='osf selenium test file for testing because its fake.txt',
226203
upload_url=None,
227204
provider='osfstorage',
228-
quickfile=False,
229205
):
230206
"""Upload an almost empty file to the given node. Return the file's name.
231207
232208
Note: The default file has a very long name because it makes it easier to click a link to it.
233-
Quickfiles Note: "/?create_guid=1" must be added via api BEFORE viewing on the front end. See ENG-1351 for more info
234209
"""
235210
if not upload_url:
236211
if not node:
@@ -243,12 +218,6 @@ def upload_fake_file(
243218
url=upload_url, query_parameters={'kind': 'file', 'name': name}, raw_body={}
244219
)
245220

246-
if quickfile:
247-
# create_guid param is tied to the GET request so we can't use query_parameters={'create_guid': 1} here
248-
quickfile_path = metadata['data']['attributes']['path']
249-
info_link = '/v2/files{}/?create_guid=1'.format(quickfile_path)
250-
session.get(info_link)
251-
252221
return name, metadata
253222

254223

components/navbars.py

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class EmberNavbar(HomeNavbar):
5858

5959
logout_link = Locator(By.CSS_SELECTOR, '[data-test-ad-logout]')
6060
my_projects_link = Locator(By.CSS_SELECTOR, '[data-test-nav-my-projects-link]')
61-
my_quick_files_link = Locator(By.CSS_SELECTOR, '[data-test-nav-quickfiles-link]')
6261

6362

6463
class PreprintsNavbar(EmberNavbar):

pages/user.py

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def __init__(self, driver, verify=False, guid=user.id):
2929
public_components = GroupLocator(
3030
By.CSS_SELECTOR, '#publicComponents .list-group-item'
3131
)
32-
quickfiles = GroupLocator(By.CSS_SELECTOR, '#quickFiles .list-group-item')
3332

3433

3534
class BaseUserSettingsPage(OSFBasePage):

0 commit comments

Comments
 (0)