Project

General

Profile

Bug #9046

Feature #7563: Update the automated test suite for Jessie ISO images

Update the encryption test for Jessie

Added by kytv over 4 years ago. Updated almost 4 years ago.

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

100%

Feature Branch:
kytv:bugfix/9046-update-encryption-feature-for-jessie
Type of work:
Code
Blueprint:
Starter:
Affected tool:
OpenPGP Applet

Description

With the updates that were done for 1.3, the encryption test is broken in Jessie. Maybe it would still have been broken without my changes.

(Although I didn't know it at the time, some of the changes were actually working around #8928)

9046.png View (52 KB) kytv, 05/05/2015 11:21 PM


Related issues

Related to Tails - Bug #9791: Update torified_gnupg feature for Jessie Resolved 07/22/2015 01/15/2016
Blocked by Tails - Bug #9355: More robust accessing the gpgApplet in the test suite Resolved 05/07/2015
Blocked by Tails - Bug #8928: "unclutter" can cause spurious errors with some configurations Resolved 03/03/2015

Associated revisions

Revision e0cf6101 (diff)
Added by kytv almost 4 years ago

Update encryption.feature for Jessie

Will-fix: #9046

Revision 2122b009 (diff)
Added by kytv almost 4 years ago

Bump timeouts

Will-fix: #9046

Revision b7d39e3b (diff)
Added by kytv almost 4 years ago

"Select all" and "copy" text using the context menu

Will-fix: #9046

Revision 36d567ec (diff)
Added by kytv almost 4 years ago

Paste into a new Gedit tab with the buttons and context menu

Will-fix: #9046

Revision 8c05845e (diff)
Added by kytv almost 4 years ago

Select the encryption key using fewer keystrokes

Will-fix: #9046

History

#1 Updated by intrigeri over 4 years ago

  • Parent task set to #7563

#2 Updated by kytv about 4 years ago

  • Status changed from Confirmed to In Progress
  • Assignee changed from kytv to anonym
  • % Done changed from 0 to 40
  • QA Check set to Ready for QA
  • Feature Branch set to kytv:bugfix/9046-update-encryption-feature-for-jessie
  • Affected tool set to OpenPGP Applet

Note: I realize this probably looks incredibly odd:

-  @screen.wait_and_click("GpgAppletChooseKeyWindow.png", 30)
+  # Without the double-click here I consistently have a problem with the mouse pointer
+  # *grabbing* the window so that moving the mouse will move the window.
+  @screen.wait_and_double_click("GpgAppletChooseKeyWindow.png", 30)

but it happens for me every time, without fail. Without this change I see the following:

  Scenario: Encryption and decryption using Tails OpenPGP Applet         # features/encryption.feature:13
    When I type a message into gedit                                     # features/step_definitions/encryption.rb:24
    And I encrypt the message using my OpenPGP key                       # features/step_definitions/encryption.rb:75
    Then I can decrypt the encrypted message                             # features/step_definitions/encryption.rb:82
      FindFailed: can not find GpgAppletIconEncrypted.png on the screen.
      Line ?, in File ? (RuntimeError)
      features/encryption.feature:16:in `Then I can decrypt the encrypted message'

This happens for each of the scenarios which GpgAppletChooseKeyWindow.png is displayed, leading to the following consistently reproduced failures:

Failing Scenarios:
cucumber features/encryption.feature:13 # Scenario: Encryption and decryption using Tails OpenPGP Applet
cucumber features/encryption.feature:18 # Scenario: Signing and verification using Tails OpenPGP Applet
cucumber features/encryption.feature:23 # Scenario: Encryption/signing and decryption/verification using Tails OpenPGP Applet

4 scenarios (3 failed, 1 passed)
28 steps (3 failed, 25 passed)
3m18.839s

When I take control of the TailsToaster VM, moving my mouse will move the window. After changing wait_and_click to wait_and_double_click the results change to

4 scenarios (4 passed)
28 steps (28 passed)
3m42.874s

#3 Updated by anonym about 4 years ago

  • Assignee changed from anonym to kytv
  • % Done changed from 40 to 50
  • QA Check changed from Ready for QA to Dev Needed

#5 Updated by anonym about 4 years ago

(Posted the following as private by mistake first)

Note: I realize this probably looks incredibly odd:

-  @screen.wait_and_click("GpgAppletChooseKeyWindow.png", 30)
+  # Without the double-click here I consistently have a problem with the mouse pointer
+  # *grabbing* the window so that moving the mouse will move the window.
+  @screen.wait_and_double_click("GpgAppletChooseKeyWindow.png", 30)

Hmm. So it's like a mouse button release event is lost? Argh. I'm worrying that this somehow is related to the discussion on #8928, that X events are lost due to some bug (or bad interaction) in the unclutter/Sikuli/virt-viewer/Tails-Xorg stack. I'm curious, could you temporarily undo the double click thing, disable unclutter, and retry?

Next. about commit:95a2e367:

[...]
 def gedit_copy_all_text
-  @screen.click("GeditEdit.png")
-  @screen.wait_and_click("GeditSelectAll.png", 10)
-  @screen.click("GeditCopy.png")
+  @screen.type("a", Sikuli::KeyModifier.CTRL)
+  @screen.type("c", Sikuli::KeyModifier.CTRL)
 end

 def paste_into_a_new_tab
-  @screen.click("GeditNewDocument.png")
-  @screen.click("GeditPaste.png")
+  @screen.type("t", Sikuli::KeyModifier.CTRL)
+  @screen.type("v", Sikuli::KeyModifier.CTRL)
 end
[...]

Now we are undoing the robustness improvements we recently introduced in Wheezy. I suggest you instead add an image for the "ATTACK AT DAWN" text as written in Gedit, right click on it, and select "Select all" in the context menu, all driven with images.

#6 Updated by kytv about 4 years ago

anonym wrote:

(Posted the following as private by mistake first)

[...]

Hmm. So it's like a mouse button release event is lost? Argh. I'm worrying that this somehow is related to the discussion on #8928, that X events are lost due to some bug (or bad interaction) in the unclutter/Sikuli/virt-viewer/Tails-Xorg stack. I'm curious, could you temporarily undo the double click thing, disable unclutter, and retry?

Disabling unclutter made no difference. The screen looks like the attached file (note the mouse pointer).

#7 Updated by kytv about 4 years ago

#8 Updated by kytv about 4 years ago

anonym wrote:

Now we are undoing the robustness improvements we recently introduced in Wheezy. I suggest you instead add an image for the "ATTACK AT DAWN" text as written in Gedit, right click on it, and select "Select all" in the context menu, all driven with images.

I think that what I came up with might be better yet. The copying and pasting will use three new images.

  • the status bar
  • Select All from the context menu
  • Copy from the context menu

I calculate where the center of the Gedit window is and right click there to ensure getting a usable context menu.

I'm currently testing (a lot!) but so far I'm quite pleased with this and the other edits I've made since the review.

#9 Updated by kytv about 4 years ago

  • Blocked by Bug #9355: More robust accessing the gpgApplet in the test suite added

#10 Updated by kytv about 4 years ago

  • Blocked by Bug #8928: "unclutter" can cause spurious errors with some configurations added

#11 Updated by kytv about 4 years ago

  • Target version changed from Tails_1.4 to Tails_1.4.1

#12 Updated by kytv about 4 years ago

  • Blocked by Bug #9317: Pidgin IRC test can fail with buddy list window over conversation one added

#13 Updated by kytv about 4 years ago

Blocked by Bug #9317: Pidgin IRC test can fail with buddy list window over conversation one added

There's a function I'm adding to the branch for that ticket which I want to have here. :)

#14 Updated by kytv about 4 years ago

  • Blocked by deleted (Bug #9317: Pidgin IRC test can fail with buddy list window over conversation one)

#15 Updated by kytv about 4 years ago

kytv wrote:

Blocked by Bug #9317: Pidgin IRC test can fail with buddy list window over conversation one added

There's a function I'm adding to the branch for that ticket which I want to have here. :)

...and now I don't need the function in #9317 so I'll add it directly here.

#16 Updated by kytv almost 4 years ago

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

#17 Updated by intrigeri almost 4 years ago

  • Target version changed from Tails_1.4.1 to Tails_1.5

I doubt that anonym will be able to do that in the next 2 days.

#18 Updated by intrigeri almost 4 years ago

  • Assignee changed from anonym to intrigeri

#19 Updated by kytv almost 4 years ago

#20 Updated by kytv almost 4 years ago

#21 Updated by kytv almost 4 years ago

#22 Updated by kytv almost 4 years ago

#23 Updated by kytv almost 4 years ago

#24 Updated by intrigeri almost 4 years ago

  • Status changed from In Progress to Resolved
  • Assignee deleted (intrigeri)
  • % Done changed from 50 to 100
  • QA Check changed from Ready for QA to Pass

Merged, thanks!

#27 Updated by intrigeri over 3 years ago

  • Related to Bug #9791: Update torified_gnupg feature for Jessie added

Also available in: Atom PDF