mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.1 KiB
64 lines
2.1 KiB
3 years ago
|
|
||
|
import { loginPage } from "../../support/page_objects/navigation"
|
||
|
|
||
3 years ago
|
const genTest = (type) => {
|
||
|
|
||
|
describe(`${type.toUpperCase()} api - Existing table`, () => {
|
||
3 years ago
|
before(() => loginPage.loginAndOpenProject(type))
|
||
3 years ago
|
|
||
3 years ago
|
it('Table column header, URL validation', () => {
|
||
|
cy.openTableTab('Country')
|
||
3 years ago
|
|
||
3 years ago
|
// column name validation
|
||
3 years ago
|
cy.get(`.project-tab:contains(Country):visible`).should('exist')
|
||
3 years ago
|
// URL validation
|
||
3 years ago
|
cy.url().should('contain', `?name=Country&`)
|
||
3 years ago
|
})
|
||
|
|
||
|
it('Expand belongs-to column', () => {
|
||
3 years ago
|
|
||
3 years ago
|
// expand first row
|
||
3 years ago
|
cy.get('td[data-col="Country => City"] div:visible', {timeout: 12000}).first().click()
|
||
|
cy.get('td[data-col="Country => City"] div .mdi-arrow-expand:visible').first().click()
|
||
3 years ago
|
})
|
||
|
|
||
|
it('Expand Link record, validate', () => {
|
||
|
cy.getActiveModal().find('button:contains(Link to \'City\')').click()
|
||
|
cy.wait(1000)
|
||
|
|
||
|
// Link record form validation
|
||
|
cy.getActiveModal().contains('Link Record').should('exist')
|
||
|
cy.getActiveModal().find('button.mdi-reload').should('exist')
|
||
|
cy.getActiveModal().find('button:contains("New Record")').should('exist')
|
||
|
cy.getActiveModal().find('.child-card').eq(0).contains('Batna').should('exist')
|
||
|
})
|
||
3 years ago
|
})
|
||
|
}
|
||
|
|
||
|
genTest('rest')
|
||
|
genTest('graphql')
|
||
3 years ago
|
|
||
|
|
||
|
/**
|
||
|
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
|
||
|
*
|
||
|
* @author Pranav C Balan <pranavxc@gmail.com>
|
||
|
* @author Raju Udava <sivadstala@gmail.com>
|
||
|
*
|
||
|
* @license GNU AGPL version 3 or any later version
|
||
|
*
|
||
|
* This program is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of the
|
||
|
* License, or (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Affero General Public License
|
||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*
|
||
|
*/
|