Skip to content

Fix defects in Gherkin test definitions - #241

Open
kperry-godaddy wants to merge 1 commit into
camaraproject:mainfrom
kperry-godaddy:fix/test-definition-defects
Open

Fix defects in Gherkin test definitions#241
kperry-godaddy wants to merge 1 commit into
camaraproject:mainfrom
kperry-godaddy:fix/test-definition-defects

Conversation

@kperry-godaddy

Copy link
Copy Markdown

What type of PR is this?

correction

What this PR does / why we need it:

Fixes three defects in the Gherkin test definitions under code/Test_definitions/:

  1. Missing When step — scenario @phone_number_verify_400.3_invalid_request_non_existing_property went straight from Given to Then, so the request it asserts on was never sent. Added When the request "phoneNumberVerify" is sent and fixed the double-negative wording in the same scenario ("does not contain neither" → "contains neither").

  2. References to non-existent schemas — scenarios 400.4 and C02.01 referenced #/components/schemas/PhoneNumber and #/components/schemas/HashedPhoneNumber. Neither anchor exists in number-verification.yaml (both are inline properties of NumberVerificationRequestBody), nor in released bundles (verified against r3.1, where the Commonalities PhoneNumber schema is inlined as an anonymous property schema). Reworded 400.4 using the phrasing already used by sibling scenarios 04/05, and pointed C02.01 at the phoneNumber property of #/components/schemas/NumberVerificationRequestBody, which does resolve.

  3. Copy-pasted scenario tags — the three 401 scenarios in number-verification-phoneNumberShare.feature were tagged @phone_number_verify_401.*; corrected to @phone_number_share_401.* so per-operation tag filtering selects the right scenarios.

Both files parse cleanly with the official @cucumber/gherkin parser after the change, and every scenario now contains an action step.

Which issue(s) this PR fixes:

None — defects found while reviewing the test definitions.

Special notes for reviewers:

Not changed in this PR, but worth a maintainer's eye: the Given of @phone_number_verify_C02.01 ("a valid access token which does not identify a single phone number") reads as copied from device-identifier API templates. For Number Verification a 3-legged token always identifies the subscriber's phone number, so this precondition looks unsatisfiable as written. Happy to follow up with a separate issue/PR if you agree.

Changelog input

release-note
Fix test definitions: add missing When step in scenario 400.3 of phoneNumberVerify, replace references to non-existent schemas (PhoneNumber, HashedPhoneNumber), and correct copy-pasted scenario tags in the phoneNumberShare feature file.

Additional documentation

This section can be blank.

docs

- Add missing When step to scenario phone_number_verify_400.3, which
  jumped from Given to Then without ever sending the request, and fix
  its double-negative wording
- Replace references to schemas PhoneNumber and HashedPhoneNumber,
  which exist neither in the wip spec nor in released bundles, with
  the phrasing already used by sibling scenarios
- Correct copy-pasted phone_number_verify_401.* tags in the
  phoneNumberShare feature file to phone_number_share_401.*

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@eric-murray

Copy link
Copy Markdown
Contributor

Hi @kperry-godaddy

Thanks for the review and for picking up these issues.

For future releases, the PhoneNumber schema will be inherited from the common libraries (see the current release snapshot for the resulting bundled OAS definition). So that schema will exist in future releases.

But the lack of a HashedPhoneNumber schema is indeed a gap. For the test definitions, it is preferable to refer directly to the schema, as that way any changes to the schema definition (including the description) are "automatically" picked up by the tests.

So I would suggest to add a HashedPhoneNumber schema to the OAS definition, rather than updating the tests with a description of what such a schema would represent.

But first you will need to "sign" the EasyCLA agreement to become an authorised contributor. See the automated comment above for instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants