Bug 804207 - Failing test on 1.0-product
Failing test on 1.0-product
Status: CLOSED ERRATA
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: aeolus-conductor (Show other bugs)
1.0.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Angus Thomas
dgao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-16 16:19 EDT by Matt Wagner
Modified: 2014-08-17 18:27 EDT (History)
8 users (show)

See Also:
Fixed In Version: v0.8.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-15 18:58:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matt Wagner 2012-03-16 16:19:29 EDT
Description of problem:
A cucumber test on 1.0-product is failing:

  Scenario: Add realm mapping                      # features/realm.feature:29
    Given I am on the realms page                  # features/step_definitions/web_steps.rb:59
    And there is a realm "testrealm1"              # features/step_definitions/realm_steps.rb:34
    And a provider "provider1" exists              # features/step_definitions/realm_steps.rb:30
    When I follow "testrealm1"                     # features/step_definitions/web_steps.rb:72
    Then I should see "Add mapping to provider"    # features/step_definitions/web_steps.rb:121
      expected there to be content "Add mapping to provider" in "testrealm1\n  //<![CDATA[\n    window.Conductor = {}\n    window.Conductor.PATH_PREFIX = \"/\"\n    // This hack prevents Backbone from switching to the #/pools/1 type URLs\n    // when the browser doesn't support the HTML5 History API.\n    window.history || (window.history = {});\n    window.history.pushState || (window.history.pushState = function(){});\n    window.history.replaceState || (window.history.replaceState = function(){});\n  //]]>\n\n\n\n\n\nJohn Smith\n\n\n\n \nMy Account\nLog out\n\n\n\n\n\n\n\n\nMonitorAdminister\nUsersCloudsContentCloud Resource ProvidersSettingstestrealm1\n\n\nReturn to\nCloud Resource Clusters\n\nNew Cloud Resource Cluster\n\nEdit\n\n\n\nProperties\n\n\nCloud Resource Cluster Details\n\n\n\nCloud Resource Cluster Name\n\n\ntestrealm1\n\n\nCloud Resource Cluster Mapping\n\n\nAdd mapping to cloud resource cluster\nAdd mapping to cloud resource provider\n\n\n\n\n\n\n\n\n\n\nCopyright © 2009-2012 Red Hat, Inc.\n\n\n" (RSpec::Expectations::ExpectationNotMetError)
      ./features/step_definitions/web_steps.rb:123:in `/^(?:|I )should see "([^"]*)"$/'
      features/realm.feature:34:in `Then I should see "Add mapping to provider"'
    And I follow "mapping_to_provider_button"      # features/step_definitions/web_steps.rb:72
    Then I should be on the new realm mapping page # features/step_definitions/web_steps.rb:203
    When I press "realm_backend_target_submit"     # features/step_definitions/web_steps.rb:68
    Then I should see a confirmation message       # features/step_definitions/general_steps.rb:20



This is a copy-only change -- we look for an "Add mapping to provider" button, but on 1.0-product, it says "Add mapping to cloud resource provider".

Since the next test references the button by DOM ID and tries to click it, we could just remove this step entirely and make the test pass, rather than naively checking for strings that may be internationalized.
Comment 1 Matt Wagner 2012-03-16 16:21:47 EDT
Patch thread on list: https://fedorahosted.org/pipermail/aeolus-devel/2012-March/009572.html
Comment 2 Matt Wagner 2012-03-16 16:25:18 EDT
Pushed 2 patches onto master:

commit 6962053967668f94ab41f9c173bcdd1db511e8fc
Author: Matt Wagner <matt.wagner@redhat.com>
Date:   Wed Mar 14 13:58:24 2012 -0400

    Removes inapplicable test
    
    This test doesn't match anything in 1.0-product, and, in discussing
    how to fix the problem, we concluded that the test really doesn't belong
    here at all.

commit 290892789cf1d5641a0702057d1bec5da0eedb69
Author: Matt Wagner <matt.wagner@redhat.com>
Date:   Wed Mar 14 11:52:24 2012 -0400

    Fixes failing test
    
    This test is failing on 1.0-product bceause it's looking for the
    exact text, "Add mapping to provider", but we use the term "cloud
    resource provider" there.
    
    Since the next step attempts to click that button and references it
    by its DOM ID, we can just skip this "And I should see..." step that
    checks for the button, since it will fail anyway if the button is
    missing.




These need to end up on 1.0-product before the test will start passing there.
Comment 4 wes hayutin 2012-03-30 14:56:04 EDT
assigning to dgao
Comment 5 Matt Wagner 2012-03-30 16:03:23 EDT
After speaking with dgao, I have verified this test fix (no code changes) on the latest 1.0-product branch.
Comment 6 errata-xmlrpc 2012-05-15 18:58:34 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0583.html

Note You need to log in before you can comment on or make changes to this bug.