Examples of ZanataRestCaller


Examples of org.zanata.util.ZanataRestCaller

    private ZanataRestCaller zanataRestCaller;
    private TestFileGenerator testFileGenerator = new TestFileGenerator();

    @Before
    public void before() {
        zanataRestCaller = new ZanataRestCaller();
        new BasicWorkFlow().goToHome().deleteCookiesAndRefresh();
        assumeFalse(
                "",
                new File(CleanDocumentStorageRule.getDocumentStoragePath()
                        .concat(File.separator).concat("documents")
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

    private ZanataRestCaller zanataRestCaller;

    @Before
    public void before() {
        zanataRestCaller = new ZanataRestCaller();
        zanataRestCaller.createProjectAndVersion("langoverride",
                "overridelangtest", "file");
    }
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

    private TestFileGenerator testFileGenerator = new TestFileGenerator();

    @Before
    public void before() {
        new ZanataRestCaller("translator", PropertiesHolder.getProperty(
                Constants.zanataTranslatorKey.value()))
                .createProjectAndVersion("html-project", "html-upload", "file");
        new LoginWorkFlow().signIn("translator", "translator");
    }
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

    @Feature(summary = "The user can filter project versions by name",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void versionSearchFiltering() throws Exception {
        String projectName = "versionsearchnums";
        zanataRestCaller = new ZanataRestCaller("translator",
                PropertiesHolder
                        .getProperty(Constants.zanataTranslatorKey.value()));
        zanataRestCaller.createProjectAndVersion(projectName, "alpha", "file");
        zanataRestCaller.createProjectAndVersion(projectName, "bravo", "file");
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

    @Feature(summary = "The maintainer can add a maintainer to a project",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 199006)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void addMaintainerAsMaintainer() throws Exception {
        new ZanataRestCaller("translator", TRANSLATOR_KEY)
                .createProjectAndVersion("addmaintainer", "addmaintainer",
                        "file");

        assertThat(new LoginWorkFlow()
                .signIn("translator", "translator")
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

    @Feature(summary = "The maintainer can remove a maintainer from a project",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 321234)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void removeMaintainer() throws Exception {
        new ZanataRestCaller("translator", TRANSLATOR_KEY)
                .createProjectAndVersion("removemaintainer", "removemaintainer",
                        "file");
        assertThat(new LoginWorkFlow()
                .signIn("translator", "translator")
                .loggedInAs())
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

            "from a project",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Ignore("rhbz1151935")
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void removeSelfAsMaintainer() throws Exception {
        new ZanataRestCaller("translator", TRANSLATOR_KEY)
                .createProjectAndVersion(
                        "removemaintainer", "removemaintainer", "file");

        assertThat(new LoginWorkFlow()
                .signIn("translator", "translator")
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

    private TestFileGenerator testFileGenerator = new TestFileGenerator();
    private String sep = System.getProperty("line.separator");

    @Before
    public void beforeClass() {
        zanataRestCaller = new ZanataRestCaller();
        zanataRestCaller.createProjectAndVersion("subtitle-test", "subtitles",
                "file");
    }
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

    @Feature(summary = "The administrator can change a project about content",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void addAboutPageDetails() throws Exception {
        new ZanataRestCaller().createProjectAndVersion(
                "aboutpagetest", "aboutpagetest", "file");

        String aboutText = "This is my about text for AF";
        assertThat(new LoginWorkFlow()
                .signIn("admin", "admin")
View Full Code Here

Examples of org.zanata.util.ZanataRestCaller

    @Test
    @Ignore("see https://github.com/zanata/zanata-server/pull/571#issuecomment-55547577 this test can be used to reproduce that issue.")
    // see org.zanata.rest.service.ResourceUtils.transferFromTextFlows()
    public void testPushTranslationAndCopyTrans() {
        ZanataRestCaller restCaller =
                new ZanataRestCaller();
        String projectSlug = "push-test";
        String iterationSlug = "master";
        String projectType = "gettext";
        restCaller.createProjectAndVersion(projectSlug, iterationSlug,
                projectType);

        String docId = "messages";
        Resource sourceResource = buildSourceResource(docId);
        TranslationsResource transResource = buildTranslationResource();
        int numOfMessages = 520;
        for (int i = 0; i < numOfMessages; i++) {
            String resId = "res" + i;
            String content = "content" + i;
            sourceResource.getTextFlows().add(buildTextFlow(resId, content));
            transResource.getTextFlowTargets().add(
                    buildTextFlowTarget(resId, content));
        }
        restCaller.asyncPushSource(projectSlug, iterationSlug, sourceResource, false);
        restCaller.asyncPushTarget(projectSlug, iterationSlug, docId,
                new LocaleId("pl"), transResource, "import");

        assertThat(true, Matchers.is(true));

        // create another version
        restCaller.createProjectAndVersion(projectSlug, "2", projectType);
        restCaller.asyncPushSource(projectSlug, "2", sourceResource, false);
        restCaller.asyncPushTarget(projectSlug, "2", docId, new LocaleId("pl"),
                transResource, "import");

        // push to old version again
        restCaller.asyncPushSource(projectSlug, iterationSlug, sourceResource,
                COPYTRANS);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.