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

Upgrade existing tests to account for the showWritableComponents flag #758

Closed
popkinj opened this issue Aug 15, 2023 · 4 comments
Closed
Labels
enhancement New feature or request TenantUI Tickets related to the Tenant UI Vue/Node app testing Unit/Integration/Functional testing of static code or running applications

Comments

@popkinj
Copy link
Collaborator

popkinj commented Aug 15, 2023

There are settings within the Tenant UI that remove various elements, depending on levels of permission. Work on #717, has turned off tests that relate to components with write permissions to the Database or Ledger.

@popkinj popkinj added enhancement New feature or request TenantUI Tickets related to the Tenant UI Vue/Node app testing Unit/Integration/Functional testing of static code or running applications labels Aug 15, 2023
@loneil
Copy link
Collaborator

loneil commented Aug 15, 2023

Might be some misunderstanding, tests don't relate to the helm values in the yamls at all, those are deployment side, whereas the unit tests run non-deployed code. The frontend code will never know anything about helm chart values.

It's not about turning on or off tests IMO. A unit test should just exercise code based on inputs to check expected output. So simply what's needed is the test exercising the component to go "based on this value in the config store (so that's easily mockable/changeable-in-scope without needing to know anything about actual config deployment values), should this button be visible, or not?"

See @jamshale comment here #743 (comment)
this concept is already done in another test.

@popkinj
Copy link
Collaborator Author

popkinj commented Aug 15, 2023

Might be some misunderstanding, tests don't relate to the helm values in the yamls at all, those are deployment side, whereas the unit tests run non-deployed code. The frontend code will never know anything about helm chart values.

It's not about turning on or off tests IMO. A unit test should just exercise code based on inputs to check expected output. So simply what's needed is the test exercising the component to go "based on this value in the config store (so that's easily mockable/changeable-in-scope without needing to know anything about actual config deployment values), should this button be visible, or not?"

See @jamshale comment here #743 (comment) this concept is already done in another test.

Hmmm... 🤔 ... Think I get what you're saying @loneil .
So maybe change this ticket to something like... Upgrade existing tests to account for the showWritableComponents flag??

Just keeping in nice and simple... Or maybe I can just pass this ticket to @jamshale for a proper description.

@loneil
Copy link
Collaborator

loneil commented Aug 15, 2023

"Upgrade existing tests to account for the showWritableComponents flag" is perfect 😄

@loneil loneil changed the title Flag Based Tests Upgrade existing tests to account for the showWritableComponents flag Aug 15, 2023
@jamshale
Copy link
Collaborator

I can do this ticket. Could be reference for changing configs in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request TenantUI Tickets related to the Tenant UI Vue/Node app testing Unit/Integration/Functional testing of static code or running applications
Projects
None yet
Development

No branches or pull requests

3 participants