Package org.zanata.page.projectversion

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


                .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

        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

            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

        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

        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

                .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

    /*
     * 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

Related Classes of org.zanata.page.projectversion.VersionDocumentsPage

Copyright © 2018 www.massapicom. 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.