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

Update E2E packages #94

Closed
wants to merge 5 commits into from
Closed

Update E2E packages #94

wants to merge 5 commits into from

Conversation

rylew1
Copy link

@rylew1 rylew1 commented Dec 7, 2024

Ticket

Resolves navapbc/template-infra#801

Changes

  • Update npm packages and bump Dockerfile playwright image version

Preview environment for app

Preview environment

♻️ Environment destroyed ♻️

Makefile Outdated
playwright-e2e
playwright-e2e | grep -v "To open last HTML report run" | grep -v "npx playwright show-report"
@echo "📄 HTML report generated!"
@echo "🔍 View it with: make e2e-show-report"
Copy link
Author

Choose a reason for hiding this comment

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

remove the default playwright command it shows and insert our make command

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, pretty clever. It's a little too clever/magical for my tastes, and it's also brittle since the playwright CLI output isn't an API we can rely on.

Copy link
Author

Choose a reason for hiding this comment

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

What about not removing the the playwright command but just echo'ing the make command ?

Will move just the package updates over to template-infra

Copy link
Author

Choose a reason for hiding this comment

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

@lorenyu see above comment if it makes sense to do

Copy link
Contributor

Choose a reason for hiding this comment

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

What about not removing the the playwright command but just echo'ing the make command ?

Sure that sounds good

@rylew1 rylew1 requested a review from lorenyu December 9, 2024 03:31
Copy link
Contributor

@lorenyu lorenyu left a comment

Choose a reason for hiding this comment

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

The package updates are fine but I don't think we should merge the other changes.

Makefile Outdated
Comment on lines 89 to 95
@if [ ! -d "./e2e/blob-report" ]; then \
echo "❗The blob-report folder does not exist. Cannot merge reports."; \
exit 1; \
elif [ -z "$(wildcard ./e2e/blob-report/*)" ]; then \
echo "❗The blob-report folder is empty. Cannot merge reports."; \
exit 1; \
else \
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't feel worth it to me. it makes the code a lot less readable (1 line --> 9 lines of mostly error handling) for what feels like minimal benefit

Makefile Outdated
Comment on lines 108 to 116
@if [ ! -d "./e2e/playwright-report" ]; then \
echo "❗ Error: The playwright-report folder does not exist. Cannot display reports."; \
exit 1; \
elif [ -z "$(wildcard ./e2e/playwright-report/*)" ]; then \
echo "❗ Error: The playwright-report folder is empty. Cannot display reports."; \
exit 1; \
else \
cd e2e && npx playwright show-report; \
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, the error handling code makes this a lot harder to read

Makefile Outdated
playwright-e2e
playwright-e2e | grep -v "To open last HTML report run" | grep -v "npx playwright show-report"
@echo "📄 HTML report generated!"
@echo "🔍 View it with: make e2e-show-report"
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, pretty clever. It's a little too clever/magical for my tastes, and it's also brittle since the playwright CLI output isn't an API we can rely on.

@rylew1 rylew1 requested a review from lorenyu December 9, 2024 18:19
@rylew1 rylew1 changed the title Update E2E report messaging Update E2E packages Dec 9, 2024
@rylew1
Copy link
Author

rylew1 commented Dec 9, 2024

Moved to template-infra with just package updates navapbc/template-infra#805

@rylew1 rylew1 closed this Dec 17, 2024
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.

Update e2e packages
2 participants