public/phpmyadmin/test/selenium/TableCreateTest.php
/**
     * Make assertions for table structure
     *
     * @return void
     */
Make assertions for table structure
@return void
Make assertions for table structure @return void
private function _tableStructureAssertions()
    {
        $this->gotoHomepage();
        $this->waitAjax();
        $this->navigateTable('test_table');
        $this->waitAjax();
        $this->waitForElement('byPartialLinkText', "Structure")->click();
        $this->waitForElement("byId", "tablestructure");
        $this->waitForElement('byId', 'table_strucuture_id');
        $this->assertContains(
            "test_id",
            $this->byCssSelector('label[for=checkbox_row_1]')->text()
        );
        $this->assertEquals(
            "int(14)",
            $this->getCellByTableId('tablestructure', 1, 4)
        );
        $this->assertEquals(
            "UNSIGNED",
            $this->getCellByTableId('tablestructure', 1, 6)
        );
        $this->assertEquals(
            "No",
            $this->getCellByTableId('tablestructure', 1, 7)
        );
        $this->assertEquals(
            "None",
            $this->getCellByTableId('tablestructure', 1, 8)
        );
        $this->assertEquals(
            "comm1",
            $this->getCellByTableId('tablestructure', 1, 9)
        );
        $this->assertEquals(
            "AUTO_INCREMENT",
            $this->getCellByTableId('tablestructure', 1, 10)
        );
        $this->assertFalse(
            $this->isElementPresent(
                'byCssSelector',
                'table#tablestructure tbody tr:nth-child(1) "
                . "ul.table-structure-actions li.primary a'
            )
        );
        $this->assertContains(
            "test_column",
            $this->byCssSelector('label[for=checkbox_row_2]')->text()
        );
        $this->assertEquals(
            "varchar(10)",
            $this->getCellByTableId('tablestructure', 2, 4)
        );
        $this->assertEquals(
            "utf8_general_ci",
            $this->getCellByTableId('tablestructure', 2, 5)
        );
        $this->assertEquals(
            "Yes",
            $this->getCellByTableId('tablestructure', 2, 7)
        );
        $this->assertEquals(
            "def",
            $this->getCellByTableId('tablestructure', 2, 8)
        );
        $this->assertFalse(
            $this->isElementPresent(
                'byCssSelector',
                'css=ul.table-structure-actions:nth-child(2) li.primary a'
            )
        );
    }
private function _tableStructureAssertions ( ) { $ this -> gotoHomepage ( ) ; $ this -> waitAjax ( ) ; $ this -> navigateTable ( 'test_table' ) ; $ this -> waitAjax ( ) ; $ this -> waitForElement ( 'byPartialLinkText' , " Structure " ) -> click ( ) ; $ this -> waitForElement ( " byId " , " tablestructure " ) ; $ this -> waitForElement ( 'byId' , 'table_strucuture_id' ) ; $ this -> assertContains ( " test_id " , $ this -> byCssSelector ( 'label[for=checkbox_row_1]' ) -> text ( ) ) ; $ this -> assertEquals ( " int(14) " , $ this -> getCellByTableId ( 'tablestructure' , 1 , 4 ) ) ; $ this -> assertEquals ( " UNSIGNED " , $ this -> getCellByTableId ( 'tablestructure' , 1 , 6 ) ) ; $ this -> assertEquals ( " No " , $ this -> getCellByTableId ( 'tablestructure' , 1 , 7 ) ) ; $ this -> assertEquals ( " None " , $ this -> getCellByTableId ( 'tablestructure' , 1 , 8 ) ) ; $ this -> assertEquals ( " comm1 " , $ this -> getCellByTableId ( 'tablestructure' , 1 , 9 ) ) ; $ this -> assertEquals ( " AUTO_INCREMENT " , $ this -> getCellByTableId ( 'tablestructure' , 1 , 10 ) ) ; $ this -> assertFalse ( $ this -> isElementPresent ( 'byCssSelector' , 'table#tablestructure tbody tr:nth-child(1) "
                . "ul.table-structure-actions li.primary a' ) ) ; $ this -> assertContains ( " test_column " , $ this -> byCssSelector ( 'label[for=checkbox_row_2]' ) -> text ( ) ) ; $ this -> assertEquals ( " varchar(10) " , $ this -> getCellByTableId ( 'tablestructure' , 2 , 4 ) ) ; $ this -> assertEquals ( " utf8_general_ci " , $ this -> getCellByTableId ( 'tablestructure' , 2 , 5 ) ) ; $ this -> assertEquals ( " Yes " , $ this -> getCellByTableId ( 'tablestructure' , 2 , 7 ) ) ; $ this -> assertEquals ( " def " , $ this -> getCellByTableId ( 'tablestructure' , 2 , 8 ) ) ; $ this -> assertFalse ( $ this -> isElementPresent ( 'byCssSelector' , 'css=ul.table-structure-actions:nth-child(2) li.primary a' ) ) ; }
Make assertions for table structure
 @return void
Make assertions for table structure @return void
// go to structure page // make assertions for first row // make assertions for second row