Skip to content

Commit 4fa4be0

Browse files
committed
Delete Quickfiles a11y tests
1 parent 7c9393d commit 4fa4be0

File tree

4 files changed

+5
-137
lines changed

4 files changed

+5
-137
lines changed

components/navbars.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ class HomeNavbar(BaseElement):
1919
support_link = Locator(By.ID, 'navbar-support')
2020
donate_link = Locator(By.ID, 'navbar-donate')
2121

22-
user_dropdown = Locator(By.CSS_SELECTOR, 'ul.navbar-nav > li:nth-child(6) > a')
22+
user_dropdown = Locator(
23+
By.CSS_SELECTOR, 'ul.navbar-nav > li.secondary-nav-dropdown'
24+
)
2325
user_dropdown_profile = Locator(
2426
By.CSS_SELECTOR, 'ul.dropdown-menu-right > li:nth-child(1)'
2527
)

pages/project.py

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class MyProjectsPage(OSFBasePage):
6060
first_collection_remove_button = Locator(
6161
By.CSS_SELECTOR, '[data-target="#removeColl"]', settings.QUICK_TIMEOUT
6262
)
63+
empty_collection_indicator = Locator(By.CLASS_NAME, 'db-non-load-template')
6364

6465
# Components
6566
create_collection_modal = ComponentLocator(CreateCollectionModal)

pages/quickfiles.py

-81
This file was deleted.

tests/test_a11y_other_osf.py

+1-55
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
import re
22

3-
from selenium.webdriver.common.by import By
43
from selenium.webdriver.common.keys import Keys
5-
from selenium.webdriver.support import expected_conditions as EC
6-
from selenium.webdriver.support.ui import WebDriverWait
74

85
import markers
96
import settings
10-
from api import osf_api
117
from components.accessibility import ApplyA11yRules as a11y
128
from components.email_access import EmailAccess
139
from pages.dashboard import DashboardPage
1410
from pages.landing import LandingPage
1511
from pages.login import ForgotPasswordPage, ResetPasswordPage
1612
from pages.project import MyProjectsPage
17-
from pages.quickfiles import QuickfileDetailPage, QuickfilesPage
1813
from pages.register import RegisterPage
1914
from pages.search import SearchPage
2015
from pages.support import SupportPage
@@ -60,6 +55,7 @@ def test_accessibility(
6055
my_projects_page = MyProjectsPage(driver)
6156
my_projects_page.goto()
6257
assert MyProjectsPage(driver, verify=True)
58+
my_projects_page.empty_collection_indicator.present()
6359
a11y.run_axe(
6460
driver,
6561
session,
@@ -69,56 +65,6 @@ def test_accessibility(
6965
)
7066

7167

72-
@markers.ember_page
73-
class TestMyQuickFilesPage:
74-
def test_accessibility(
75-
self, driver, session, write_files, exclude_best_practice, must_be_logged_in
76-
):
77-
""" The Quick Files Page may or may not have any files listed depending on the
78-
current user. Users in the testing environment probably will, but the Production
79-
user may not.
80-
"""
81-
quickfiles_page = QuickfilesPage(driver)
82-
quickfiles_page.goto()
83-
quickfiles_page.loading_indicator.here_then_gone()
84-
assert QuickfilesPage(driver, verify=True)
85-
a11y.run_axe(
86-
driver,
87-
session,
88-
'quickfiles',
89-
write_files=write_files,
90-
exclude_best_practice=exclude_best_practice,
91-
)
92-
93-
94-
@markers.ember_page
95-
# For this next test we are uploading a text file to the user's Quick Files page so we
96-
# don't want to run this in Production.
97-
@markers.dont_run_on_prod
98-
class TestMyQuickFileDetailPage:
99-
def test_accessibility(
100-
self, driver, session, write_files, exclude_best_practice, must_be_logged_in
101-
):
102-
osf_api.upload_single_quickfile(session)
103-
quickfiles_page = QuickfilesPage(driver)
104-
quickfiles_page.goto()
105-
quickfiles_page.loading_indicator.here_then_gone()
106-
# click on title of file in table to open the Quick File Detail page
107-
quickfiles_page.file_titles[0].click()
108-
assert QuickfileDetailPage(driver, verify=True)
109-
# wait for mfr iframe to be visible before running axe
110-
WebDriverWait(driver, 10).until(
111-
EC.visibility_of_element_located((By.ID, 'mfrIframeParent'))
112-
)
113-
a11y.run_axe(
114-
driver,
115-
session,
116-
'qfiledet',
117-
write_files=write_files,
118-
exclude_best_practice=exclude_best_practice,
119-
)
120-
121-
12268
@markers.ember_page
12369
class TestRegisterPage:
12470
def test_accessibility(self, driver, session, write_files, exclude_best_practice):

0 commit comments

Comments
 (0)