Jbehave pass data in lifecycle step - jbehave

in below example data is being passed in scenario steps, but not in Lifecycle step any idea why?
Lifecycle:
Before:
Scope: SCENARIO|STORY
Outcome: ANY
When I enter search criteria (<ProfilerEntityName>) on the Search page
Given I navigate to CB Finder
When I select file with Name (<FileName>)
When I delete the file which is currently selected
Scenario: Basic report functionality
When I enter search criteria (<ProfilerEntityName>) on the Search page
Given I navigate to CB Finder
When I select file with Name (<FileName>)
When I delete file which is currently selected
Examples:
| ProfilerEntityName |FileName |
|* |sha|Call |

Related

Azure Data Factory - Check If Any Zip File Exists

I am trying to check if any zip file exists in my SFTP folder. GetMetadata activity works fine if I explicitly provide the filename but I can't know the file name here as the file name is embeded with timestamp and sequence number which are dynamic.
I tried specifying *.zip but that never works and GetMetadata activity always returns false even though the zip file actually exists. is there any way to get this worked? Suggestion please.
Sample file name as below, in this the last part 0000000004_20210907080426 is dynamic and will change every time:
TEST_TEST_9999_OK_TT_ENTITY_0000000004_20210907080426
You could possibly do a Get Metadata on the folder and include the Child items under the Field List.
You'll have to iterate with a ForEach using the expression
#activity('Get Folder Files').output.childItems
and then check if item().name (within the ForEach) ends with '.zip'.
I know it's a pain when the wildcard stuff doesn't work for a given dataset, but this alternative ought to work for you.
If you are using exists in the Get Metadata activity, you need to provide the file name in it.
As a workaround, you can get the child items (with filename *.zip) using the Get Metadata activity.
Output:
Pass the output to If Condition activity, to check if the required file exists.
#contains(string(json(string(activity('Get Metadata1').output.childItems))),'.zip')
You can use other activities inside True and False activities based on If Condition.
If there is no file exists or no child items found in the Get Metadata activity.
If condition output:
For SFTP dataset, if you want to use a wildcard to filter files under the field specified folderPath, you would have to skip this setting and specify the file name in activity source settings (Get Metadata activity).
But Wildcard filter on folders/files is not supported for Get Metadata activity.

Impossible to delete blank line in generated word with template

I'm currently using m2doc for my Capella project and when I launch the generatio of the docuement with the template that I have created some lines in my tables are empty and they are not deleted.
Example :
test | test | test
| |
file | file | file
I'm currently using Acceleo in my template to retrieve the information in my Capella diagrams. But I don't know how to delete this empty lines in the table which are useless for me.
Example of my code :
{ m:if ports.name.contains('LOC')}
So I need your help to delete this empty lines in my table.
Thank you.
Regards,
Marc
If you insert your table using asTable*() from Sirius services, the table is an instance of the Java type MTable.
You can write a Java service that take a MTable as parameter and check for MRow without any MCell in it. If the MRaw is empty remove it from the table and return the table.

How to specify --downloads option?

I am trying to figure out how to create downloadable woocommerce products. Trouble is syntax for the --downloads argument for $ wp wc product create.
It appears that the downloads argument should be one ore more objets having "id", "name", "file" specifications. The toughest one to figure is "id". I tried using the specs for a download file associated with another product. Still get an [] empty value for that new product when I ask:
$ wp wc product list --fields=id,name,downloads
$ wp wc product create --name="CLI Test Downloads" --type=simple --regular_price=20 --downloadable=true --downloads=[{"id":"2d40862d-0044-4da6-bd87-0e94bf5531d6","name":"e-SIGNES-53no2.pdf","file":"https:\/\/ventardlab.info\/wp-content\/uploads\/2019\/01\/e-53no2.pdf"}]
I get no error message, just that product is created. But when I check the new product in the WordPress dashboard, there are no download file included.
I found the answer by myself after browsing other posts under wp-cli tag of Stack Overflow.
Solution is quite simple: enclose the --downloads value within single quotes.
For example --downloads=' [ { .... } ] ' with the appropriate syntax inside the wp wc object. VoilĂ !

GitHub Find file by its content

Can I filter files in a GitHub repository by file content?
For example, there is the public repo:
https://github.com/xamarin/mobile-samples.
I know that I can find file by name using this option:
https://github.com/xamarin/mobile-samples/find/master
But, can I filter results to files containing specified text eg. "Entry"?
Is there some query-string which I can use to do that?
I mean something like this:
https://github.com/xamarin/mobile-samples?content=entry
Just open repository, go to top search bar (where you search for other repos) and type:
Entry
Select to search in current repository, not "All GitHub".
To search for term in particular file of repository type:
Entry filename:example_filename.java
It will display all "Entry" in particular file.

Code Review - Clearcase - How to get a list of files a user modified since another label?

I'd like to create a dynamic view that only shows the files a user created/modified for a particular label.
Right now, I am listing all of the files in the label and comparing that with the previous label.
If I have to use cleartool to find the files, that is fine with me. I'd like the process to be more automated than it currently is.
Another option too is, can I simply see the diffs for a particular user? That way, I am more likely to understand the file's history. If a developer had attempted something one way and found that didn't work, it might be helpful to see that trial and error.
config spec:
#element * REL_2010.2.2.006
element * .../pgh_rel_4.0.0_dot_rel/{created_by(pp50773)&&lbtype(REL_2010.2.2.006)}
# first stop rule
element -directory * .../pgh_rel_4.0.0_dot_rel/{lbtype(REL_2010.2.2.006)}
# second stop rule
element -directory * main/LATEST
This config spec doesn't fetch my changes - It fetches empty directories. It is also important to note that while I made the changes to the actual file, another guy is responsible for applying the label weekly. So, if it goes by whose name is on the label, that won't work.
If I remove the created_by constraint, it works fine listing all of the changes for the label, but I want only files in that label for a given user.
Walter
According to the version selector rules, you can do that, but I would recommend:
2 dynamic views (easy to setup and refresh, since their content is not downloaded on your hard drive, but accessed through the network)
one one for one label
one for the other
to not forget to add stop rules for directories (if directories are not created by your user, they won't be selected, meaning your view won't be able to select any version within it.
The config spec for one of those view would be something like:
element * .../MyBranch/{created_by(myuser)&&lbtype(MY_LABEL)}
# first stop rule
element -directory * .../MyBranch/LATEST
# second stop rule
element -directory * main/LATEST
When you have two views correctly configured, you can compare their content with a tool like WinMerge.