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 H1 title for test plan review page #816

Merged
merged 3 commits into from
Oct 26, 2023
Merged

Fix H1 title for test plan review page #816

merged 3 commits into from
Oct 26, 2023

Conversation

Paul-Clue
Copy link
Collaborator

see issue #789

This pull request changes the H1 value in the test plan review page from the name of the test plan directory to the actual title of the the test plan.

@Paul-Clue Paul-Clue requested a review from alflennik October 19, 2023 18:19
Copy link
Contributor

@alflennik alflennik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, assuming you remove that one console log. I verified it is working before / after, and I ran the tests successfully.

Code changes look good. I actually checked the code pretty carefully for this one, because I noticed that you added the first database-related call in this file. I wanted to make sure there isn't an important reason that database calls haven't yet been used. I found nothing that gives me doubt, so I do think the way you did this is the simplest and most straightforward approach.

@@ -342,6 +345,9 @@ const generateTests = async (pattern, commit, commitDate) => {
app.get('/:commit/:pattern', async (req, res) => {
const commit = req.params.commit;
const pattern = req.params.pattern;
const testPlan = await getTestPlanById(pattern);
const testPlanTitle = testPlan.title;
// console.log("New Log", testPlan.title);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Done

Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also going to approve. Title renders correctly and the DB query is necessary.

I do think that getTestPlanId (and by extension getTestPlans) could stand to be improved so that we can specify columns for retrieval. In this instance, we only need one property but we end up with the result of SELECT * FROM which is actually a deep object. This is outside the bounds of this PR though.

Good job!

@Paul-Clue Paul-Clue merged commit 0f1d4ee into main Oct 26, 2023
@Paul-Clue Paul-Clue deleted the h1-test-plan-review branch October 26, 2023 18:57
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.

3 participants