|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
describe('My First Test', () => { |
|
|
|
|
describe('Rest api project test', () => { |
|
|
|
|
|
|
|
|
|
before(() => { |
|
|
|
|
cy.visit('http://localhost:3000') |
|
|
|
|
cy.visit('http://localhost:3000', {retryOnNetworkFailure: true, timeout: 120000}) |
|
|
|
|
cy.waitForSpinners(); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -55,13 +55,48 @@ describe('My First Test', () => {
|
|
|
|
|
|
|
|
|
|
it('Create Table', () => { |
|
|
|
|
cy.get('.add-btn').click(); |
|
|
|
|
const name= 'Test' + Date.now(); |
|
|
|
|
const name = 'Test' + Date.now(); |
|
|
|
|
cy.get('.nc-create-table-card .nc-table-name input[type="text"]').first().click().clear().type(name) |
|
|
|
|
cy.get('.nc-create-table-card .nc-table-name-alias input[type="text"]').first().should('have.value', name.toLowerCase()) |
|
|
|
|
cy.wait(3000) |
|
|
|
|
cy.wait(5000) |
|
|
|
|
cy.get('.nc-create-table-card .nc-create-table-submit').first().click() |
|
|
|
|
cy.get(`.project-tab:contains(${name})`).should('exist') |
|
|
|
|
cy.url().should('contain', `?name=${name}&`) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it('Open and check country table', () => { |
|
|
|
|
cy.contains('Country').first().click({force: true}); |
|
|
|
|
|
|
|
|
|
cy.get(`.project-tab:contains(Country):visible`).should('exist') |
|
|
|
|
cy.url().should('contain', `?name=Country&`) |
|
|
|
|
|
|
|
|
|
cy.get('td[data-col="Country => City"] div:visible').first().click() |
|
|
|
|
cy.get('td[data-col="Country => City"] div .mdi-arrow-expand:visible').first().click() |
|
|
|
|
|
|
|
|
|
cy.get(":contains(Link to 'City'):visible").should('exist') |
|
|
|
|
|
|
|
|
|
cy.get(":contains(Link to 'City'):visible").first().click() |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('Open and check actor table for m2m', () => { |
|
|
|
|
cy.contains('Actor').first().click({force: true}); |
|
|
|
|
|
|
|
|
|
cy.get(`.project-tab:contains(Actor)`).should('exist') |
|
|
|
|
cy.url().should('contain', `?name=Actor&`) |
|
|
|
|
|
|
|
|
|
cy.get('td[data-col="Actor <=> Film"] div:visible').first().click({force: true}) |
|
|
|
|
cy.get('td[data-col="Actor <=> Film"] div .mdi-arrow-expand').first().click({force: true}) |
|
|
|
|
//
|
|
|
|
|
// cy.get(":contains(Link to 'City')").should('exist')
|
|
|
|
|
//
|
|
|
|
|
// cy.get(":contains(Link to 'City'):visible").click()
|
|
|
|
|
|
|
|
|
|
cy.get('.child-card:visible').should('exist').first().click() |
|
|
|
|
|
|
|
|
|
cy.contains('Save Row').should('exist'); |
|
|
|
|
cy.contains('Save Row').should('exist'); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}) |