protractor 4.0.0 breaking changes affect access to vanilla webdriver - webdriver

In the changelog under the 4.0.0 breaking changes, states
(d932ad7) chore(browser): rename protractor to browser and add a
protractor namespace (#3214)
added wrapDriver method from the browser.ts and ExpectedConditions to
the protractor namespace imported selenium webdriver ActionSequence,
Key, promise, Command, and CommandName to the protractor namespace
How does this affect usage of vanilla Webdriver as described in Protractor Syntax vs WebDriverJS Syntax?

Related

Nette - importing naja library

I have a question. I need to make some modification to our nette application (first time working with the framework). I need to import NAJA lib via FTP and by downloading code from github. I do not have access to server or console, so download via composer, npm... is not possible.
I done this:
Downloaded all files from https://github.com/jiripudil/Naja/releases (not the ZIPs) and put them in directory vendor
loaded in app/presenters/templates/#layout.latte with:
<script src="{$basePath}/js/vendor/Naja.js" type="module"></script>
Tried to inicialize it in one of my javascript with:
document.addEventListener('DOMContentLoaded', naja.initialize() );
But then error pop up, saying that naja is not defined. What am I missing?
Naja is written using modern JavaScript, it can be initialized only via ES5+ import, for instance
import naja from 'naja';
and then the event listener for initializing naja can be added after that code, and it can be compiled via webpack like this https://github.com/MinecordNetwork/Website/blob/master/webpack.config.js
You can do it all on your local machine with npm and yarn installed, and then upload bundle.js that was built to the server, it's also used in the mentioned repository so you can check out how and what libraries are needed, to compile the code from /public/js/main.js type yarn encore production or yarn build for development.

Error when running Corda flow tests from IntelliJ

When I run Corda flow tests from IntelliJ, the tests fail with the following errors:
QUASAR WARNING: Quasar Java Agent isn't running. If you're using
another instrumentation method you can ignore this message; otherwise,
please refer to the Getting Started section in the Quasar
documentation.
and
java.lang.IllegalStateException: Missing the '-javaagent' JVM
argument. Make sure you run the tests with the Quasar java agent
attached to your JVM. See https://docs.corda.net/troubleshooting.html
- 'Fiber classes not instrumented' for more details.
How can I fix this?
Corda flows need to be instrumented using Quasar before they are run, so that they can be suspended mid-execution.
To achieve this in IntelliJ, you need to:
Create a run config for your tests
Open the run config and change the VM options to -ea -javaagent:PATH-TO-QUASAR-JAR
In the CorDapp example and templates, quasar.jar is located at lib/quasar.jar, so you'd use -ea -javaagent:../lib/quasar.jar
Alternatively, you can edit the default JUnit run config to use the Quasar javaagent by default, avoiding you having to do this every time you pick a new test to run.
This is a basic error that you get if you don't set Quasar, you need to select your test-> go to Intellij top bar-> Run -> Edit Configurations and then set up like this photo in VM options:
From template readme
We recommend editing your IntelliJ preferences so that you use the Gradle runner - this means that the quasar utils plugin will make sure that some flags (like -javaagent - see below) are set for you.
To switch to using the Gradle runner:
Navigate to Build, Execution, Deployment -> Build Tools -> Gradle ->
Runner (or search for runner) Windows: this is in "Settings" MacOS:
this is in "Preferences" Set "Delegate IDE build/run actions to
gradle" to true Set "Run test using:" to "Gradle Test Runner" If you
would prefer to use the built in IntelliJ JUnit test runner, you can
run gradlew installQuasar which will copy your quasar JAR file to the
lib directory. You will then need to specify -javaagent:lib/quasar.jar
and set the run directory to the project root directory for each test.
Btw, if you face same error in VSCode, you can add
"java.test.config": {
"vmArgs": ["-ea", "-javaagent:../lib/quasar.jar"]
},
to settings.json. The path ../lib/quasar.jar may be different in your project.

The source map 'data:application/json;base64,';' for file 'domain/systemjs/dist/system.src.js' could not be loaded correctly due to an error

I have problem with Visual studio.
I'm developing angular 2 / Web Api (.net 4.6.1) application.
When application is starting, that visual studio freeze for ~30s and to Output console write
The source map 'data:application/json;base64,';' for file
'domain/systemjs/dist/system.src.js' could not be loaded correctly due
to an error.
Do you have experience with this?
Thanks.
I came across the same error message when investigating on why there are no symbols loaded for my breakpoints, set in TypeScript files
Problem
I used Webpack Task Runner, started in watch-mode to create the bundles.
WebpackTaskRunner started webpack with param "-d" - that caused the issue.
Solution (for me)
Remove "WebPack Task Runner" Extension from VS
Add "NPM Task Runner" - Extension to VS
Add the following npm-script to package:
"webpack-watch": "set NODE_ENV=development && webpack --color --watch"
Finally created a binding in Task Runner Explorer for "Project Open" and the "webpack-watch" script.
Using that binding, webpack is started in watch-mode (without "-d" param) after opening the project in VS.
This solved my issues (no more error messages) and the breakpoints in Typescript-Files were hit.

Can't get Spring Boot devtools auto restart get to work with 1.3M5 with Eclipse

I cant get SpringBoot autorestart get to work. I simply create http://start.spring.io/ Gradle project with DevTools selected and run 'gradle eclipse' to create eclipse project and 'gradle bootRun' and now I can do some change in project in Eclipse and this doesnt trigger auto restart at all. There is no message in bootRun console, no change detection. Any idea whats wrong here? I tried several times making starter project with http://start.spring.io and no way with auto restart ...
https://spring.io/blog/2015/06/17/devtools-in-spring-boot-1-3
Gradle in Eclipse and Gradle on the command line use different directories for their compiled classes. The dev tools (launched via bootRun) will be looking in build/classes whereas Eclipse will be compiling your changes into bin/classes. Rather than launching your app using gradle bootRun, try launching it in Eclipse instead using Run As -> Java application.
In one terminal:
gradle build --continuous
In second terminal:
gradle bootRun
Reference: https://dzone.com/articles/continuous-auto-restart-with-spring-boot-devtools
BTW, I find it take longer time than the eclipse.

Grails plugin compass-sass doesn't work on grails version 2.3.5

In the latest version of Grails, 2.3.5, I am trying to use the plugin compass-sass.
So, I put the following in my build.groovy file. compile ":compass-sass:0.7"
And, I add the following into the "Arguments" when running my example app. PATH=C:\jruby-1.7.4\bin
All I should have to do here is run the app and it should work. I know, cause I have it going on Grails 2.1.1.
What happens is, the app runs and there is no mention of compass at all. I should see the following in the grails console "Executing: jruby -S compass watch --sass-dir ./src/scss --css-dir ./web-app/css/local --output-style nested --images-dir web-app/images --relative-assets"
Anybody any ideas?
By the way, I have JRuby installed and compass is installed in JRuby.
So I've figured this out.
Compass-sass relies on the the event "eventConfigureTomcat" to react when the scss file is changed. This Event is in the file _Events.groovy within the compass-sass plugin itself.
Turns out the event "eventConfigureTomcat" doesn't trigger in Grails 2.3.
After I figured this out it was easy to find info on this Grails bug.
Here is a link for Stackoverflow - The eventConfigureTomcat is not invoked in Grails 2.3. How to config tomcat in grails 2.3 development environment?
Anyway, a workaround is to knock off fork for run. See below.
grails.project.fork = [
run: false,
]

Resources