Bug 804207 - Failing test on 1.0-product
Summary: Failing test on 1.0-product
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Angus Thomas
QA Contact: dgao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-16 20:19 UTC by Matt Wagner
Modified: 2014-08-17 22:27 UTC (History)
8 users (show)

Fixed In Version: v0.8.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 22:58:34 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0583 0 normal SHIPPED_LIVE new packages: aeolus-conductor 2012-05-15 22:31:59 UTC

Description Matt Wagner 2012-03-16 20:19:29 UTC
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 20:21:47 UTC
Patch thread on list: https://fedorahosted.org/pipermail/aeolus-devel/2012-March/009572.html

Comment 2 Matt Wagner 2012-03-16 20:25:18 UTC
Pushed 2 patches onto master:

commit 6962053967668f94ab41f9c173bcdd1db511e8fc
Author: Matt Wagner <matt.wagner>
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>
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 18:56:04 UTC
assigning to dgao

Comment 5 Matt Wagner 2012-03-30 20:03:23 UTC
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 22:58:34 UTC
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.