Cannot import kotlin.test.Test with gradle - kotlin

I use (don't care about versions, I use platform to manage versions):
testCompile("org.jetbrains.kotlin:kotlin-test-testng")
testCompile("org.jetbrains.kotlin:kotlin-test")
testCompile("org.jetbrains.kotlin:kotlin-test-common")
But cannot import kotlin.test.Test:
import kotlin.test.Test
Test shows red in IDEA, means not found, Why? something I ignored?

Related

Selenium - Import devtools

I am capturing network HTTP requests. This technique is discussed here https://applitools.com/blog/selenium-4-chrome-devtools/#h.bc0ghombcetz
When I try to import the selenium class for 'Network', I get several options :
-org.openqa.selenium.devtools.v103.network.Network
-org.openqa.selenium.devtools.v102.network.Network
-org.openqa.selenium.devtools.v101.network.Network
How I could pick a "general" import (without specifying the version) because I dont want to change with each new release the import version? Any ways to do that?

Trouble with imports in IntelliJ IDEA CE for and FTC Robotics Simulator

I am trying to use the virtual robot simulator designed by team Beta#8397 and got the simulator working. Now I am trying to put my teams code in so that we can test it. I am getting a bunch of errors that I'm pretty sure all stem from one error that some of the imports aren't importing. Also, my teams code builds fine when not combined with the simulator. I'm not amazing a java, but do know how most of my teams code works. Here is the code for the imports
package org.firstinspires.ftc.teamcode.Robovines;
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.robot.Robot;
import com.qualcomm.robotcore.util.Hardware;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.util.Range;
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.DigitalChannel;
The errors are on lines 4,5 and 13 with the package being the first line. On line 4 the error is that com.qualcomm.robotcore.robot.Robot does not exist. On lines 5 and 13 the error is that symbol "Hardware" and "DigitalChannel" respectively cannot be found.
Here is the whole project
#BookNinja S : The link you provided doesn't take me to your code.
The virtual robot simulator provides a subset of the functionality of the FTC SDK.
That subset has increased over time, but as commented by #CrazyCoder, the Controller module does not include the com.qualcomm.robotcore.robot.Robot, com.qualcomm.robotcore.util.Hardware, or com.qualcomm.robotcore.hardware.DigitalChannel classes.
With regard to DigitalChannel, this type of sensor is not part of the virtual robot functionality. But, it would be easy to add a dummy DigitalChannel class to the controller (so, getState would always return false, and setState would do nothing).
Dummy classes could probably be used for Hardware and Robot as well, but that would depend upon how you are using those classes in your op modes.
If you submit this as an issue on the virtual_robot github repository, with a link to your project or an explanation of how you are using the Hardware and Robot classes, we (ftc team Beta 8397) can probably add the needed functionality to the virtual_robot project.

PhpStorm Vuejs file move adds '/types' to 'vuex' import statement

I'm working with Vue.js single file components in PhpStorm. When I move a component file into another directory, PhpStorm is adding /type to the end of any vuex import statement, (which blows them up until I do a find/replace to set them all back).
For example:
import {mapActions} from 'vuex';
gets changed to:
import {mapActions} from 'vuex/types';
Anyone know what is causing this or how to fix it? Seems like an odd glitch or maybe setting in the refactoring abilities of PhpStorm ???
It appears to have been a bug in version 2019.1.2, upgrading to 2019.1.3 fixed it.

IntelliJ changes npm pkg import paths on refactor move

When I move a file or directory, IntelliJ fixes all relative import paths according to the new path.
Since last update the package imports also get changed, for example:
import { fromJS } from 'immutable';
import glamorous from 'glamorous';
changes to
import { fromJS } 'immutable/dist/immutable-nonambient';
import glamorous from 'glamorous/typings/glamorous';
I get that the named imports (or lack of) probably match in both cases, but since the imports are absolute it doesn't really make sense to change the import paths.
Is there any way to disable this?

Intellij auto complete just not working for java.util.HashMap

I'm using Intellij IDEA 2017.1.2 on MacOS High Sierra and the situation is when I type OPTION+ENTER it recommends me to import a class,Auto imports for all classes work well except for HashMap. For example, the class HashTable in the java.util package can auto complete.
I don't know what I had click or checked so how can I fix this problem?
See Preferences > Editor > General > Auto Import > Exclude from Import and Completion.
Here's a screenshot:
With this exclusion in place IntelliJ will not offer java.util.HashMap as an auto import option.
If you remove this exclusion IntelliJ will resume offering java.util.HashMap as an auto import option.