Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added localization test #3

Merged
merged 2 commits into from
Feb 28, 2012
Merged

added localization test #3

merged 2 commits into from
Feb 28, 2012

Conversation

stupchiy
Copy link
Contributor

Selecting a different locale/language should go to that page, and have /[$locale/] in the URL

@stephendonner
Copy link
Contributor

When I ran this through Jenkins, I got:

raise AssertionError('%s is not found in %s' % (needle, haystack))
E AssertionError: en-us is not found in https://firefoxflicks.allizom.org/en-US/

Do we know where the lower-case "en-us" is coming from?

@stephendonner
Copy link
Contributor

Ah, that comes from the app itself:

We're discussing in #webdev as to whether we should do a case-insensitive string-compare in this test.

@stephendonner
Copy link
Contributor

From @jsocol:

"stephend: well, the behavior of Mozilla sites is to have one canonical URL and to capitalize the US, so en-us -> en-US is correct, and that's what the test should assert
I'd argue that that's correct in general"

@stupchiy
Copy link
Contributor Author

Fixed. Done it fast before going to sleep, so please check if it works for you now @stephendonner . Thanks

@stephendonner
Copy link
Contributor

Thx; ran it through the proverbial grinder (Jenkins), and it's fine now :-)

stephendonner added a commit that referenced this pull request Feb 28, 2012
added localization test
@stephendonner stephendonner merged commit a2d71bf into mozilla:master Feb 28, 2012

@property
def locales_count(self):
locator = (self.language_locator[0], '%s option' % self.language_locator[1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to avoid splitting the locator tuple in this way. You could use return len(self.selenium.find_element(*self._language_locator).find_elements(By.TAG_NAME, 'option')), or create a new locator for languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants