Skip to content

Conversation

onurtemizkan
Copy link
Collaborator

Following up: #16336

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
@AbhiPrasad AbhiPrasad merged commit d06b72b into develop May 29, 2025
135 checks passed
@AbhiPrasad AbhiPrasad deleted the onur/remix-type-tests branch May 29, 2025 16:32
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