fix: use pathlib in test_sprint34 static file opens (no bare relative paths) (#349)
Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
This commit is contained in:
@@ -232,7 +232,7 @@ class TestOnboardingStatusApiOAuth:
|
||||
|
||||
def test_control_center_resets_active_section_on_close():
|
||||
"""Closing the control center must reset _settingsSection to 'conversation'."""
|
||||
src = open('static/panels.js').read()
|
||||
src = open(pathlib.Path(__file__).parent.parent / 'static' / 'panels.js').read()
|
||||
assert '_settingsSection' in src, '_settingsSection state variable missing from panels.js'
|
||||
assert "_settingsSection = 'conversation'" in src or "_settingsSection='conversation'" in src, \
|
||||
'Control center does not reset section to conversation on close'
|
||||
@@ -240,7 +240,7 @@ def test_control_center_resets_active_section_on_close():
|
||||
|
||||
def test_control_center_tab_highlight_on_open():
|
||||
"""Opening the control center must use settings-tabs for section navigation."""
|
||||
css = open('static/style.css').read()
|
||||
css = open(pathlib.Path(__file__).parent.parent / 'static' / 'style.css').read()
|
||||
assert 'settings-tabs' in css, 'settings-tabs CSS class for control center tabs missing from style.css'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user