Skip to content

Bugfixes on tests and github actions runner for Windows #10196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replaced FEST with assertJ
  • Loading branch information
cmaglie committed Jun 19, 2020
commit 74a66e5764488d7cfc2441f077296e7dec7fa715
12 changes: 7 additions & 5 deletions app/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@
<classpathentry kind="lib" path="lib/xml-apis-1.3.04.jar"/>
<classpathentry kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>
<classpathentry kind="lib" path="lib/xmlgraphics-commons-2.0.jar"/>
<classpathentry kind="lib" path="test-lib/junit-4.11.jar"/>
<classpathentry kind="lib" path="test-lib/fest-assert-1.2.jar"/>
<classpathentry kind="lib" path="test-lib/fest-reflect-1.2.jar"/>
<classpathentry kind="lib" path="test-lib/fest-swing-1.2.jar"/>
<classpathentry kind="lib" path="test-lib/fest-util-1.1.2.jar"/>
<classpathentry kind="lib" path="test-lib/jcip-annotations-1.0.jar"/>
<classpathentry kind="lib" path="lib/jtouchbar-1.0.0.jar"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.8.1.jar"/>
<classpathentry kind="lib" path="lib/jssc-2.8.0-arduino4.jar"/>
<classpathentry kind="lib" path="test-lib/assertj-swing-junit-3.9.2.jar"/>
<classpathentry kind="lib" path="test-lib/assertj-core-1.7.1.jar"/>
<classpathentry kind="lib" path="test-lib/assertj-swing-1.2.0.jar"/>
<classpathentry kind="lib" path="test-lib/assertj-swing-junit-1.2.0.jar"/>
<classpathentry kind="lib" path="test-lib/assertj-swing-junit-4.5-1.2.0.jar"/>
<classpathentry kind="lib" path="test-lib/fest-util-1.2.5.jar"/>
<classpathentry kind="lib" path="test-lib/junit-4.5.jar"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to downgrade junit from 4.11 to 4.5. Is that intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a forced dependency from assertj-swing-junit-4.5-1.2.0.jar, unfortunately I didn't found an assertj-swing-junit-4.11-1.2.0.jar.

Maybe it's ok to build with juint-4.11, but since it's not a critical dependency I've just downgraded it.

<classpathentry kind="output" path="bin"/>
</classpath>
Binary file added app/test-lib/assertj-core-1.7.1.jar
Binary file not shown.
Binary file added app/test-lib/assertj-swing-1.2.0.jar
Binary file not shown.
Binary file added app/test-lib/assertj-swing-junit-1.2.0.jar
Binary file not shown.
Binary file added app/test-lib/assertj-swing-junit-3.9.2.jar
Binary file not shown.
Binary file added app/test-lib/assertj-swing-junit-4.5-1.2.0.jar
Binary file not shown.
Binary file removed app/test-lib/fest-assert-1.2.jar
Binary file not shown.
Binary file removed app/test-lib/fest-reflect-1.2.jar
Binary file not shown.
Binary file removed app/test-lib/fest-swing-1.2.jar
Binary file not shown.
Binary file removed app/test-lib/fest-util-1.1.2.jar
Binary file not shown.
Binary file added app/test-lib/fest-util-1.2.5.jar
Binary file not shown.
202 changes: 0 additions & 202 deletions app/test-lib/fest.LICENSE.ASL-2.0.txt

This file was deleted.

Binary file removed app/test-lib/junit-4.11.jar
Binary file not shown.
Binary file added app/test-lib/junit-4.5.jar
Binary file not shown.
14 changes: 6 additions & 8 deletions app/test/processing/app/AbstractGUITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@

package processing.app;

import cc.arduino.files.DeleteFilesOnShutdown;
import org.fest.swing.edt.FailOnThreadViolationRepaintManager;
import org.fest.swing.edt.GuiActionRunner;
import org.fest.swing.edt.GuiQuery;
import javax.swing.JPopupMenu;

import org.assertj.swing.edt.FailOnThreadViolationRepaintManager;
import org.assertj.swing.edt.GuiActionRunner;
import org.assertj.swing.edt.GuiQuery;
import org.junit.After;
import org.junit.Before;
import processing.app.helpers.ArduinoFrameFixture;
import processing.app.helpers.FileUtils;

import javax.swing.*;
import java.util.Random;
import processing.app.helpers.ArduinoFrameFixture;

public abstract class AbstractGUITest extends AbstractWithPreferencesTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@

package processing.app;

import org.fest.swing.fixture.JMenuItemFixture;
import org.junit.Test;
import processing.app.helpers.SketchTextAreaFixture;

import static org.junit.Assert.assertEquals;

import org.assertj.swing.fixture.JMenuItemFixture;

public class AutoformatProducesOneUndoActionTest extends AbstractGUITest {

public static final String SOURCE_BEFORE = "void setup() {\n" +
Expand Down
7 changes: 4 additions & 3 deletions app/test/processing/app/AutoformatSavesCaretPositionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@

package processing.app;

import org.fest.swing.fixture.JMenuItemFixture;
import static org.junit.Assert.assertEquals;

import org.assertj.swing.fixture.JMenuItemFixture;
import org.junit.Test;
import processing.app.helpers.SketchTextAreaFixture;

import static org.junit.Assert.assertEquals;
import processing.app.helpers.SketchTextAreaFixture;

public class AutoformatSavesCaretPositionTest extends AbstractGUITest {

Expand Down
7 changes: 4 additions & 3 deletions app/test/processing/app/AutoformatTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@

package processing.app;

import org.fest.swing.fixture.JMenuItemFixture;
import static org.junit.Assert.assertEquals;

import org.assertj.swing.fixture.JMenuItemFixture;
import org.junit.Test;
import processing.app.helpers.SketchTextAreaFixture;

import static org.junit.Assert.assertEquals;
import processing.app.helpers.SketchTextAreaFixture;

public class AutoformatTest extends AbstractGUITest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@

import java.awt.Frame;

import org.fest.swing.edt.GuiActionRunner;
import org.fest.swing.edt.GuiQuery;
import org.fest.swing.fixture.JMenuItemFixture;
import org.assertj.swing.edt.GuiActionRunner;
import org.assertj.swing.edt.GuiQuery;
import org.assertj.swing.fixture.JMenuItemFixture;
import org.junit.Test;

import processing.app.helpers.SketchTextAreaFixture;
Expand Down
5 changes: 3 additions & 2 deletions app/test/processing/app/CommandLineTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

package processing.app;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import java.io.File;
import java.io.IOException;
Expand All @@ -39,7 +40,7 @@
import java.util.Arrays;

import org.apache.commons.compress.utils.IOUtils;
import org.fest.assertions.Assertions;
import org.assertj.core.api.Assertions;
import org.junit.BeforeClass;
import org.junit.Test;

Expand Down
5 changes: 3 additions & 2 deletions app/test/processing/app/DefaultTargetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@

package processing.app;

import static org.junit.Assert.assertFalse;

import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

import processing.app.debug.TargetBoard;
import static org.junit.Assert.assertNotEquals;

public class DefaultTargetTest extends AbstractWithPreferencesTest {

Expand Down Expand Up @@ -63,6 +64,6 @@ public void testDefaultTarget() throws Exception {
Assume.assumeNotNull(BaseNoGui.getTargetPlatform());

TargetBoard targetBoard = BaseNoGui.getTargetBoard();
assertNotEquals("unreal_board", targetBoard.getId());
assertFalse("unreal_board".equals(targetBoard.getId()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@

package processing.app;

import org.fest.swing.core.KeyPressInfo;
import org.fest.swing.core.matcher.DialogMatcher;
import org.fest.swing.finder.WindowFinder;
import org.fest.swing.fixture.DialogFixture;
import org.junit.Test;
import processing.app.helpers.SketchTextAreaFixture;
import static org.junit.Assert.assertEquals;
import static processing.app.I18n.tr;

import javax.swing.*;
import java.awt.event.KeyEvent;

import static org.junit.Assert.assertEquals;
import static processing.app.I18n.tr;
import org.assertj.swing.core.KeyPressInfo;
import org.assertj.swing.core.matcher.DialogMatcher;
import org.assertj.swing.fixture.DialogFixture;
import org.junit.Test;

import processing.app.helpers.SketchTextAreaFixture;

public class HittingEscapeOnCloseConfirmationDialogTest extends AbstractGUITest {

public class HittingEscapeOnCloseConfirmationDialogTest
extends AbstractGUITest {

@Test
public void shouldJustCloseTheDialog() throws Exception {
Expand All @@ -52,11 +53,10 @@ public void shouldJustCloseTheDialog() throws Exception {
window.close();

DialogMatcher matcher = DialogMatcher.withTitle(tr("Close")).andShowing();
DialogFixture dialog = WindowFinder.findDialog(matcher).using(window.robot);
DialogFixture dialog = window.findJDialog(matcher);
dialog.pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ESCAPE));

EditorConsole console = (EditorConsole) window.scrollPane("console").component();

EditorConsole console = window.getEditor().console;
assertEquals("", console.getText());
}
}
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy