Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix up code review issues in Source Upload testing
Browse files Browse the repository at this point in the history
Mostly blank lines and readbility.
  • Loading branch information
djansen-redhat committed Aug 2, 2013
1 parent fdc1a9a commit caaa820
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 21 deletions.
Expand Up @@ -45,7 +45,6 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nullable;

/**
* @author Damian Jansen <a href="mailto:djansen@redhat.com">djansen@redhat.com</a>
Expand Down
Expand Up @@ -20,16 +20,12 @@
*/
package org.zanata.page.projects;

import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.zanata.page.BasePage;
import org.zanata.page.webtrans.DocumentsViewPage;

import java.util.List;

Expand Down Expand Up @@ -85,7 +81,6 @@ private List<WebElement> getDocumentTableRows()
return documentTableTBody.findElements(By.tagName("tr"));
}


public boolean sourceDocumentsContains(String document)
{
List<WebElement> documentTableRows = getDocumentTableRows();
Expand Down
Expand Up @@ -170,4 +170,4 @@ public void failOnInvalidFileUpload()
projectSourceDocumentsPage.assertNoCriticalErrors();
// TODO: Verify graceful handling of scenario
}
}
}
21 changes: 8 additions & 13 deletions functional-test/src/test/java/org/zanata/util/DatabaseHelper.java
@@ -1,5 +1,13 @@
package org.zanata.util;

import com.google.common.base.Predicate;
import com.google.common.base.Strings;
import com.google.common.io.Files;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.hamcrest.Matchers;
import org.openqa.selenium.support.ui.FluentWait;

import java.io.File;
import java.io.IOException;
import java.net.URL;
Expand All @@ -8,23 +16,11 @@
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.annotation.Nullable;

import org.apache.commons.io.FileUtils;
import org.hamcrest.Matchers;
import org.openqa.selenium.support.ui.FluentWait;
import com.google.common.base.Predicate;
import com.google.common.base.Strings;
import com.google.common.io.Files;

import lombok.extern.slf4j.Slf4j;
import static org.hamcrest.MatcherAssert.assertThat;

/**
Expand Down Expand Up @@ -207,7 +203,6 @@ public void resetFileData()
throw new RuntimeException("error");
}
}

}

private void waitUntil(final String sql, final int expectedResultCount)
Expand Down
2 changes: 1 addition & 1 deletion functional-test/src/test/resources/setup.properties
Expand Up @@ -18,4 +18,4 @@ zanata.database.backup=${zanata.database.backup}
disable.database.reset=${disable.database.reset}

document.storage.directory=${document.storage.directory}
zanata.testdata.directory=${zanata.testdata.directory}
zanata.testdata.directory=${zanata.testdata.directory}

0 comments on commit caaa820

Please sign in to comment.