Project

General

Profile

Feature #8701

Feature #8540: Write regression tests and tests for new features

Write a regression test for the Unsafe Browser starting in various languages

Added by intrigeri about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Test suite
Target version:
Start date:
01/14/2015
Due date:
% Done:

100%

Feature Branch:
kytv:test/8701-unsafe-browser-languages
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Unsafe Browser

Description

See #8693 => we should test it in all cases: locales that have a corresponding language pack with a short locale string, fallback on langpack for locale that starts the same, etc. See the guess_best_tor_browser_locale, and especially the changes introduced to fix #8693, for the details.

I think it's probably too much work to implement this test by logging in using various languages: we would need to make many screenshots locale-dependent. We'll come to it at some point, but for now IMO testing by setting locales manually in the terminal before starting the Unsafe Browser will be good enough.

History

#2 Updated by kytv about 5 years ago

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 20

#3 Updated by kytv about 5 years ago

  • Assignee changed from kytv to anonym
  • % Done changed from 20 to 30
  • QA Check set to Ready for QA
  • Feature Branch set to kytv:test/8701-unsafe-browser-languages

I think these changes satisfy the intent of this ticket.

#4 Updated by anonym about 5 years ago

  • Assignee changed from anonym to kytv
  • QA Check changed from Ready for QA to Dev Needed

Here's an initial review:

+Then /^I start the Unsafe Browser in the "([^"]+)" locale$/ do |loc|

The already existing "I start the Unsafe Browser" step is a prefix of this step, so please move this step definition next to it in unsafe_browser.rb.

+ next if @skip_steps_while_restoring_background
+ step "I run \"LANG=#{loc}.UTF-8 LC_ALL=#{loc}.UTF-8 sudo unsafe-browser\" in GNOME Terminal"

Please fix the indentation, including the next lines!

+ @screen.wait('Question.png', 30)
+ @screen.type(Sikuli::Key.ESC)

You forgot to git add features/images/Question.png. However, "Question.png" is a poor name, and also it already exists as features/images/UnsafeBrowserStartVerification.png. Please try to follow that naming convention in the future so we can keep our images more organized.

However, the "I see and accept the Unsafe Browser start verification" already deals with the start verification, so please use it instead of these two lines. Less code duplication and all that, you know. :)

> + @screen.wait("UnsafeBrowserHomepage.png", 120)

Similarly, here you should instead call the already existing "the Unsafe Browser has started" step.

#5 Updated by kytv almost 5 years ago

  • Assignee changed from kytv to anonym
  • QA Check changed from Dev Needed to Ready for QA

Fixed up, rebased against the current devel, and force pushed.

#6 Updated by anonym almost 5 years ago

  • Status changed from In Progress to 11
  • Assignee deleted (anonym)
  • % Done changed from 30 to 100
  • QA Check changed from Ready for QA to Pass

#7 Updated by BitingBird almost 5 years ago

  • Status changed from 11 to Resolved

Also available in: Atom PDF