@Test public void displayedDetailsWhenNotHoveringAnymoreOnTheNodeAndNotHoveringOnOtherNodesTest() { UIUtils.hoverAnElement(nonLeafNode); UIUtils.hoverAnElement("flask"); WebElement details = Settings.driver.findElement(By.id("details")); String expected = "A+C+D\npos: 39\nIDs: from ID4 to ID5\nscd: 0E0g of H2O 1E-7M of H+ 1E-7M of OH- 1E0M of D\ndcd: 0E0g of H2O 1E-7M of H+ 1E-7M of OH- 4.84E-1M of A 1.6E-25M of B 1.61E-1M of C 1.94E-1M of D\nrcd: 0E0g of H2O 1E-7M of H+ 1E-7M of OH- 3.75E-1M of A 1.29E-25M of B 1.25E-1M of C 3.75E-1M of D\nvol: 400.0\naction: mix"; assertEquals(expected, details.getText()); }
private void drawPage(Graphics2D g2d, int x, int y, int pageIndex, Page page) { x += (pageIndex % pagesInRow) * pageWidth; y += (pageIndex / pagesInRow) * pageHeight; Color color = page.getBGColor(); String title = page.getTitle(); TexturePaint tp = page.getPageTexture(color); g2d.setColor(color); g2d.setPaint(tp); g2d.fillRect(x, y, pageWidth, pageHeight); if (!page.isValid() && !page.isClean()) { UIUtils.drawInvalidPage(g2d, x, y, pageWidth, pageHeight); } g2d.setColor(Consts.Colors.PAGE_TEXT); g2d.drawRect(x, y, pageWidth, pageHeight); g2d.drawString(title, x + 1, y + 10); }