Skip to content

test(remix): Run tsc before Remix E2E tests #16345

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

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

onurtemizkan
Copy link
Collaborator

Following up: #16336

@@ -20,7 +20,7 @@ test('Sends parameterized transaction name to Sentry', async ({ page }) => {

test('Sends form data with action span', async ({ page }) => {
const formdataActionTransaction = waitForTransaction('create-remix-app-express', transactionEvent => {
return transactionEvent?.spans?.some(span => span.data && span.data['code.function'] === 'action');
return transactionEvent?.spans?.some(span => span.data && span.data['code.function'] === 'action') || false;
Copy link
Member

Choose a reason for hiding this comment

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

q: What does adding || false do here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

waitForTransaction expects a function returning a boolean, after adding optional chaining, it became boolean | undefined. So, making it false in such cases

Copy link
Member

Choose a reason for hiding this comment

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

Ah... of course 😅 thanks

@onurtemizkan
Copy link
Collaborator Author

@andreiborza - this branch should fail on CI actually. And it does fail on my local. Looks like CI is letting tsc fail. I'm checking the build workflow. Making it draft.

@onurtemizkan onurtemizkan marked this pull request as draft May 20, 2025 14:42
@onurtemizkan onurtemizkan force-pushed the onur/remix-type-tests branch from ab4b1ac to 8fb25f1 Compare May 20, 2025 21:42
@onurtemizkan
Copy link
Collaborator Author

Update: I was not able to make this fail on CI (with ServerBuild type mismatch) as it looks like the tests use the latest fixed release (v9.22.0) in verdaccio, even if the branch is behind that. Anyway the tests work, I have seen them failing for ServerBuild locally.

@onurtemizkan onurtemizkan marked this pull request as ready for review May 20, 2025 21:56
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