import jalview.api.AlignmentViewPanel;
import jalview.api.ViewStyleI;
import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.HiddenSequences;
import jalview.gui.Jalview2XML;
import jalview.schemes.AnnotationColourGradient;
import jalview.schemes.ColourSchemeI;
+import jalview.structure.StructureImportSettings;
import jalview.viewmodel.AlignmentViewport;
import java.io.File;
@BeforeClass(alwaysRun = true)
public static void setUpBeforeClass() throws Exception
{
- jalview.bin.Jalview.main(new String[] { "-props",
- "test/jalview/io/testProps.jvprops" });
+ /*
+ * use read-only test properties file
+ */
+ Cache.loadProperties("test/jalview/io/testProps.jvprops");
+
+ /*
+ * set news feed last read to a future time to ensure no
+ * 'unread' news item is displayed
+ */
+ String oneHourFromNow = Cache.date_format
+ .format(System.currentTimeMillis() + 3600 * 1000);
+ Cache.setProperty("JALVIEW_NEWS_RSS_LASTMODIFIED", oneHourFromNow);
+
+ Jalview.main(new String[] {});
}
/**
@Test(groups = { "Functional" })
public void viewRefPdbAnnotation() throws Exception
{
- Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
- Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("ADD_SS_ANN",
- Boolean.TRUE.toString());
+ // TODO: Make this pass without setting StructureParser.JALVIEW_PARSER
+ // StructureImportSettings
+ // .setDefaultPDBFileParser(StructureParser.JALVIEW_PARSER);
+ StructureImportSettings.setProcessSecondaryStructure(true);
+ StructureImportSettings.setVisibleChainAnnotation(true);
AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
"examples/exampleFile_2_7.jar", FormatAdapter.FILE);
assertTrue("Didn't read in the example file correctly.", af != null);
@Test(groups = { "Functional" }, enabled = true)
public void testStoreAndRecoverExpandedviews() throws Exception
{
+ Desktop.instance.closeAll_actionPerformed(null);
+
AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
"examples/exampleFile_2_7.jar", FormatAdapter.FILE);
assertTrue("Didn't read in the example file correctly.", af != null);
+ Assert.assertEquals(Desktop.getAlignFrames().length, 1);
String afid = af.getViewport().getSequenceSetId();
- Desktop.explodeViews(Desktop.getAlignFrameFor(af.getViewport()));
+ // check FileLoader returned a reference to the one alignFrame that is
+ // actually on the Desktop
+ assertTrue(
+ "Jalview2XML.loadAlignFrame() didn't return correct AlignFrame reference for multiple view window",
+ af == Desktop.getAlignFrameFor(af.getViewport()));
+
+ Desktop.explodeViews(af);
int oldviews = Desktop.getAlignFrames().length;
Assert.assertEquals(Desktop.getAlignFrames().length,