Tyler-Keith-Thompson / CucumberSwift

A lightweight swift Cucumber implementation
https://tyler-keith-thompson.github.io/CucumberSwift/documentation/cucumberswift/
MIT License
75 stars 19 forks source link

DataTable.rows is inaccessible due to internal protection level #28

Closed albedinsky closed 3 years ago

albedinsky commented 3 years ago

Describe the bug

When trying to access rows property in DataTable, like step.dataTable!.rows, the compiler complains that this property is not accessible due to internal protection level.

When looking at DataTable implementation, the rows property is not actually public, maybe this is the problem?

According to documentation related to Test Data this should be possible.

To Reproduce Steps to reproduce the behavior:

  1. Implement basic When("^Step$") { maches, step in ... } step definition
  2. Try to access step.dataTable!.rows property
  3. See error like the one attached

Expected behavior The rows property on DataTable instance should be accessible.

Screenshots

Screenshot 2021-04-22 at 13 20 01

Additional context Add any other context about the problem here.

Tyler-Keith-Thompson commented 3 years ago

Wow! Can't believe that got missed. I've got a consumer test that does an import instead of a @testable import now to prevent this from happening again for this issue. I'm not at the computer that has my tokens to be able to deploy, but will get this fix released for you ASAP.

albedinsky commented 3 years ago

No problem @Tyler-Keith-Thompson, thank you :)

Tyler-Keith-Thompson commented 3 years ago

CucumberSwift 3.1.4 was just released and fixes this issue.