cypress-plugins icon indicating copy to clipboard operation
cypress-plugins copied to clipboard

Send new line in custom message

Open hdiass opened this issue 4 years ago • 7 comments

Hello,

This is more a question than a issue..I've been trying all ways to find way to send a new line \n via custom-text field but it always sends the plain string . Do you know how can i achieve the new line via custom-text message?

Thanks,

hdiass avatar Sep 21 '20 09:09 hdiass

you may need to escape it with \\n 👍🏽 if not let me know and we can add a test and see what happens

YOU54F avatar Oct 09 '20 14:10 YOU54F

It doesn't work, it sends the plain \\n unfortunatly.. i've tried that

hdiass avatar Oct 12 '20 09:10 hdiass

this is coming soon :) details to follow

YOU54F avatar Apr 27 '22 13:04 YOU54F

@YOU54F any update ? It still doesn't work

samixchoumi avatar Jan 11 '23 16:01 samixchoumi

Hey,

I never implemented this in the old implementation.

I rewrote it using slack-block-builder as it would give the user much more configurability over what they want to send rather than having to make PR's but never got round to releasing it.

https://github.com/YOU54F/cypress-plugins/blob/master/cypress-slack-reporter/src/index.ts

https://github.com/YOU54F/cypress-plugins/blob/master/cypress-slack-reporter/src/slackClient.ts

https://github.com/YOU54F/cypress-plugins/blob/master/cypress-slack-reporter/src/messageConstructor.ts

It's probably fit for consumption and worth spending your efforts on that, would appreciate some feedback and we could get that released to the world instead?

What do you think?

YOU54F avatar Jan 17 '23 18:01 YOU54F

Hello, sorry for the delay, i was very sick. I take a simple look and it seem good to me, i looked at the "old" project, as you merged my PR, we should add the new tag useOnlyCustomUrl too and add the code to slackClient.ts.

samixchoumi avatar Jan 23 '23 09:01 samixchoumi

Definetly looking forward to this feature. Came here with the plan to make a ticket for this feature request but found one already made.

Vahan-Koloyan-Netris avatar Feb 07 '23 22:02 Vahan-Koloyan-Netris