Closed Ao-Last closed 7 months ago
Could you share a sample code for this issue?
View1:
close the peek view and then click the red character could lead to view2.
View2:
I found that with a long string that cannot be displayed in the screen would increase the probability triggering the bug.
Source code:
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package test_gradle;
public class App {
public String getGreeting() {
return "Hello World!jslkfajslkdfjaiosdjfalskdjfklajsdlkfjasiodfjasldkfj;lksdjvm,xchiugbhydafighdansk,vjhnioasdyifpujsldkfjnfcl;asdjfhiosja;fjasdikfjp9asiohjfncli;sdafi9opshalfl;asjdfkljasiopfjasolifjsdlkfcj;aiopdjflisdjfcklsdjnviogasyhgioasdjnlkhnsdaoiyhasiodjflksdjf9iajhasldfjnclksdjha9ioshjuflaidjflask";
}
public static void main(String[] args) {
System.out.println(new App().getGreeting());
}
}
Test code:
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package test_gradle;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class AppTest {
@Test void appHasAGreeting() {
App classUnderTest = new App();
assertEquals("Wrong", classUnderTest.getGreeting());
}
}
Ok, I guess I got your point.
So, there are two different kinds of different peek views:
You can switch between them in the test history
Yes. One of the view will popup as the peek view. Is it undefined?
On my machine it always shows the diff view. No random behavior is observed.
Click the two "run" button near the method signature multiple times (maybe randomly), the random behavior happened.
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.
To reproduce,
Using JUnit to perform a test with assert statement. E.g. assertEquals(expected_string, actual_stirng)
If the test failed, the plugin would show a peek view for comparison between the expected and actual.
If run the test again, the comparison view is broken.
Close the popup peek view, and click the red error message nearby, the view is a perfect comparison view.