Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getters for private vars of acceptance test traits #32347

Merged
merged 2 commits into from
Aug 16, 2018

Conversation

phil-davis
Copy link
Contributor

Description

Provide getters for all the "useful/interesting" private variables in the FeatureContext traits, so that apps that care can find out the results of FeatureContext actions without being forced to use BasicStructure trait.

Motivation and Context

App acceptance tests want to add their own new step definitions/methods. Those want to use some of the methods available in core. For example, runOcc(), which remembers internally the occ command exit status, StdOut and StdErr text. There are some core methods that process those looking for strings etc. But if the app needs to parse the output in some special way unique to the app, then it needs to be able to get the "raw" StdOut.

Currently to do this, the app does use BasicStructure in its own AppContext.php - giving it a "private" view of all the methods and variables that would normally appear in core FeatureContext. But that runs into trouble if the app needs to also refer to other core contexts like FederationContext. FederationContext itself makes use of FeatureContext, which forces the app to also include FeatureContext in its list of contexts. But FeatureContext also does use BasicStructure - this results in duplicate step definitions.

How Has This Been Tested?

CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@phil-davis
Copy link
Contributor Author

Backport stable10 #32348

@codecov
Copy link

codecov bot commented Aug 16, 2018

Codecov Report

Merging #32347 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #32347   +/-   ##
=========================================
  Coverage     64.01%   64.01%           
  Complexity    18564    18564           
=========================================
  Files          1171     1171           
  Lines         69851    69851           
  Branches       1267     1267           
=========================================
  Hits          44714    44714           
  Misses        24767    24767           
  Partials        370      370
Flag Coverage Δ Complexity Δ
#javascript 52.84% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.28% <ø> (ø) 18564 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1e220e...ff4835c. Read the comment docs.

@phil-davis phil-davis merged commit 6d4eb59 into master Aug 16, 2018
@phil-davis phil-davis deleted the getters-for-acceptance-test-private-vars branch August 16, 2018 05:54
@lock lock bot locked as resolved and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants