1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.wysiwyg.test.po

File WYSIWYGEditPage.java

 
testUploadImageAfterPreview: Timed out after 10 seconds waiting for org.xwiki.test.ui....
 

Coverage histogram

../../../../../img/srcFileCovDistChart8.png
54% of files have more coverage

Code metrics

0
8
5
1
81
30
5
0.62
1.6
5
1

Classes

Class Line # Actions
WYSIWYGEditPage 30 8 0% 5 3
0.769230876.9%
 

Contributing tests

This file is covered by 8 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.wysiwyg.test.po;
21   
22    import org.xwiki.test.ui.po.BaseElement;
23   
24    /**
25    * Represents the actions possible in WYSIWYG edit mode.
26    *
27    * @version $Id: a33f1891dc24efafba808f5441a912d4db756387 $
28    * @since 5.1RC1
29    */
 
30    public class WYSIWYGEditPage extends org.xwiki.test.ui.po.editor.WYSIWYGEditPage
31    {
32    /**
33    * The WYSIWYG content editor.
34    */
35    private final EditorElement editor = new EditorElement("content");
36   
37    /**
38    * Go to the passed page in WYSIWYG edit mode.
39    */
 
40  9 toggle public static WYSIWYGEditPage gotoPage(String space, String page)
41    {
42  9 BaseElement.getUtil().gotoPage(space, page, "edit", "editor=wysiwyg");
43  9 return new WYSIWYGEditPage();
44    }
45   
 
46  11 toggle @Override
47    public WYSIWYGEditPage waitUntilPageIsLoaded()
48    {
49  11 Test failure here return (WYSIWYGEditPage) super.waitUntilPageIsLoaded();
50    }
51   
52    /**
53    * @return the WYSIWYG content editor
54    */
 
55  11 toggle public EditorElement getContentEditor()
56    {
57  11 return editor;
58    }
59   
60    /**
61    * Triggers the insert attached image wizard. Sets the content of the editor (rich text area).
62    *
63    * @return the pane used to select an attached image to insert
64    */
 
65  0 toggle public AttachedImageSelectPane insertAttachedImage()
66    {
67  0 editor.getMenuBar().clickImageMenu();
68  0 return editor.getMenuBar().clickInsertAttachedImageMenu();
69    }
70   
71    /**
72    * Triggers the insert table wizard.
73    *
74    * @return the pane used to configure the table to insert
75    */
 
76  1 toggle public TableConfigPane insertTable()
77    {
78  1 editor.getMenuBar().clickTableMenu();
79  1 return editor.getMenuBar().clickInsertTableMenu();
80    }
81    }