Permalink
Browse files

MDL-39768 behat: Adding focused panels CSS selector

  • Loading branch information...
1 parent b222cfb commit 4f629bc6771ecd5d065a83cbf6a3ffdbf93847b1 @dmonllao dmonllao committed May 22, 2013
Showing with 3 additions and 4 deletions.
  1. +1 −1 lib/behat/behat_files.php
  2. +2 −3 repository/tests/behat/cancel_add_file.feature
@@ -88,7 +88,7 @@ protected function perform_on_element($action, ExpectationException $exception)
// Finds the button inside the DOM, is a modal window, so should be unique.
$classname = 'fp-file-' . $action;
- $button = $this->find('css', 'button.' . $classname, $exception);
+ $button = $this->find('css', '.yui3-panel-focused button.' . $classname, $exception);
$button->click();
}
@@ -25,9 +25,8 @@ Feature: A selected file can be cancelled
And I click on "#fitem_id_files .fp-btn-add a" "css_element"
And I click on "Recent files" "link" in the ".fp-repo-area" "css_element"
And I click on "//a[contains(concat(' ', @class, ' '), ' fp-file ')][contains(., 'empty.txt')]" "xpath_element"
- And I wait "2" seconds
- And I click on ".fp-select .fp-select-cancel" "css_element"
- And I click on ".file-picker button.yui3-button-close" "css_element"
+ And I click on ".yui3-panel-focused .fp-select .fp-select-cancel" "css_element"
+ And I click on ".yui3-panel-focused .file-picker button.yui3-button-close" "css_element"
And I press "Save and display"
Then I should see "upload_users.csv"
And I should not see "empty.txt"

0 comments on commit 4f629bc

Please sign in to comment.