Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Can't see an existing table portion #199

Open
soullivaneuh opened this issue Jun 20, 2016 · 2 comments
Open

Can't see an existing table portion #199

soullivaneuh opened this issue Jun 20, 2016 · 2 comments
Labels

Comments

@soullivaneuh
Copy link

soullivaneuh commented Jun 20, 2016

With the following feature:

Feature: billing/index
  As a customer
  I should be able to access the billing section

  Scenario: Billing dashboard access
    Given I am authenticated as "user_default" using password "test"
    And I am on "/billing"
    Then the response status code should be 200
    And I should see the following table portion:
      | Réf       | Payé |
      | FR_SC_001 | oui  |

I got the following error:

$ behat features/billing/index.feature 
Feature: billing/index
  As a customer
  I should be able to access the billing section

  Scenario: Billing dashboard access                                 # features/billing/index.feature:5
    Given I am authenticated as "user_default" using password "test" # FeatureAppContext::iAmAuthenticatedAs()
    And I am on "/billing"                                           # FeatureAppContext::visit()
    Then the response status code should be 200                      # FeatureAppContext::assertResponseStatus()
    And I should see the following table portion:                    # Knp\FriendlyContexts\Context\TableContext::iShouldSeeTheFollowingTablePortion()
      | Réf       | Payé |
      | FR_SC_001 | oui  |
      The given array

      | Réf       | Payé |
      | FR_VP_5   | oui  |
      | FR_VU_0   | non  |
      | FR_VP_4   | oui  |
      | FR_VP_1   | oui  |
      | FR_SC_001 | oui  |

      does not contain the following rows

      | Réf       | Payé |
      | FR_SC_001 | oui  |

      The given array

      | Réf | Produit | Date | Confirmé |

      does not contain the following rows

      | Réf       | Payé |
      | FR_SC_001 | oui  |
       (Exception)

--- Failed scenarios:

    features/billing/index.feature:5

1 scenario (1 failed)
4 steps (3 passed, 1 failed)
0m4.36s (99.74Mb)

But according to the first given array, the row should be found. Am I right?

Note: The array also have a "Date" column that I don't want to test on the portion. Maybe the issue is because of this.

EDIT: I also tried with the Date column, this change nothing:

      The given array

      | Réf       | Date          | Payé |
      | FR_VP_5   | 3 mars 2016   | oui  |
      | FR_VU_0   | 15 nov. 2015  | non  |
      | FR_VP_4   | 25 oct. 2014  | oui  |
      | FR_VP_1   | 26 sept. 2014 | oui  |
      | FR_SC_001 | 17 août 2014  | oui  |

      does not contain the following rows

      | Réf       | Date         | Payé |
      | FR_SC_001 | 17 août 2014 | oui  |
@soullivaneuh
Copy link
Author

I found why: The value is not the first row.

Is that expected?

@igorcemim
Copy link

I have the same problem.
Anyone find a solution?

Is this behavior right?!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants