diff --git a/tildes/scss/modules/_tab.scss b/tildes/scss/modules/_tab.scss index 9bd7a19..91e0286 100644 --- a/tildes/scss/modules/_tab.scss +++ b/tildes/scss/modules/_tab.scss @@ -28,3 +28,7 @@ } } } + +.tab-listing-order.tab-flex-2 { + flex: 2; +} diff --git a/tildes/tests/conftest.py b/tildes/tests/conftest.py index ea6da3d..36617fb 100644 --- a/tildes/tests/conftest.py +++ b/tildes/tests/conftest.py @@ -199,14 +199,20 @@ def webtest(base_app): # create the TestApp - note that specifying wsgi.url_scheme is necessary so that the # secure cookies from the session library will work app = TestApp( - base_app, extra_environ={"wsgi.url_scheme": "https"}, cookiejar=CookieJar() + base_app, + # This "tm.active" is a temporary fix around this fixture failing to rollback + # data after the tests are complete. + extra_environ={"wsgi.url_scheme": "https", "tm.active": True}, + cookiejar=CookieJar(), ) # fetch the login page, fill in the form, and submit it (sets the cookie) login_page = app.get("/login") login_page.form["username"] = "SessionUser" login_page.form["password"] = "session user password" - login_page.form.submit() + # The login process requires a non-None IP address; this + # populates `request.client_addr`. + login_page.form.submit(extra_environ={"HTTP_X_FORWARDED_FOR": "0.0.0.0"}) yield app diff --git a/tildes/tests/webtests/test_user_settings.py b/tildes/tests/webtests/test_user_settings.py new file mode 100644 index 0000000..fe647e2 --- /dev/null +++ b/tildes/tests/webtests/test_user_settings.py @@ -0,0 +1,8 @@ +def test_render_theme_options(webtest): + """Test that theme settings are being rendered.""" + settings = webtest.get("/settings") + assert settings.status_int == 200 + assert "White (site and account default)" in settings.text + assert "Solarized Light" in settings.text + assert "Solarized Dark" in settings.text + assert "Black" in settings.text diff --git a/tildes/tildes/templates/settings.jinja2 b/tildes/tildes/templates/settings.jinja2 index 19972dc..2e7409f 100644 --- a/tildes/tildes/templates/settings.jinja2 +++ b/tildes/tildes/templates/settings.jinja2 @@ -9,7 +9,7 @@