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

fix: Make sure the correct record is selected after an execution #124

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

mhan83
Copy link
Contributor

@mhan83 mhan83 commented Nov 6, 2024

Description

Select the correct test record in the tree after a test run completes.

Using the TreeView's reveal api requires the data provider to implement the optional getParent method. The implementation I added is going to look a little strange since I couldn't find an explicit reference from a TestStep to its parent TestRecord. The implementation uses img_url as the way to map them since img_url contains the jobID in the path. We're not actually using the reveal api to currently select TestSteps though, only TestRecords. So the implementation in this PR is technically not necessary. The alternative is to just return null which signals to the TreeView the item being revealed is a child of the root (i.e. TestRecord). Both not ideal! So I'm open to whichever one the team thinks is less confusing.

DEVX-3071

@mhan83 mhan83 requested a review from a team as a code owner November 6, 2024 16:00
@alexplischke
Copy link

@mhan83 Do you think its worthwhile to keep the test steps in the history view? If not, then we can remove it here and that'll also conveniently remove the need to work out the test step vs test record mapping 🤔

@mhan83
Copy link
Contributor Author

mhan83 commented Nov 6, 2024

@mhan83 Do you think its worthwhile to keep the test steps in the history view? If not, then we can remove it here and that'll also conveniently remove the need to work out the test step vs test record mapping 🤔

If the test steps are removed, I think we'd want to migrate away from a TreeView. The TreeView will always show the chevron even if there are no children to render:

Screenshot 2024-11-06 at 10 36 01 AM

@mhan83
Copy link
Contributor Author

mhan83 commented Nov 6, 2024

Actually it was pretty straightforward to remove the children from the history view.

@mhan83 mhan83 requested a review from alexplischke November 6, 2024 20:13
@mhan83 mhan83 merged commit c399092 into main Nov 6, 2024
1 check passed
@mhan83 mhan83 deleted the devx-3071 branch November 6, 2024 21:58
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