question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom place holders for value ONE.OF

See original GitHub issue

Something like below e.g. Currently framework supports the below. Response:

{
   "currentStatus": "Searching"
}

In certain use-cases, the "currentStatus" can be one-of multiple values. Then it would be nice to support like below. Assertions:

{
       "currentStatus": "$ONE.OF:[Found, Searching, Not Looking]"
}

That means when the actual response with currentStatus having “Found” or “Searching” or “Not Looking” will pass.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
authorjappscommented, Jun 26, 2019

@jbonn360 , thanks mate!

@sarthak1997, FYI only- You can still help us in reviewing the PR, please!


The below is not part of this ticket.

Just thinking the best way we can solve this, if any of the values contains a comma(,)

Vanila case:

“currentStatus”: “$ONE.OF:[Found, Searching, Not Looking]”


Comma case(then we can go for pipe | splitter or any other better way?):

“currentStatus”: “$ONE.OF:[Foo,Bar | Foo1,Bar1 | Foo2,Bar2]”

There is no such usecase logged yet, but we will raise a separate TCH-DEBT ticket to handle this.

0reactions
authorjappscommented, Jul 7, 2019

Feature available in version 1.3.9 and higher.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using placeholders - Zendesk help
Placeholders are references to ticket and user data that you include in the subject and body of email notifications.
Read more >
Advanced: Placeholders | Jira Service Management Data ...
The placeholders available are all the attributes available in the create/edit dialog. The value of the attribute with the same name as the...
Read more >
How to Use Custom Placeholders - Docentric AX
Define and replace Custom placeholders with the corresponding values; Custom image placeholders; Set up the custom DSP class to be used in Docentric...
Read more >
Placeholders in Resource Files - Smartling Help Center
Here is a list of some common placeholders formats and custom placeholder directives to capture the text "first name" as a placeholder in...
Read more >
Java generating Strings with placeholders - Stack Overflow
This class takes a piece of text and substitutes all the variables within it. The default definition of a variable is ${variableName}. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found