Browse Source
* commit 'df608de63cedaca4d738064fc37e5ba3f2a4ac22': 无jira任务, 冲突 fix REPORT-25417 智能添加单元格点击不准确 1.8编译单元测试代码失败 REPORT-24604 表单拖动图表与画布块交叉设计器卡死 fix import REPORT-24206_设计器_修改边框颜色单元格背景颜色会变统一 REPORT-21556 导入excel不显示数据 REPORT-24787 决策报表修改数据集名称,单元格不会跟随修改 REPORT-24294 安装10设计器启动之后,操作异常缓慢 REPORT-24787 决策报表修改数据集名称,单元格不会跟随修改 REPORT-24117 这部分代码回退,当时的bug REPORT-21202修改FormSelection就可以避免tab的复制 REPORT-24957 frm打不开 REPORT-24997 升级12.08jar包以后决策报表中插入的地图设置有问题 MOBILE-24561 通过箭头按钮触发下拉框,进行修改,会导致保存失败 增加单元测试 REPORT-24997 升级12.08jar包以后决策报表中插入的地图设置有问题 创建socket增加失败重试 REPORT-24270 设计器 双击单元格字段出现的数据列框中的左父格自定义后没法修改为默认 REPORT-24098 稳定共创:设计器一打开模板就触发保存操作,未做任何修改feature/big-screen
neil
5 years ago
24 changed files with 382 additions and 187 deletions
@ -0,0 +1,39 @@
|
||||
package com.fr.design.designer.beans.adapters.layout; |
||||
|
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.designer.creator.XLayoutContainer; |
||||
|
||||
/** |
||||
* 针对tabpane的布局适配器 |
||||
* Created by kerry on 2019-12-10 |
||||
*/ |
||||
public class FRWCardTagLayoutAdapter extends AbstractLayoutAdapter { |
||||
public FRWCardTagLayoutAdapter(XLayoutContainer container) { |
||||
super(container); |
||||
} |
||||
|
||||
/** |
||||
* 对于这种布局方式,不允许其他组件添加 |
||||
* |
||||
* @param creator |
||||
* @param x |
||||
* @param y |
||||
*/ |
||||
@Override |
||||
protected void addComp(XCreator creator, int x, int y) { |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 对于这种布局方式,不允许其他组件添加 |
||||
* |
||||
* @param creator 组件 |
||||
* @param x 添加的位置x,该位置是相对于container的 |
||||
* @param y 添加的位置y,该位置是相对于container的 |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public boolean accept(XCreator creator, int x, int y) { |
||||
return false; |
||||
} |
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.fr.design.designer.beans.adapters.layout; |
||||
|
||||
import com.fr.design.designer.creator.XElementCase; |
||||
import com.fr.design.designer.creator.cardlayout.XWCardTagLayout; |
||||
import com.fr.form.ui.ElementCaseEditor; |
||||
import com.fr.form.ui.container.cardlayout.WCardTagLayout; |
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
import java.awt.Dimension; |
||||
|
||||
/** |
||||
* Created by kerry on 2019-12-10 |
||||
*/ |
||||
public class FRWCardTagLayoutAdapterTest { |
||||
@Test |
||||
public void testAccept() { |
||||
FRWCardTagLayoutAdapter adapter = new FRWCardTagLayoutAdapter( |
||||
new XWCardTagLayout(new WCardTagLayout(), new Dimension(100, 100))); |
||||
Assert.assertFalse(adapter.accept(new XElementCase( |
||||
new ElementCaseEditor(), new Dimension(100, 100)), 1, 1)); |
||||
} |
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.fr.design.designer.creator.cardlayout; |
||||
|
||||
import com.fr.form.ui.container.cardlayout.WCardTagLayout; |
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
import java.awt.Dimension; |
||||
|
||||
/** |
||||
* Created by kerry on 2019-12-10 |
||||
*/ |
||||
public class XWCardTagLayoutTest { |
||||
@Test |
||||
public void testGetLayoutAdapter() { |
||||
XWCardTagLayout tagLayout = new XWCardTagLayout(new WCardTagLayout(), new Dimension(100, 100)); |
||||
Assert.assertEquals("com.fr.design.designer.beans.adapters.layout.FRWCardTagLayoutAdapter", tagLayout.getLayoutAdapter().getClass().getName()); |
||||
} |
||||
} |
@ -0,0 +1,60 @@
|
||||
package com.fr.design.mainframe.socketio; |
||||
|
||||
import com.fr.invoke.Reflect; |
||||
import com.fr.workspace.WorkContext; |
||||
import com.fr.workspace.Workspace; |
||||
import io.socket.client.IO; |
||||
import io.socket.client.Socket; |
||||
|
||||
import org.easymock.EasyMock; |
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.powermock.api.easymock.PowerMock; |
||||
import org.powermock.core.classloader.annotations.PrepareForTest; |
||||
import org.powermock.modules.junit4.PowerMockRunner; |
||||
|
||||
|
||||
/** |
||||
* @author: Maksim |
||||
* @Date: Created in 2019/12/9 |
||||
* @Description: |
||||
*/ |
||||
@RunWith(PowerMockRunner.class) |
||||
@PrepareForTest({WorkContext.class,DesignerSocketIO.class, IO.class}) |
||||
public class DesignerSocketIOTest { |
||||
|
||||
@Test |
||||
public void close() throws Exception { |
||||
this.update(); |
||||
DesignerSocketIO.close(); |
||||
DesignerSocketIO.Status status = Reflect.on(DesignerSocketIO.class).field("status").get(); |
||||
Socket socket = Reflect.on(DesignerSocketIO.class).field("socket").get(); |
||||
|
||||
Assert.assertEquals(DesignerSocketIO.Status.Disconnecting,status); |
||||
Assert.assertNull(socket); |
||||
} |
||||
|
||||
@Test |
||||
public void update() throws Exception { |
||||
Workspace current = EasyMock.mock(Workspace.class); |
||||
EasyMock.expect(current.isLocal()).andReturn(false); |
||||
|
||||
PowerMock.mockStatic(WorkContext.class); |
||||
EasyMock.expect(WorkContext.getCurrent()).andReturn(current); |
||||
|
||||
String[] uri = {"http://127.0.0.1:8888/workspace","http://127.0.0.1:9999/workspace"}; |
||||
PowerMock.mockStaticPartial(DesignerSocketIO.class,"getSocketUri"); |
||||
PowerMock.expectPrivate(DesignerSocketIO.class,"getSocketUri").andReturn(uri); |
||||
|
||||
EasyMock.replay(current); |
||||
PowerMock.replayAll(); |
||||
|
||||
DesignerSocketIO.update(); |
||||
DesignerSocketIO.Status status = Reflect.on(DesignerSocketIO.class).field("status").get(); |
||||
Socket socket = Reflect.on(DesignerSocketIO.class).field("socket").get(); |
||||
|
||||
Assert.assertEquals(DesignerSocketIO.Status.Connected,status); |
||||
Assert.assertNotNull(socket); |
||||
} |
||||
} |
Loading…
Reference in new issue