I'm fairly new at automated testing and setting up Nightwatch but I can already tell my Custom Commands folder is going to get unwieldy sooner or later. I've seen some example nightwatch.json files that use an array for the Custom Commands Path but I can seem to figure it out. Is it possible? Are the examples I've seen out of date?
Here's what I'm attempting to define in nightwatch.json:
"custom_commands_path" : [
"./custom-commands/",
"./custom-commands/login-signup/"
],
If I place my "loginFromHomepage" custom command file in the /custom-commands folder it'll run just fine. If I move the file to /custom-commands/login-signup I get an error stating that the "loginFromHomepage" commands doesn't exist.
What am I missing or not understanding here?
Thanks!
I normally separate my pages by folders. Try something like this
"custom_commands_path": [
"./customCommands/folder1",
"./customCommands/folder2",
"./customCommands/folder"
],
I just realized this was a problem with our setup. For some reason our runner.js file was looking at nightwatch.json AND nightwatch-dev.json for the nightwatchConfig.
I'm not clear on why we're using both but it appears my issue was because I was only adding the additional folders for the custom commands to nightwatch.json and not nightwatch-dev.json.
Related
I am a Java developer trying to comeup with a Python script that performs application re-deployment in WebSphere. Can someone clarify if the below command is sufficient for the same? I am aware that the 3rd parameter takes many optional parameters. But I am not too sure which of those are relevant in the case where we want to keep the existing mappings intact.
AdminApp.update(appName, 'app', '-operation update -contents "warFilePath" ')
Any help is appreciated.
Thank you.
That's close, although I think the command has to be an array of strings like below. You also have to save the change to make it stick:
AdminApp.update( appName, 'app', [ '-operation', 'update', '-contents', filePath ] )
AdminConfig.save()
You might be interested in this script, which has additional error handling and cases around those core lines.
I thought of creating a constants.php file in the config directory but didn't go ahead with it as it kinda contradicts the idea of "CONSTANTS" as anything in config can be changed at run time. So what are the best practices in storing constants in a laravel project without too many "require_once"s or "use"s ?
pointer to some public git project which uses a standard way to get this done would be great.
you have to make constant in one file and use all over laravel than you have to make one file that can we write all the constant and costume functions.
Follow the steps
Make one Helper.php file in the your app->Http directory.
Write the all the constant and function there.
Then make following changes in your composer.josn
"files": [
"app/Http/helpers.php"
],
Then following command in your laravel project directory.
$ composer dumpautoload
Well, turns out I have an ExtJS application. My views folder structure (if not the best), is this:
CE\app\view\process\Pre
OK, inside this folder, I created some components in some other folders, such as:
CE\app\view\process\Pre\StudentData\Tabs\GeneralDataTab.js
CE\app\view\process\Pre\StudentData\Tabs\AddressDataTab.js
CE\app\view\process\Pre\StudentData\Tabs\SchoolDataTab.js
CE\app\view\process\Pre\ParentData\Common\DataPanel.js
I define all of these componentes like this:
Ext.define("CE.view.process.Pre.StudentData.Tabs.GeneralDataTab", {
//some code to define and create my class
});
According to my research, I must name my class with the original folder structure, separared by dots.
Everything was fine while I was developing, but once I executed SENCHA CMD BUILD to test the results, I got this error:
Couldn't find "Tabs" of undefined/Couldn't find "Common" of undefined
I checked many times the paths, the names and everything was OK.
So, I remove the last folders (Tabs/Common):
CE\app\view\process\Pre\StudentData\GeneralDataTab.js
CE\app\view\process\Pre\StudentData\AddressDataTab.js
CE\app\view\process\Pre\StudentData\SchoolDataTab.js
CE\app\view\process\Pre\ParentData\DataPanel.js
And voila! My application was working.
Everything happened after I ran SENCHA CMD BUILD, 'cause not even with SENCHA CMD BUILD TESTING I got this error.
Do you know if I mustn't nest that much folder structure in a Sencha ExtJS app?
I know I can define paths in the paths configuration of the application. I tried this, and renamed my classes, but It didn't work either.
Do you thing I did something wrong? Is it a bug of Sencha CMD? I'm using the version 4.0.1.45.
Thank you in advance.
EDIT:
I would like you to let you know that I resolved this problem, and I hope this could help you too.
In fact the problem wasn't the nested folders but the name of the classes.
In my Application.js file I added a new path, like this:
paths: {
//...
'ProcessViews' : '../CE/app/view/process',
},
And now my classes name look like this:
Ext.define("ProcessViews.Pre.StudentData.Tabs.GeneralDataTab", {
//some code to define and create my class
});
And now I don't get any error message and the application runs OK.
So, looks like a class name can't be that long. If you need it to, then you should use a path defined in the Application.js to make a shorter name. :)
Thank you.
I try a few things which I saw on internet, I make many examples.
But always I get this error :
Error:Can not write config file fullback.ini
the screenshot is below
How can I fix this?
You need to change to a directory you have write access to. It looks like you are in /home/root. Try changing directory to /home/dbadmin first.
I am using guard-jasmine create coverage reports for my javascript app written with backbone js. I would like to exclude the template files from being included in the coverage. Is there a way to do this currently? I have also tried looking through the source and passing the -x option to the intrument command in the coverage.rb file but that doesn't seem to help at all. Any pointers would be appreciated.
Thanks!
There is currently no way of configuring Guard::Jasmine to skip specific files from generating the coverage.
A possible way to add this would be to add something like a coverage_skip option that contains a regex to check it as a preconodition in the coverage tilt template:
return data if file =~ ENV['COVERAGE_SKIP']
Since we do not have access to the Guard::Jasmine options, we need to set it as an environment variable in the server process.
A pull request is heartly welcome ;)