Skip to content

Commit

Permalink
Use different workaround for empty window in tests under macosx
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Krause committed Nov 26, 2024
1 parent fab54a5 commit 5a33382
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="Hexatomic Target Platform Definition" sequenceNumber="1732642118">
<target name="Hexatomic Target Platform Definition" sequenceNumber="1732646415">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.justj.openjdk.hotspot.jre.full.stripped.feature.group" version="21.0.5.v20241023-1957"/>
<repository location="https://download.eclipse.org/justj/jres/21/updates/release/21.0.5"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.equinox.p2.core.feature.feature.group" version="1.7.300.v20240801-1024"/>
<unit id="org.eclipse.equinox.sdk.feature.group" version="3.23.1400.v20240820-0604"/>
<unit id="org.eclipse.sdk.feature.group" version="4.33.0.v20240903-0618"/>
<unit id="org.eclipse.zest.sdk.feature.group" version="3.21.0.202409021815"/>
<unit id="slf4j.api" version="2.0.16"/>
<unit id="org.eclipse.equinox.p2.core.feature.feature.group" version="1.7.200.v20240515-1919"/>
<unit id="org.eclipse.equinox.sdk.feature.group" version="3.23.1200.v20240524-2033"/>
<unit id="org.eclipse.sdk.feature.group" version="4.32.0.v20240601-0610"/>
<unit id="org.eclipse.zest.sdk.feature.group" version="3.20.0.202405290843"/>
<unit id="slf4j.api" version="2.0.13"/>
<unit id="org.apache.aries.spifly.dynamic.bundle" version="1.3.7"/>
<unit id="ch.qos.logback.classic" version="1.5.7"/>
<unit id="junit-jupiter-api" version="5.11.0"/>
<unit id="org.hamcrest" version="3.0.0"/>
<unit id="ch.qos.logback.classic" version="1.5.6"/>
<unit id="junit-jupiter-api" version="5.10.2"/>
<unit id="org.hamcrest" version="2.2.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<unit id="jakarta.servlet-api" version="6.1.0"/>
<unit id="jakarta.servlet-api" version="6.0.0"/>
<unit id="jakarta.inject.jakarta.inject-api" version="2.0.1"/>
<unit id="jakarta.annotation-api" version="2.1.1"/>
<unit id="com.google.guava" version="33.3.0.jre"/>
<unit id="org.apache.commons.lang3" version="3.16.0"/>
<repository location="https://download.eclipse.org/releases/2024-09/"/>
<unit id="com.google.guava" version="33.2.0.jre"/>
<unit id="org.apache.commons.lang3" version="3.14.0"/>
<repository location="https://download.eclipse.org/releases/2024-06/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.mockito.mockito-core" version="5.12.0"/>
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2024-09"/>
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2024-06"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.nebula.widgets.nattable.core" version="2.4.0.202405230453"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ location "https://download.eclipse.org/justj/jres/21/updates/release/21.0.5" {
org.eclipse.justj.openjdk.hotspot.jre.full.stripped.feature.group
}

location "https://download.eclipse.org/releases/2024-09/" {
location "https://download.eclipse.org/releases/2024-06/" {
// Eclipse platform
org.eclipse.equinox.p2.core.feature.feature.group
org.eclipse.equinox.sdk.feature.group
Expand All @@ -28,7 +28,7 @@ location "https://download.eclipse.org/releases/2024-09/" {
}


location "https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2024-09" {
location "https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2024-06" {
org.mockito.mockito-core
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ SWTBotView openEditorForDefaultDocument() {

SWTBotView corpusStructurePart = bot.partByTitle(CORPUS_STRUCTURE);

corpusStructurePart.bot().tree().setFocus();
if (SystemUtils.IS_OS_MAC_OSX) {
// HACK: sometimes the window content freezes when there is no activity like a mouse movement
// or window resize.
bot.activeShell().maximize(true);
bot.activeShell().maximize(false);
}

// Select the first example document
SWTBotTreeItem docMenu = corpusStructurePart.bot().tree().expandNode(CORPUS_GRAPH1)
Expand All @@ -245,23 +250,10 @@ SWTBotView openEditorForDefaultDocument() {
SWTBotView view = bot.partByTitle("doc2 (Grid Editor)");
assertNotNull(view);

SWTNatTableBot tableBot = new SWTNatTableBot();
tableBot.waitUntil(new DefaultCondition() {
@Override

public boolean test() throws Exception {
return tableBot.nattable().rowCount() > 1;
}

@Override
public String getFailureMessage() {
return "Rows for default example did not populate";
}
});

// Use all available windows space (the tableToTest needs to be fully visible
// for some of the tests)
bot.waitUntil(new PartActiveCondition(view.getPart()));

view.maximise();
bot.waitUntil(new PartMaximizedCondition(view.getPart()));

Expand Down Expand Up @@ -1721,7 +1713,7 @@ void testSingleNeighbouringSelectionBlockNameChange() {
SWTBotNatTable table = tableBot.nattable();

// Baseline
assertEquals(5, table.columnCount());
tableBot.waitUntil(new ColumnCountCondition(table, 5));

table.click(1, 2);
ctrlClick(tableBot, 1, 3);
Expand Down Expand Up @@ -1756,7 +1748,7 @@ void testNeighbouringInMultiSelectionBlockNameChange() {
SWTBotNatTable table = tableBot.nattable();

// Baseline
assertEquals(5, table.columnCount());
tableBot.waitUntil(new ColumnCountCondition(table, 5));

// Rename
table.click(1, 2);
Expand Down Expand Up @@ -1806,7 +1798,7 @@ void testColumnsRetained() {
SWTBotNatTable table = tableBot.nattable();

// Baseline
assertEquals(5, table.columnCount());
tableBot.waitUntil(new ColumnCountCondition(table, 5));

// Select second token annotation column (salt::pos)
table.click(0, 3);
Expand Down

0 comments on commit 5a33382

Please sign in to comment.