horizon/openstack_dashboard/test/tests/selenium_tests.py
Matt Borland 841c5af539 Tests pass in languages other than English
The selenium tests run with --only-selenium would fail if launched in when
the environment's LANG was other than English, e.g.:

 LANG=fr_FR ./run_tests.sh --only-selenium

This was due to tests that used an element's localized content rather than
other clues to look for presence of errors, etc.

Change-Id: Icec6de16e6924f128b8e65e0891db6c2b14e3830
Closes-Bug: 1377043
2015-01-14 12:59:42 -07:00

24 lines
943 B
Python

# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from horizon.test import helpers as test
class BrowserTests(test.SeleniumTestCase):
def test_splash(self):
self.selenium.get(self.live_server_url)
button = self.selenium.find_element_by_id("loginBtn")
# Ensure button has something; must be language independent.
self.assertTrue(len(button.text) > 0)