Java Code Examples for org.eclipse.swtbot.swt.finder.widgets.SWTBotTable#header()
The following examples show how to use
org.eclipse.swtbot.swt.finder.widgets.SWTBotTable#header() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ColumnHeaderMenuTest.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
/** * Test the Show All menu item */ @Test public void testPersistHiding() { SWTBotTable tableBot = fEditorBot.bot().table(); SWTBotTableColumn headerBot = tableBot.header(""); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger", "File", "Line", "Message" }); headerBot.contextMenu("Timestamp").click(); headerBot.contextMenu("Host").click(); headerBot.contextMenu("Logger").click(); headerBot.contextMenu("File").click(); headerBot.contextMenu("Message").click(); assertVisibleColumns(tableBot.widget, new String[] { "Line" }); after(); before(); tableBot = fEditorBot.bot().table(); assertVisibleColumns(tableBot.widget, new String[] { "Line" }); headerBot = tableBot.header(""); headerBot.contextMenu("Show All").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger", "File", "Line", "Message" }); }
Example 2
Source File: ColumnHeaderMenuTest.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
/** * Test the Show All menu item */ @Test public void testShowAll() { final SWTBotTable tableBot = fEditorBot.bot().table(); SWTBotTableColumn headerBot = tableBot.header(""); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger", "File", "Line", "Message" }); headerBot.contextMenu("Timestamp").click(); headerBot.contextMenu("Host").click(); headerBot.contextMenu("Logger").click(); headerBot.contextMenu("File").click(); headerBot.contextMenu("Line").click(); headerBot.contextMenu("Message").click(); assertVisibleColumns(tableBot.widget, new String[] {}); headerBot.contextMenu("Show All").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger", "File", "Line", "Message" }); }
Example 3
Source File: ColumnHeaderMenuTest.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
/** * Test the check menu items to toggle column visibility */ @Test public void testToggleColumns() { final SWTBotTable tableBot = fEditorBot.bot().table(); SWTBotTableColumn headerBot = tableBot.header(""); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger", "File", "Line", "Message" }); headerBot.contextMenu("Message").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger", "File", "Line" }); headerBot.contextMenu("Line").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger", "File" }); headerBot.contextMenu("File").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger" }); headerBot.contextMenu("Logger").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host" }); headerBot.contextMenu("Host").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp" }); headerBot.contextMenu("Timestamp").click(); assertVisibleColumns(tableBot.widget, new String[] {}); headerBot.contextMenu("Message").click(); assertVisibleColumns(tableBot.widget, new String[] { "Message" }); headerBot.contextMenu("Timestamp").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Message" }); headerBot.contextMenu("Line").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Line", "Message" }); headerBot.contextMenu("Host").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Line", "Message" }); headerBot.contextMenu("File").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "File", "Line", "Message" }); headerBot.contextMenu("Logger").click(); assertVisibleColumns(tableBot.widget, new String[] { "Timestamp", "Host", "Logger", "File", "Line", "Message" }); }