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

Clean up code around test api keys and roles #593

Merged

Conversation

ashleysmithTTD
Copy link
Contributor

@ashleysmithTTD ashleysmithTTD commented Feb 11, 2025

What Changed:

  • Exported the role objects from KeyHelper.spec.ts and import them into other key test files so we are not constantly redefining the API role objects
  • Changed some naming of test variables where necessary to be more clear
  • Extracted some variables out from the test block to be reused between tests in the same file

@alex-yau-ttd
Copy link
Contributor

Looks great - though I do wonder if we could go a bit further - there's still a few instances where we are manually defining these in the code - mainly in stories but also in another spec file. Is this within scope here?

image

@ashleysmithTTD
Copy link
Contributor Author

Looks great - though I do wonder if we could go a bit further - there's still a few instances where we are manually defining these in the code - mainly in stories but also in another spec file. Is this within scope here?

image

Yeah definitely - i'll go back and narrow it down some more

@ashleysmithTTD ashleysmithTTD merged commit b237e83 into main Feb 12, 2025
3 checks passed
@ashleysmithTTD ashleysmithTTD deleted the ans-UID2-3512-extract-reuse-code-test-api-keys-and-roles branch February 12, 2025 21:07
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