<commit_before>/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.test.wysiwyg;

import junit.framework.Test;
import junit.framework.TestCase;

import org.xwiki.test.XWikiTestSetup;

import org.xwiki.test.selenium.CacheTest;
import org.xwiki.test.selenium.framework.AbstractXWikiTestCase;
import org.xwiki.test.selenium.framework.ColibriSkinExecutor;
import org.xwiki.test.wysiwyg.framework.WysiwygTestSetup;
import org.xwiki.test.wysiwyg.framework.WysiwygTestSuite;
import org.xwiki.test.selenium.framework.XWikiSeleniumTestSetup;

/**
 * A class listing all the Selenium Functional tests to execute. We need such a class (rather than letting the JUnit
 * Runner discover the different TestCases classes by itself) because we want to start/stop XWiki before and after the
 * tests start (but only once).
 * 
 * @version $Id$
 */
public class AllTests extends TestCase
{
    private static final String PATTERN = ".*" + System.getProperty("pattern", "");

    public static Test suite() throws Exception
    {
        // create a wysiwyg test suite for all the wysiwyg tests to be executed with the Colibri skin executor
        // FIXME: the skin executor setting should be in a ColibriTestSetup, so that the provider for skin functions is
        // injected at setup time, and can be changed by changing the decorator
        WysiwygTestSuite suite = new WysiwygTestSuite("WYSIWYG Selenium Tests", ColibriSkinExecutor.class);

        addTestCase(suite, SubmitTest.class);
        addTestCase(suite, StandardFeaturesTest.class);
        addTestCase(suite, HistoryTest.class);
        addTestCase(suite, LineTest.class);
        addTestCase(suite, TableTest.class);
        addTestCase(suite, LinkTest.class);
        addTestCase(suite, ListTest.class);
        addTestCase(suite, MacroTest.class);
        addTestCase(suite, ImageTest.class);
        addTestCase(suite, TabsTest.class);
        addTestCase(suite, NativeJavaScriptApiTest.class);
        addTestCase(suite, ColorTest.class);
        addTestCase(suite, AlignmentTest.class);
        addTestCase(suite, RemoveFormattingTest.class);
        addTestCase(suite, FontTest.class);
        addTestCase(suite, CacheTest.class);
        addTestCase(suite, RegularUserTest.class);
        addTestCase(suite, org.xwiki.test.selenium.ImportTest.class);
        addTestCase(suite, EmbedTest.class);
        addTestCase(suite, EditInlineTest.class);

        return new XWikiSeleniumTestSetup(new XWikiTestSetup(new WysiwygTestSetup(suite)));
    }

    private static void addTestCase(WysiwygTestSuite suite, Class< ? extends AbstractXWikiTestCase> testClass)
        throws Exception
    {
        if (testClass.getName().matches(PATTERN)) {
            suite.addTestSuite(testClass);
        }
    }
}
<commit_msg>[misc] Fix import after package rename.<commit_after>/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.test.wysiwyg;

import junit.framework.Test;
import junit.framework.TestCase;

import org.xwiki.test.XWikiTestSetup;
import org.xwiki.test.selenium.framework.AbstractXWikiTestCase;
import org.xwiki.test.selenium.framework.ColibriSkinExecutor;
import org.xwiki.test.selenium.framework.XWikiSeleniumTestSetup;
import org.xwiki.test.wysiwyg.framework.WysiwygTestSetup;
import org.xwiki.test.wysiwyg.framework.WysiwygTestSuite;

/**
 * A class listing all the Selenium Functional tests to execute. We need such a class (rather than letting the JUnit
 * Runner discover the different TestCases classes by itself) because we want to start/stop XWiki before and after the
 * tests start (but only once).
 * 
 * @version $Id$
 */
public class AllTests extends TestCase
{
    private static final String PATTERN = ".*" + System.getProperty("pattern", "");

    public static Test suite() throws Exception
    {
        // create a wysiwyg test suite for all the wysiwyg tests to be executed with the Colibri skin executor
        // FIXME: the skin executor setting should be in a ColibriTestSetup, so that the provider for skin functions is
        // injected at setup time, and can be changed by changing the decorator
        WysiwygTestSuite suite = new WysiwygTestSuite("WYSIWYG Selenium Tests", ColibriSkinExecutor.class);

        addTestCase(suite, SubmitTest.class);
        addTestCase(suite, StandardFeaturesTest.class);
        addTestCase(suite, HistoryTest.class);
        addTestCase(suite, LineTest.class);
        addTestCase(suite, TableTest.class);
        addTestCase(suite, LinkTest.class);
        addTestCase(suite, ListTest.class);
        addTestCase(suite, MacroTest.class);
        addTestCase(suite, ImageTest.class);
        addTestCase(suite, TabsTest.class);
        addTestCase(suite, NativeJavaScriptApiTest.class);
        addTestCase(suite, ColorTest.class);
        addTestCase(suite, AlignmentTest.class);
        addTestCase(suite, RemoveFormattingTest.class);
        addTestCase(suite, FontTest.class);
        addTestCase(suite, CacheTest.class);
        addTestCase(suite, RegularUserTest.class);
        addTestCase(suite, ImportTest.class);
        addTestCase(suite, EmbedTest.class);
        addTestCase(suite, EditInlineTest.class);

        return new XWikiSeleniumTestSetup(new XWikiTestSetup(new WysiwygTestSetup(suite)));
    }

    private static void addTestCase(WysiwygTestSuite suite, Class< ? extends AbstractXWikiTestCase> testClass)
        throws Exception
    {
        if (testClass.getName().matches(PATTERN)) {
            suite.addTestSuite(testClass);
        }
    }
}

{'fraction_non_alphanumeric': 0.08057593797591028, 'fraction_numerical': 0.003599612349439291, 'mean_word_length': 3.7277486910994764, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '422228', 'n_tokens_mistral': 2014, 'n_tokens_neox': 1964, 'n_words': 667}