From 920e4f3a77b07782b0449261a54f688077c1b987 Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Tue, 21 Oct 2014 12:47:25 +1000 Subject: [PATCH] Fix and add tests missing from the test plan Some tests have not been run, as they were missing from the plan. Adds them and fixes the ones that broke during. Add category to some tests. Remove unused imports. Add license headers. --- .../zanata/page/glossary/GlossaryPage.java | 23 ++++++++++++-- .../test/java/org/zanata/feature/Feature.java | 20 ++++++++++++ .../account/InvalidEmailAddressTest.java | 2 -- .../GettextPluralSupportTest.java | 20 ++++++++++++ .../clientserver/ProjectMaintainerTest.java | 20 ++++++++++++ .../clientserver/PropertiesRoundTripTest.java | 20 ++++++++++++ .../concurrentedit/ConcurrentAccessTest.java | 20 ++++++++++++ .../concurrentedit/ConcurrentEditTest.java | 20 ++++++++++++ .../feature/document/DocTypeUploadTest.java | 5 ++- .../document/HTMLDocumentTypeTest.java | 2 -- .../feature/document/MultiFileUploadTest.java | 2 -- .../document/SubtitleDocumentTypeTest.java | 6 ---- .../zanata/feature/document/UploadTest.java | 2 -- .../editor/EditorFilterMessagesTest.java | 27 ++++++++++++++-- .../feature/editor/TranslateHTMLTest.java | 1 - .../feature/editor/TranslateIdmlTest.java | 1 - .../editor/TranslateOpenOfficeTest.java | 1 - .../feature/editor/TranslateTextTest.java | 1 - .../editor/TranslationHistoryTest.java | 3 ++ .../feature/glossary/GlossaryAdminTest.java | 11 ++++--- .../feature/glossary/GlossaryDeleteTest.java | 1 - .../feature/glossary/GlossaryPushTest.java | 1 - .../language/ContactLanguageTeamTest.java | 4 +-- .../zanata/feature/misc/ContactAdminTest.java | 22 +++++++++++-- .../zanata/feature/misc/ObsoleteTextTest.java | 20 ++++++++++++ .../feature/misc/RateLimitRestAndUITest.java | 20 ++++++++++++ .../EditVersionValidationsTest.java | 1 - .../projectversion/VersionFilteringTest.java | 3 ++ .../zanata/feature/rest/CopyTransTest.java | 20 ++++++++++++ .../zanata/feature/security/SecurityTest.java | 2 -- .../testharness/DetailedTestSuite.java | 20 ++++++++++++ .../zanata/feature/testharness/TestPlan.java | 31 ++++++++++++++++++- .../java/org/zanata/util/AddUsersRule.java | 20 ++++++++++++ .../org/zanata/util/CleanDatabaseRule.java | 20 ++++++++++++ .../zanata/util/CleanDocumentStorageRule.java | 21 ++++++++++++- .../org/zanata/util/EnsureLogoutRule.java | 20 ++++++++++++ .../zanata/util/FeatureInventoryRecorder.java | 20 ++++++++++++ .../java/org/zanata/util/HasEmailRule.java | 20 ++++++++++++ .../java/org/zanata/util/NoScreenshot.java | 20 ++++++++++++ .../zanata/util/SampleDataResourceClient.java | 22 +++++++++++-- .../org/zanata/util/SampleProjectRule.java | 4 --- .../ScreenshotEnabledTestRunListener.java | 20 ++++++++++++ .../org/zanata/util/ZanataRestCaller.java | 21 ++++++++++++- 43 files changed, 511 insertions(+), 49 deletions(-) diff --git a/functional-test/src/main/java/org/zanata/page/glossary/GlossaryPage.java b/functional-test/src/main/java/org/zanata/page/glossary/GlossaryPage.java index e3cc93eb1e..a1ad54d61e 100644 --- a/functional-test/src/main/java/org/zanata/page/glossary/GlossaryPage.java +++ b/functional-test/src/main/java/org/zanata/page/glossary/GlossaryPage.java @@ -20,12 +20,14 @@ */ package org.zanata.page.glossary; +import java.util.ArrayList; import java.util.List; import lombok.extern.slf4j.Slf4j; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; import org.zanata.page.BasePage; import org.zanata.util.WebElementUtil; @@ -45,17 +47,34 @@ public GlossaryPage(WebDriver driver) { public List getAvailableGlossaryLanguages() { log.info("Query available glossary languages"); return WebElementUtil.getColumnContents(getDriver(), glossaryTable, 0); +/* List availableLanguages = new ArrayList<>(); + for (WebElement element : getListItems()) { + availableLanguages.add(element + .findElement(By.className("list__title")).getText().trim()); + } + return availableLanguages; +*/ } public int getGlossaryEntryCount(String lang) { log.info("Query number of glossary entries for {}", lang); - List langs = getAvailableGlossaryLanguages(); - int row = langs.indexOf(lang); + List langs = getListItems(); + int row = getAvailableGlossaryLanguages().indexOf(lang); if (row >= 0) { return Integer .parseInt(WebElementUtil.getColumnContents(getDriver(), glossaryTable, 2).get(row)); +/* return Integer.parseInt(langs.get(row) + .findElement(By.className("stats__figure")).getText()); +*/ } return -1; } + + private List getListItems() { + return getDriver() + .findElement(By.id("glossary_form")) + .findElement(By.className("list--stats")) + .findElements(By.className("list__item--actionable")); + } } diff --git a/functional-test/src/test/java/org/zanata/feature/Feature.java b/functional-test/src/test/java/org/zanata/feature/Feature.java index 942dbd6753..1df39534e5 100644 --- a/functional-test/src/test/java/org/zanata/feature/Feature.java +++ b/functional-test/src/test/java/org/zanata/feature/Feature.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature; import java.lang.annotation.ElementType; diff --git a/functional-test/src/test/java/org/zanata/feature/account/InvalidEmailAddressTest.java b/functional-test/src/test/java/org/zanata/feature/account/InvalidEmailAddressTest.java index 7516866528..a7ca65e745 100644 --- a/functional-test/src/test/java/org/zanata/feature/account/InvalidEmailAddressTest.java +++ b/functional-test/src/test/java/org/zanata/feature/account/InvalidEmailAddressTest.java @@ -22,7 +22,6 @@ import lombok.extern.slf4j.Slf4j; -import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Rule; import org.junit.experimental.categories.Category; @@ -35,7 +34,6 @@ import org.zanata.feature.testharness.ZanataTestCase; import org.zanata.feature.testharness.TestPlan.DetailedTest; import org.zanata.page.account.RegisterPage; -import org.zanata.page.utility.HomePage; import org.zanata.util.EnsureLogoutRule; import org.zanata.util.rfc2822.InvalidEmailAddressRFC2822; import org.zanata.workflow.BasicWorkFlow; diff --git a/functional-test/src/test/java/org/zanata/feature/clientserver/GettextPluralSupportTest.java b/functional-test/src/test/java/org/zanata/feature/clientserver/GettextPluralSupportTest.java index e7405e67bb..df52a0ebe5 100644 --- a/functional-test/src/test/java/org/zanata/feature/clientserver/GettextPluralSupportTest.java +++ b/functional-test/src/test/java/org/zanata/feature/clientserver/GettextPluralSupportTest.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.clientserver; import java.io.File; diff --git a/functional-test/src/test/java/org/zanata/feature/clientserver/ProjectMaintainerTest.java b/functional-test/src/test/java/org/zanata/feature/clientserver/ProjectMaintainerTest.java index 02d1c92173..1474011239 100644 --- a/functional-test/src/test/java/org/zanata/feature/clientserver/ProjectMaintainerTest.java +++ b/functional-test/src/test/java/org/zanata/feature/clientserver/ProjectMaintainerTest.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.clientserver; import com.google.common.base.Joiner; diff --git a/functional-test/src/test/java/org/zanata/feature/clientserver/PropertiesRoundTripTest.java b/functional-test/src/test/java/org/zanata/feature/clientserver/PropertiesRoundTripTest.java index 58fb5d6297..dfb021a47f 100644 --- a/functional-test/src/test/java/org/zanata/feature/clientserver/PropertiesRoundTripTest.java +++ b/functional-test/src/test/java/org/zanata/feature/clientserver/PropertiesRoundTripTest.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.clientserver; import java.io.File; diff --git a/functional-test/src/test/java/org/zanata/feature/concurrentedit/ConcurrentAccessTest.java b/functional-test/src/test/java/org/zanata/feature/concurrentedit/ConcurrentAccessTest.java index 21d1e33b5b..a589e9c89f 100644 --- a/functional-test/src/test/java/org/zanata/feature/concurrentedit/ConcurrentAccessTest.java +++ b/functional-test/src/test/java/org/zanata/feature/concurrentedit/ConcurrentAccessTest.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.concurrentedit; import java.util.Collections; diff --git a/functional-test/src/test/java/org/zanata/feature/concurrentedit/ConcurrentEditTest.java b/functional-test/src/test/java/org/zanata/feature/concurrentedit/ConcurrentEditTest.java index 6c8b134664..0c828af724 100644 --- a/functional-test/src/test/java/org/zanata/feature/concurrentedit/ConcurrentEditTest.java +++ b/functional-test/src/test/java/org/zanata/feature/concurrentedit/ConcurrentEditTest.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.concurrentedit; import org.junit.Before; diff --git a/functional-test/src/test/java/org/zanata/feature/document/DocTypeUploadTest.java b/functional-test/src/test/java/org/zanata/feature/document/DocTypeUploadTest.java index 915eb81702..555f24aca2 100644 --- a/functional-test/src/test/java/org/zanata/feature/document/DocTypeUploadTest.java +++ b/functional-test/src/test/java/org/zanata/feature/document/DocTypeUploadTest.java @@ -23,17 +23,15 @@ import lombok.extern.slf4j.Slf4j; import org.junit.BeforeClass; import org.junit.ClassRule; -import org.junit.Rule; import org.junit.experimental.categories.Category; import org.junit.experimental.theories.DataPoint; import org.junit.experimental.theories.Theories; import org.junit.experimental.theories.Theory; import org.junit.runner.RunWith; import org.zanata.feature.testharness.TestPlan.BasicAcceptanceTest; +import org.zanata.feature.testharness.TestPlan.DetailedTest; import org.zanata.feature.testharness.ZanataTestCase; import org.zanata.page.projectversion.VersionDocumentsPage; -import org.zanata.page.projectversion.VersionLanguagesPage; -import org.zanata.page.projectversion.versionsettings.VersionDocumentsTab; import org.zanata.page.webtrans.EditorPage; import org.zanata.util.CleanDocumentStorageRule; import org.zanata.util.SampleProjectRule; @@ -51,6 +49,7 @@ */ @Slf4j @RunWith(Theories.class) +@Category(DetailedTest.class) public class DocTypeUploadTest extends ZanataTestCase { @ClassRule diff --git a/functional-test/src/test/java/org/zanata/feature/document/HTMLDocumentTypeTest.java b/functional-test/src/test/java/org/zanata/feature/document/HTMLDocumentTypeTest.java index 5c82671150..e6f3abb8af 100644 --- a/functional-test/src/test/java/org/zanata/feature/document/HTMLDocumentTypeTest.java +++ b/functional-test/src/test/java/org/zanata/feature/document/HTMLDocumentTypeTest.java @@ -22,10 +22,8 @@ import java.io.File; -import org.junit.Before; import org.junit.BeforeClass; import org.junit.ClassRule; -import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; import org.zanata.feature.Feature; diff --git a/functional-test/src/test/java/org/zanata/feature/document/MultiFileUploadTest.java b/functional-test/src/test/java/org/zanata/feature/document/MultiFileUploadTest.java index 64a33f45dc..d3c7a94471 100644 --- a/functional-test/src/test/java/org/zanata/feature/document/MultiFileUploadTest.java +++ b/functional-test/src/test/java/org/zanata/feature/document/MultiFileUploadTest.java @@ -24,8 +24,6 @@ import lombok.extern.slf4j.Slf4j; import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; diff --git a/functional-test/src/test/java/org/zanata/feature/document/SubtitleDocumentTypeTest.java b/functional-test/src/test/java/org/zanata/feature/document/SubtitleDocumentTypeTest.java index d4268939e9..44d54c7368 100644 --- a/functional-test/src/test/java/org/zanata/feature/document/SubtitleDocumentTypeTest.java +++ b/functional-test/src/test/java/org/zanata/feature/document/SubtitleDocumentTypeTest.java @@ -21,7 +21,6 @@ package org.zanata.feature.document; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; @@ -29,21 +28,16 @@ import org.zanata.feature.testharness.TestPlan.DetailedTest; import org.zanata.feature.testharness.ZanataTestCase; import org.zanata.page.projectversion.VersionDocumentsPage; -import org.zanata.page.projectversion.VersionLanguagesPage; -import org.zanata.page.projectversion.versionsettings.VersionDocumentsTab; import org.zanata.page.webtrans.EditorPage; import org.zanata.util.CleanDocumentStorageRule; import org.zanata.util.SampleProjectRule; import org.zanata.util.TestFileGenerator; import org.zanata.util.ZanataRestCaller; -import org.zanata.workflow.BasicWorkFlow; import org.zanata.workflow.LoginWorkFlow; -import org.zanata.workflow.ProjectWorkFlow; import java.io.File; import static org.assertj.core.api.Assertions.assertThat; -import static org.zanata.util.FunctionalTestHelper.assumeTrue; /** * Covers more detailed testing of the subtitle formats diff --git a/functional-test/src/test/java/org/zanata/feature/document/UploadTest.java b/functional-test/src/test/java/org/zanata/feature/document/UploadTest.java index d204902fbe..57a876f962 100644 --- a/functional-test/src/test/java/org/zanata/feature/document/UploadTest.java +++ b/functional-test/src/test/java/org/zanata/feature/document/UploadTest.java @@ -24,8 +24,6 @@ import lombok.extern.slf4j.Slf4j; import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; diff --git a/functional-test/src/test/java/org/zanata/feature/editor/EditorFilterMessagesTest.java b/functional-test/src/test/java/org/zanata/feature/editor/EditorFilterMessagesTest.java index 3ee96d9422..9136741ccf 100644 --- a/functional-test/src/test/java/org/zanata/feature/editor/EditorFilterMessagesTest.java +++ b/functional-test/src/test/java/org/zanata/feature/editor/EditorFilterMessagesTest.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.editor; import static org.assertj.core.api.Assertions.assertThat; @@ -50,11 +70,12 @@ public void setUp() { tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0) @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION) public void canFilterByMultipleFields() { - EditorPage editorPage = - new BasicWorkFlow().goToEditor("about-fedora", "master", "fr", - document); + EditorPage editorPage = new BasicWorkFlow() + .goToEditor("about-fedora", "master", "fr", document); + assertThat(editorPage.getMessageSources()).containsExactly( "hello world", "greetings", "hey"); + final EditorPage page = editorPage.inputFilterQuery("resource-id:res2"); editorPage.waitFor(new Callable>() { diff --git a/functional-test/src/test/java/org/zanata/feature/editor/TranslateHTMLTest.java b/functional-test/src/test/java/org/zanata/feature/editor/TranslateHTMLTest.java index 5a6c05e859..6403e46b21 100644 --- a/functional-test/src/test/java/org/zanata/feature/editor/TranslateHTMLTest.java +++ b/functional-test/src/test/java/org/zanata/feature/editor/TranslateHTMLTest.java @@ -21,7 +21,6 @@ package org.zanata.feature.editor; import java.io.File; -import java.util.HashMap; import org.junit.Before; import org.junit.Rule; diff --git a/functional-test/src/test/java/org/zanata/feature/editor/TranslateIdmlTest.java b/functional-test/src/test/java/org/zanata/feature/editor/TranslateIdmlTest.java index 2a92fbdf0d..60084630e4 100644 --- a/functional-test/src/test/java/org/zanata/feature/editor/TranslateIdmlTest.java +++ b/functional-test/src/test/java/org/zanata/feature/editor/TranslateIdmlTest.java @@ -21,7 +21,6 @@ package org.zanata.feature.editor; import java.io.File; -import java.util.HashMap; import org.junit.Before; import org.junit.Rule; diff --git a/functional-test/src/test/java/org/zanata/feature/editor/TranslateOpenOfficeTest.java b/functional-test/src/test/java/org/zanata/feature/editor/TranslateOpenOfficeTest.java index 8c1a415704..bbf4d7fa4e 100644 --- a/functional-test/src/test/java/org/zanata/feature/editor/TranslateOpenOfficeTest.java +++ b/functional-test/src/test/java/org/zanata/feature/editor/TranslateOpenOfficeTest.java @@ -21,7 +21,6 @@ package org.zanata.feature.editor; import java.io.File; -import java.util.HashMap; import org.junit.Before; import org.junit.Rule; diff --git a/functional-test/src/test/java/org/zanata/feature/editor/TranslateTextTest.java b/functional-test/src/test/java/org/zanata/feature/editor/TranslateTextTest.java index 4a823f8548..4ac4cd89f1 100644 --- a/functional-test/src/test/java/org/zanata/feature/editor/TranslateTextTest.java +++ b/functional-test/src/test/java/org/zanata/feature/editor/TranslateTextTest.java @@ -21,7 +21,6 @@ package org.zanata.feature.editor; import java.io.File; -import java.util.HashMap; import org.junit.Before; import org.junit.Rule; diff --git a/functional-test/src/test/java/org/zanata/feature/editor/TranslationHistoryTest.java b/functional-test/src/test/java/org/zanata/feature/editor/TranslationHistoryTest.java index d1d9d90bae..42bc7451b0 100644 --- a/functional-test/src/test/java/org/zanata/feature/editor/TranslationHistoryTest.java +++ b/functional-test/src/test/java/org/zanata/feature/editor/TranslationHistoryTest.java @@ -22,6 +22,8 @@ import org.junit.Rule; import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.zanata.feature.testharness.TestPlan.DetailedTest; import org.zanata.feature.testharness.ZanataTestCase; import org.zanata.page.webtrans.EditorPage; import org.zanata.util.RetryRule; @@ -34,6 +36,7 @@ /** * @author Damian Jansen djansen@redhat.com */ +@Category(DetailedTest.class) public class TranslationHistoryTest extends ZanataTestCase { @Rule diff --git a/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryAdminTest.java b/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryAdminTest.java index 3139217c90..1833926814 100644 --- a/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryAdminTest.java +++ b/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryAdminTest.java @@ -38,7 +38,6 @@ import java.util.List; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.greaterThan; @@ -87,9 +86,11 @@ public void testGlossaryView() { List langs = glossaryPage.getAvailableGlossaryLanguages(); assertThat(langs.size(), greaterThan(0)); - assertThat(langs, containsInAnyOrder("pl", "hi", "en-US")); - assertThat(glossaryPage.getGlossaryEntryCount("pl"), greaterThan(1)); - assertThat(glossaryPage.getGlossaryEntryCount("hi"), greaterThan(1)); - assertThat(glossaryPage.getGlossaryEntryCount("en-US"), greaterThan(1)); + assertThat(langs, containsInAnyOrder("Polish", + "Hindi", "English (United States)")); + assertThat(glossaryPage.getGlossaryEntryCount("Polish"), greaterThan(1)); + assertThat(glossaryPage.getGlossaryEntryCount("Hindi"), greaterThan(1)); + assertThat(glossaryPage.getGlossaryEntryCount("English (United States)"), + greaterThan(1)); } } diff --git a/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryDeleteTest.java b/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryDeleteTest.java index 9cad9f3288..b224e1ac26 100644 --- a/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryDeleteTest.java +++ b/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryDeleteTest.java @@ -33,7 +33,6 @@ import org.zanata.workflow.BasicWorkFlow; import org.zanata.workflow.ClientWorkFlow; import org.zanata.workflow.LoginWorkFlow; -import org.zanata.workflow.ProjectWorkFlow; import java.io.File; import java.util.List; diff --git a/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryPushTest.java b/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryPushTest.java index 41e90f2fdb..ccd7e29e68 100644 --- a/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryPushTest.java +++ b/functional-test/src/test/java/org/zanata/feature/glossary/GlossaryPushTest.java @@ -31,7 +31,6 @@ import org.zanata.feature.testharness.TestPlan.DetailedTest; import org.zanata.page.webtrans.EditorPage; import org.zanata.util.SampleProjectRule; -import org.zanata.workflow.BasicWorkFlow; import org.zanata.workflow.ClientWorkFlow; import org.zanata.workflow.LoginWorkFlow; diff --git a/functional-test/src/test/java/org/zanata/feature/language/ContactLanguageTeamTest.java b/functional-test/src/test/java/org/zanata/feature/language/ContactLanguageTeamTest.java index 1df3ae5f69..d78886e7f4 100644 --- a/functional-test/src/test/java/org/zanata/feature/language/ContactLanguageTeamTest.java +++ b/functional-test/src/test/java/org/zanata/feature/language/ContactLanguageTeamTest.java @@ -25,7 +25,7 @@ import org.junit.experimental.categories.Category; import org.subethamail.wiser.WiserMessage; import org.zanata.feature.Feature; -import org.zanata.feature.testharness.TestPlan; +import org.zanata.feature.testharness.TestPlan.DetailedTest; import org.zanata.feature.testharness.ZanataTestCase; import org.zanata.page.languages.LanguagesPage; import org.zanata.util.AddUsersRule; @@ -39,7 +39,7 @@ /** * @author Damian Jansen djansen@redhat.com */ -@Category(TestPlan.DetailedTest.class) +@Category(DetailedTest.class) public class ContactLanguageTeamTest extends ZanataTestCase { @Rule diff --git a/functional-test/src/test/java/org/zanata/feature/misc/ContactAdminTest.java b/functional-test/src/test/java/org/zanata/feature/misc/ContactAdminTest.java index 1815678509..673aa709ff 100644 --- a/functional-test/src/test/java/org/zanata/feature/misc/ContactAdminTest.java +++ b/functional-test/src/test/java/org/zanata/feature/misc/ContactAdminTest.java @@ -1,8 +1,27 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.misc; import java.util.List; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -20,7 +39,6 @@ import org.zanata.workflow.LoginWorkFlow; import static org.assertj.core.api.Assertions.assertThat; -import static org.zanata.util.FunctionalTestHelper.loosely; /** * @author Patrick Huang djansen@redhat.com */ +@Category(DetailedTest.class) public class VersionFilteringTest extends ZanataTestCase { @ClassRule diff --git a/functional-test/src/test/java/org/zanata/feature/rest/CopyTransTest.java b/functional-test/src/test/java/org/zanata/feature/rest/CopyTransTest.java index 998eb69b6e..000e62cd86 100644 --- a/functional-test/src/test/java/org/zanata/feature/rest/CopyTransTest.java +++ b/functional-test/src/test/java/org/zanata/feature/rest/CopyTransTest.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.rest; import org.hamcrest.Matchers; diff --git a/functional-test/src/test/java/org/zanata/feature/security/SecurityTest.java b/functional-test/src/test/java/org/zanata/feature/security/SecurityTest.java index 417a9d9e22..3b7ffc4cf4 100644 --- a/functional-test/src/test/java/org/zanata/feature/security/SecurityTest.java +++ b/functional-test/src/test/java/org/zanata/feature/security/SecurityTest.java @@ -20,7 +20,6 @@ */ package org.zanata.feature.security; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -33,7 +32,6 @@ import org.zanata.util.AddUsersRule; import org.zanata.util.EnsureLogoutRule; import org.zanata.util.HasEmailRule; -import org.zanata.util.RetryRule; import org.zanata.workflow.BasicWorkFlow; import org.zanata.workflow.LoginWorkFlow; diff --git a/functional-test/src/test/java/org/zanata/feature/testharness/DetailedTestSuite.java b/functional-test/src/test/java/org/zanata/feature/testharness/DetailedTestSuite.java index d83f66f810..a017fdb4df 100644 --- a/functional-test/src/test/java/org/zanata/feature/testharness/DetailedTestSuite.java +++ b/functional-test/src/test/java/org/zanata/feature/testharness/DetailedTestSuite.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.feature.testharness; import org.junit.experimental.categories.Categories; diff --git a/functional-test/src/test/java/org/zanata/feature/testharness/TestPlan.java b/functional-test/src/test/java/org/zanata/feature/testharness/TestPlan.java index f382958770..45a9812607 100644 --- a/functional-test/src/test/java/org/zanata/feature/testharness/TestPlan.java +++ b/functional-test/src/test/java/org/zanata/feature/testharness/TestPlan.java @@ -27,11 +27,20 @@ import org.zanata.feature.clientserver.*; import org.zanata.feature.concurrentedit.*; import org.zanata.feature.dashboard.DashboardTest; +import org.zanata.feature.document.DocTypeUploadTest; import org.zanata.feature.document.HTMLDocumentTypeTest; +import org.zanata.feature.document.MultiFileUploadTest; +import org.zanata.feature.document.SubtitleDocumentTypeTest; import org.zanata.feature.document.UploadTest; import org.zanata.feature.editor.*; +import org.zanata.feature.glossary.GlossaryAdminTest; +import org.zanata.feature.glossary.GlossaryDeleteTest; +import org.zanata.feature.glossary.GlossaryPushTest; +import org.zanata.feature.glossary.InvalidGlossaryPushTest; +import org.zanata.feature.googleopenid.GoogleOpenIDTest; import org.zanata.feature.infrastructure.RetryRuleTest; import org.zanata.feature.language.AddLanguageTest; +import org.zanata.feature.language.ContactLanguageTeamTest; import org.zanata.feature.language.JoinLanguageTeamTest; import org.zanata.feature.misc.*; import org.zanata.feature.project.*; @@ -75,7 +84,6 @@ AutoRoleAssignmentTest.class, EditHomePageTest.class, EditTranslationMemoryTest.class, - EditTranslationMemoryTest.class, ManageSearchTest.class, ManageUsersTest.class, @@ -103,18 +111,38 @@ * Document * Source document upload and management */ + DocTypeUploadTest.class, HTMLDocumentTypeTest.class, + MultiFileUploadTest.class, + SubtitleDocumentTypeTest.class, UploadTest.class, /* * Editor * Translation editor general features */ + EditorFilterMessagesTest.class, TranslateHTMLTest.class, TranslateIdmlTest.class, TranslateOdsTest.class, TranslateOpenOfficeTest.class, TranslateTextTest.class, + TranslationHistoryTest.class, + + /* + * Glossary + * Glossary management features + */ + GlossaryAdminTest.class, + GlossaryDeleteTest.class, + GlossaryPushTest.class, + InvalidGlossaryPushTest.class, + + /* + * Google OpenID + * Registration and log in with Google OpenID + */ + GoogleOpenIDTest.class, /* * Infrastructure @@ -127,6 +155,7 @@ * Participation in an management of language teams */ AddLanguageTest.class, + ContactLanguageTeamTest.class, JoinLanguageTeamTest.class, /* diff --git a/functional-test/src/test/java/org/zanata/util/AddUsersRule.java b/functional-test/src/test/java/org/zanata/util/AddUsersRule.java index c534a57a99..2c14b4a36e 100644 --- a/functional-test/src/test/java/org/zanata/util/AddUsersRule.java +++ b/functional-test/src/test/java/org/zanata/util/AddUsersRule.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; import org.junit.rules.ExternalResource; diff --git a/functional-test/src/test/java/org/zanata/util/CleanDatabaseRule.java b/functional-test/src/test/java/org/zanata/util/CleanDatabaseRule.java index 24c5ba9d38..bc4fd352a8 100644 --- a/functional-test/src/test/java/org/zanata/util/CleanDatabaseRule.java +++ b/functional-test/src/test/java/org/zanata/util/CleanDatabaseRule.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; import org.junit.rules.ExternalResource; diff --git a/functional-test/src/test/java/org/zanata/util/CleanDocumentStorageRule.java b/functional-test/src/test/java/org/zanata/util/CleanDocumentStorageRule.java index 527ead8d64..1738bd63bd 100644 --- a/functional-test/src/test/java/org/zanata/util/CleanDocumentStorageRule.java +++ b/functional-test/src/test/java/org/zanata/util/CleanDocumentStorageRule.java @@ -1,6 +1,25 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; -import com.google.common.base.Throwables; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FileUtils; import org.junit.rules.ExternalResource; diff --git a/functional-test/src/test/java/org/zanata/util/EnsureLogoutRule.java b/functional-test/src/test/java/org/zanata/util/EnsureLogoutRule.java index ab92d4e635..0104d89eae 100644 --- a/functional-test/src/test/java/org/zanata/util/EnsureLogoutRule.java +++ b/functional-test/src/test/java/org/zanata/util/EnsureLogoutRule.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; import org.junit.rules.TestRule; diff --git a/functional-test/src/test/java/org/zanata/util/FeatureInventoryRecorder.java b/functional-test/src/test/java/org/zanata/util/FeatureInventoryRecorder.java index 3e98bc2d43..3d5aac12a5 100644 --- a/functional-test/src/test/java/org/zanata/util/FeatureInventoryRecorder.java +++ b/functional-test/src/test/java/org/zanata/util/FeatureInventoryRecorder.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; import java.io.File; diff --git a/functional-test/src/test/java/org/zanata/util/HasEmailRule.java b/functional-test/src/test/java/org/zanata/util/HasEmailRule.java index b4792bd2ef..39f584d9f2 100644 --- a/functional-test/src/test/java/org/zanata/util/HasEmailRule.java +++ b/functional-test/src/test/java/org/zanata/util/HasEmailRule.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; import java.util.List; diff --git a/functional-test/src/test/java/org/zanata/util/NoScreenshot.java b/functional-test/src/test/java/org/zanata/util/NoScreenshot.java index ef6974c692..48254df77c 100644 --- a/functional-test/src/test/java/org/zanata/util/NoScreenshot.java +++ b/functional-test/src/test/java/org/zanata/util/NoScreenshot.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; import java.lang.annotation.ElementType; diff --git a/functional-test/src/test/java/org/zanata/util/SampleDataResourceClient.java b/functional-test/src/test/java/org/zanata/util/SampleDataResourceClient.java index 4d0eee3b7c..c73a2585fa 100644 --- a/functional-test/src/test/java/org/zanata/util/SampleDataResourceClient.java +++ b/functional-test/src/test/java/org/zanata/util/SampleDataResourceClient.java @@ -1,12 +1,30 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; -import java.util.Set; import javax.ws.rs.core.Response; import org.hamcrest.Matchers; import org.jboss.resteasy.client.ClientRequest; import org.jboss.resteasy.client.ClientResponse; -import org.zanata.common.LocaleId; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/functional-test/src/test/java/org/zanata/util/SampleProjectRule.java b/functional-test/src/test/java/org/zanata/util/SampleProjectRule.java index a7c03f03c6..665432c5d3 100644 --- a/functional-test/src/test/java/org/zanata/util/SampleProjectRule.java +++ b/functional-test/src/test/java/org/zanata/util/SampleProjectRule.java @@ -21,11 +21,7 @@ package org.zanata.util; -import java.util.Set; - import org.junit.rules.ExternalResource; -import org.zanata.common.LocaleId; -import com.google.common.collect.Sets; import lombok.extern.slf4j.Slf4j; import static org.zanata.util.SampleDataResourceClient.*; diff --git a/functional-test/src/test/java/org/zanata/util/ScreenshotEnabledTestRunListener.java b/functional-test/src/test/java/org/zanata/util/ScreenshotEnabledTestRunListener.java index 300504d6ad..d079ecf996 100644 --- a/functional-test/src/test/java/org/zanata/util/ScreenshotEnabledTestRunListener.java +++ b/functional-test/src/test/java/org/zanata/util/ScreenshotEnabledTestRunListener.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; import java.io.File; diff --git a/functional-test/src/test/java/org/zanata/util/ZanataRestCaller.java b/functional-test/src/test/java/org/zanata/util/ZanataRestCaller.java index db4d3a2df1..4136ec3c13 100644 --- a/functional-test/src/test/java/org/zanata/util/ZanataRestCaller.java +++ b/functional-test/src/test/java/org/zanata/util/ZanataRestCaller.java @@ -1,3 +1,23 @@ +/* + * Copyright 2014, Red Hat, Inc. and individual contributors as indicated by the + * @author tags. See the copyright.txt file in the distribution for a full + * listing of individual contributors. + * + * 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.zanata.util; import java.net.URI; @@ -27,7 +47,6 @@ import org.zanata.rest.dto.resource.TextFlowTarget; import org.zanata.rest.dto.resource.TranslationsResource; import org.zanata.rest.dto.stats.ContainerTranslationStatistics; -import com.google.common.base.Preconditions; import com.google.common.base.Throwables; import com.google.common.collect.Lists; import com.google.common.collect.Sets;