Author: jpeterka
Date: 2012-03-15 15:06:28 -0400 (Thu, 15 Mar 2012)
New Revision: 39548
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/ConfigurationFile.launch
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.classpath
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.project
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.settings/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/bin/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/src/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/common/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/common/Tree.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ConfigurationFileSuite.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ConfigurationFileTest.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/HibernateBaseTest.java
Log:
configuration file test added
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/ConfigurationFile.launch
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/ConfigurationFile.launch
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/ConfigurationFile.launch 2012-03-15
19:06:28 UTC (rev 39548)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<launchConfiguration
type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation"
value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location"
value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry
value="/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ConfigurationFileSuite.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER"
value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR"
value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME"
value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND"
value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE"
value="org.jboss.tools.hb.ui.bot.suite.ConfigurationFileSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
-consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="org.jboss.tools.hibernate.ui.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"
value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS"
value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Xmx1024M
-XX:PermSize=128M -XX:MaxPermSize=256M -Dusage_reporting_enabled=false
-Dtest.configurations.dir=/home/jpeterka/etc/hb"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product"
value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig"
value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/ConfigurationFile.launch
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.classpath
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.classpath
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.classpath 2012-03-15
19:06:28 UTC (rev 39548)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.project
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.project
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.project 2012-03-15
19:06:28 UTC (rev 39548)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>configurationtest</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.settings/org.eclipse.jdt.core.prefs 2012-03-15
19:06:28 UTC (rev 39548)
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/configurationtest/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/common/Tree.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/common/Tree.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/common/Tree.java 2012-03-15
19:06:28 UTC (rev 39548)
@@ -0,0 +1,115 @@
+package org.jboss.tools.hb.ui.bot.common;
+
+import static org.junit.Assert.fail;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+
+/**
+ * Tree extension for bad trees
+ * @author jpeterka
+ *
+ */
+public class Tree {
+
+ private static Logger log = Logger.getLogger(Tree.class);
+
+ public static SWTBotTreeItem select(SWTBot bot, String... items) {
+ SWTBotTreeItem item = expand(bot, items);
+ item.select();
+ return item;
+ }
+
+ public static SWTBotTreeItem open(SWTBot bot, String... items) {
+ SWTBotTreeItem item = select(bot, items);
+ item.doubleClick();
+ return item;
+ }
+
+ public static SWTBotTreeItem expand(SWTBot bot, String... items) {
+ SWTBotTree tree = bot.tree();
+ SWTBotTreeItem nextItem = tree.getTreeItem(items[0]);
+ SWTBotTreeItem item = null;
+ final int sleep = 1000; // 1s
+ final int limit = 5; // 5 cycles max
+
+ for (int i = 0 ; i < items.length - 1; i++ ) {
+ item = nextItem;
+ expandNode(item);
+ boolean ok = findChild(item,items[i+1]);
+ // 1st cure - time
+ if (!ok) {
+ log.info("Nok: 1st round");
+ int counter = 0;
+ while (counter < limit) {
+ bot.sleep(sleep);
+ ok = findChild(item, items[i+1]);
+ if (!ok) {
+ counter++;
+ }
+ else break;
+ }
+ }
+ // 2nd cure (re-colapse/re-expansion)
+ if (!ok) {
+ log.info("Nok: 2nd round");
+ collapseNode(item);
+ expandNode(item);
+ ok = findChild(item,items[i+1]);
+ if (!ok) {
+ int counter = 0;
+ while (counter < limit) {
+ bot.sleep(sleep);
+ ok = findChild(item, items[i+1]);
+ if (!ok) {
+ counter++;
+ }
+ else break;
+ }
+ }
+ }
+ // 3dr round - final round
+ if (ok) {
+ nextItem = item.getNode(items[i+1]);
+ }
+ else fail("Unable to find node " + items[i+1]);
+ }
+ return nextItem;
+ }
+
+
+ private static void expandNode(SWTBotTreeItem item) {
+ item.expand();
+ if (!item.isExpanded()) {
+ fail("Unable to expand " + item.getText());
+ }
+ }
+
+
+ private static boolean findChild(SWTBotTreeItem item, String newTitle) {
+ boolean res = false;
+
+ // check nodes if they containt what is required
+ if (item.getNodes().contains(newTitle)) {
+ res = true;
+ log.info("Node " + item.getText() + " contains " + newTitle);
+ }
+ else
+ {
+ log.info("Unable to find subnode " + newTitle);
+ }
+ return res;
+
+ }
+
+ private static void collapseNode(SWTBotTreeItem item) {
+ if (item.isExpanded()) {
+ item.collapse();
+ }
+ if (item.isExpanded()) {
+ fail("Unable to collapse" + item.getText());
+ }
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/common/Tree.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ConfigurationFileSuite.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ConfigurationFileSuite.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ConfigurationFileSuite.java 2012-03-15
19:06:28 UTC (rev 39548)
@@ -0,0 +1,12 @@
+package org.jboss.tools.hb.ui.bot.suite;
+
+import org.jboss.tools.hb.ui.bot.test.ConfigurationFileTest;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(RequirementAwareSuite.class)
+(a)SuiteClasses({ConfigurationFileTest.class})
+public class ConfigurationFileSuite {
+
+}
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ConfigurationFileSuite.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ConfigurationFileTest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ConfigurationFileTest.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ConfigurationFileTest.java 2012-03-15
19:06:28 UTC (rev 39548)
@@ -0,0 +1,105 @@
+package org.jboss.tools.hb.ui.bot.test;
+
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
+
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.hamcrest.Matcher;
+import org.jboss.tools.hb.ui.bot.common.Tree;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.DatabaseHelper;
+import org.jboss.tools.ui.bot.ext.types.EntityType;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Hibernate configuration ui bot test
+ * @author jpeterka
+ *
+ */
+@Require
+public class ConfigurationFileTest extends HibernateBaseTest {
+
+ @BeforeClass
+ public static void beforeClass() {
+ eclipse.closeView(IDELabel.View.WELCOME);
+ eclipse.closeView(IDELabel.View.JBOSS_CENTRAL);
+ eclipse.closeAllEditors();
+ util.waitForAll();
+ }
+
+ @Test
+ public void emptyTest() {
+ assertTrue(true);
+ }
+
+ @Test
+ public void configurationFileTest() {
+ emptyErrorLog();
+ importTestProject("/resources/prj/hibernate35");
+ createHBConfiguration();
+ openHBConfiguration();
+ checkErrorLog();
+ }
+
+ private void createHBConfiguration() {
+ SWTBotView pv = open
+ .viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ Tree.select(pv.bot(), "hibernate35", "cfg");
+
+ eclipse.createNew(EntityType.HIBERNATE_CONFIGURATION_FILE);
+ bot.textWithLabel(IDELabel.HBConfigurationWizard.FILE_NAME).setText(
+ "hibernate.cfg.xml");
+ bot.button(IDELabel.Button.NEXT).click();
+
+ // Create new configuration file
+ String dialect = DatabaseHelper
+ .getDialect(TestConfigurator.currentConfig.getDB().dbType);
+ bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.DATABASE_DIALECT)
+ .setSelection(dialect);
+ String drvClass = DatabaseHelper
+ .getDriverClass(TestConfigurator.currentConfig.getDB().dbType);
+ bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.DRIVER_CLASS)
+ .setSelection(drvClass);
+ String jdbc = TestConfigurator.currentConfig.getDB().jdbcString;
+ bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.CONNECTION_URL).setText(
+ jdbc);
+
+ // Create console configuration
+ Matcher<Button> matcher = WidgetMatcherFactory
+ .withText(IDELabel.HBConsoleWizard.CREATE_CONSOLE_CONFIGURATION);
+ Button button = bot.widget(matcher);
+ SWTBotCheckBox cb = new SWTBotCheckBox(button);
+
+ if (!cb.isChecked())
+ cb.click();
+
+ SWTBotShell shell = bot.activeShell();
+ log.info("Active shell:" + shell.getText());
+ bot.button(IDELabel.Button.FINISH).click();
+
+ bot.waitUntil(shellCloses(shell));
+ }
+
+ private void openHBConfiguration() {
+
+ SWTBotView pv = open
+ .viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ Tree.select(pv.bot(), "hibernate35", "cfg",
"hibernate.cfg.xml");
+ bot.editorByTitle("hibernate.cfg.xml").show();
+
+ }
+
+ @AfterClass
+ public static void afterClass() {
+ // wait for all jobs
+ util.waitForAll();
+ }
+}
\ No newline at end of file
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ConfigurationFileTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/HibernateBaseTest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/HibernateBaseTest.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/HibernateBaseTest.java 2012-03-15
19:06:28 UTC (rev 39548)
@@ -0,0 +1,49 @@
+package org.jboss.tools.hb.ui.bot.test;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.jboss.tools.hibernate.ui.bot.testcase.Activator;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.helper.FileHelper;
+import org.jboss.tools.ui.bot.ext.helper.ImportHelper;
+import org.jboss.tools.ui.bot.ext.helper.ResourceHelper;
+import org.jboss.tools.ui.bot.ext.view.ErrorLogView;
+
+public class HibernateBaseTest extends SWTTestExt {
+
+ public void emptyErrorLog() {
+ ErrorLogView el = new ErrorLogView();
+ el.delete();
+ util.waitForNonIgnoredJobs();
+ }
+
+ public void checkErrorLog() {
+ ErrorLogView el = new ErrorLogView();
+ int count = el.getRecordCount();
+ if (count > 0) {
+ el.logMessages();
+ // Ignored for now
+ // fail("Unexpected messages in Error log, see test log");
+ }
+ }
+
+ public void importTestProject(String dir) {
+ String rpath = ResourceHelper.getResourceAbsolutePath(
+ Activator.PLUGIN_ID, dir);
+ String wpath = ResourceHelper.getWorkspaceAbsolutePath() + dir;
+ File rfile = new File(rpath);
+ File wfile = new File(wpath);
+
+ wfile.mkdirs();
+ try {
+ FileHelper.copyFilesBinaryRecursively(rfile, wfile, null);
+ } catch (IOException e) {
+ fail("Unable to copy test project");
+ }
+ ImportHelper.importAllProjects(wpath);
+ util.waitForNonIgnoredJobs();
+ }
+
+
+}
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/HibernateBaseTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Show replies by date