Examples of VersionDocumentsPage


Examples of org.zanata.page.projectversion.VersionDocumentsPage

                        .getFirstFileNameInDirectory(documentStorageDirectory));

        assertThat(testFileGenerator.getTestFileContent(newlyCreatedFile))
                .isEqualTo("This is a test file")
                .as("The contents of the file were also uploaded");
        VersionDocumentsPage versionDocumentsPage = versionDocumentsTab
                .gotoDocumentTab()
                .waitForSourceDocsContains(testFileName);

        assertThat(versionDocumentsPage.sourceDocumentsContains(testFileName))
                .isTrue()
                .as("Document shows in table");
    }
View Full Code Here

Examples of org.zanata.page.projectversion.VersionDocumentsPage

                .pressUploadFileButton()
                .enterFilePath(longFile.getAbsolutePath())
                .submitUpload()
                .clickUploadDone();

        VersionDocumentsPage versionDocumentsPage = versionDocumentsTab
                .gotoDocumentTab()
                .waitForSourceDocsContains(longFile.getName());

        assertThat(versionDocumentsPage.sourceDocumentsContains(longFile.getName()))
                .isTrue()
                .as("Document shows in table");
    }
View Full Code Here

Examples of org.zanata.page.projectversion.VersionDocumentsPage

        assertThat(emptyFile.exists())
                .isTrue()
                .as("Data file emptyFile.txt still exists");

        VersionDocumentsPage versionDocumentsPage = versionDocumentsTab
                .gotoDocumentTab()
                .waitForSourceDocsContains(emptyFile.getName());

        assertThat(versionDocumentsPage.sourceDocumentsContains(emptyFile.getName()))
                .isTrue()
                .as("Document shows in table");
    }
View Full Code Here

Examples of org.zanata.page.projectversion.VersionDocumentsPage

            tcmsTestPlanIds = { 5316 } )
    public void uploadFileTypeDocument(File testFile) throws Exception {
        String testFileName = testFile.getName();
        log.info("[uploadFile] "+testFileName);

        VersionDocumentsPage versionDocumentsPage = new ProjectWorkFlow()
                .goToProjectByName("doctype-test")
                .gotoVersion("doctype-upload")
                .gotoSettingsTab()
                .gotoSettingsDocumentsTab()
                .pressUploadFileButton()
                .enterFilePath(testFile.getAbsolutePath())
                .submitUpload()
                .clickUploadDone()
                .gotoDocumentTab();

        assertThat(versionDocumentsPage.sourceDocumentsContains(testFileName))
                .as("Document shows in table");

        EditorPage editorPage = versionDocumentsPage
                .gotoLanguageTab()
                .translate("pl", testFileName);

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo(testString)
View Full Code Here

Examples of org.zanata.page.projectversion.VersionDocumentsPage

        assertThat(new File(documentStorageDirectory).list().length)
                .isEqualTo(2)
                .as("There are two uploaded source files");

        VersionDocumentsPage versionDocumentsPage = versionDocumentsTab
                .gotoDocumentTab()
                .waitForSourceDocsContains(testFileName);

        assertThat(versionDocumentsPage.getSourceDocumentNames())
                .contains(firstFile.getName())
                .contains(secondFile.getName())
                .as("The documents were uploaded");
    }
View Full Code Here

Examples of org.zanata.page.projectversion.VersionDocumentsPage

        assertThat(versionDocumentsTab.getUploadList())
                .contains(keptUploadFile.getName())
                .doesNotContain("fakefile.txt")
                .as("The fakefile has been removed");

        VersionDocumentsPage versionDocumentsPage = versionDocumentsTab
                .submitUpload()
                .clickUploadDone()
                .gotoDocumentTab();

        assertThat(versionDocumentsPage.getSourceDocumentNames())
                .contains(keptUploadFile.getName())
                .doesNotContain("fakefile.txt")
                .as("Only the intended file was uploaded");
    }
View Full Code Here

Examples of org.zanata.page.projectversion.VersionDocumentsPage

                .pressUploadFileButton()
                .enterFilePath(htmlfile.getAbsolutePath())
                .submitUpload()
                .clickUploadDone();

        VersionDocumentsPage versionDocumentsPage =
                versionDocumentsTab.gotoDocumentTab();

        assertThat(versionDocumentsPage
                .sourceDocumentsContains(htmlfile.getName()))
                .as("Document shows in table");

        EditorPage editorPage = versionDocumentsPage
                .gotoLanguageTab()
                .translate("pl", testFileName);

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("Test content")
View Full Code Here

Examples of org.zanata.page.projectversion.VersionDocumentsPage

    /*
     * Upload and open the test file in the editor for verification
     */
    private EditorPage uploadAndGoToDocument(File testFile) {
        VersionDocumentsPage versionDocumentsPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("subtitle-test")
                .gotoVersion("subtitles")
                .gotoSettingsTab()
                .gotoSettingsDocumentsTab()
                .pressUploadFileButton()
                .enterFilePath(testFile.getAbsolutePath())
                .submitUpload()
                .clickUploadDone()
                .gotoDocumentTab();

        assertThat(versionDocumentsPage.sourceDocumentsContains(testFile
                .getName())).as("Document shows in table");

        return versionDocumentsPage
                .gotoLanguageTab()
                .translate("pl", testFile.getName());
    }
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.