Bug #9046

Update the encryption test for Jessie

Added by kytv 2015-03-11 00:48:38 . Updated 2015-08-26 06:10:12 .

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

100%

Feature Branch:
kytv:bugfix/9046-update-encryption-feature-for-jessie
Type of work:
Code
Blueprint:

Starter:
Affected tool:
OpenPGP Applet
Deliverable for:
268

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 Bug #8928)


Files


Subtasks


Related issues

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

History

#1 Updated by intrigeri 2015-03-12 13:02:53

#2 Updated by kytv 2015-04-24 15:00:59

  • 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 2015-05-05 13:12:55

  • 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 2015-05-05 18:32:42

(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 Bug #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 2015-05-05 23:21:33

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 Bug #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 2015-05-05 23:22:49

#8 Updated by kytv 2015-05-06 16:25:08

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 2015-05-07 14:08:17

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

#10 Updated by kytv 2015-05-07 14:09:58

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

#11 Updated by kytv 2015-05-09 01:16:47

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

#12 Updated by kytv 2015-05-12 23:18:15

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

#13 Updated by kytv 2015-05-12 23:19:30

> Blocked by Bug 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 2015-05-14 13:43:28

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

#15 Updated by kytv 2015-05-14 13:44:08

kytv wrote:
> > Blocked by Bug 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 Bug #9317 so I’ll add it directly here.

#16 Updated by kytv 2015-06-22 14:36:47

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

#17 Updated by intrigeri 2015-06-28 04:21:17

  • 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 2015-07-08 03:20:37

  • Assignee changed from anonym to intrigeri

#19 Updated by kytv 2015-07-08 03:43:02

Applied in changeset commit:e0cf61013a22e7d06c9f39022b5d2ba3aff8feb5.

#20 Updated by kytv 2015-07-08 03:43:03

Applied in changeset commit:2122b0099637e3a7eb854a51ba41ea3f2ee1b599.

#21 Updated by kytv 2015-07-08 03:43:03

Applied in changeset commit:b7d39e3bda3b8309ae9dc80bce8fd24ab8ce42ca.

#22 Updated by kytv 2015-07-08 03:43:03

Applied in changeset commit:36d567ecce2dfedf8ba4f78e20a6275a6bea02e1.

#23 Updated by kytv 2015-07-08 03:43:03

Applied in changeset commit:8c05845e8cbb63ba2dc57d40d2dfacd85c822a7e.

#24 Updated by intrigeri 2015-07-08 03:43:34

  • 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!

#25 Updated by intrigeri 2015-08-02 09:04:17

  • blocks #8668 added

#26 Updated by intrigeri 2015-08-26 06:10:12

  • Deliverable for set to 268

#27 Updated by intrigeri 2015-11-24 16:23:53

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