diff --git a/.github/workflows/run-tests-pro.yaml b/.github/workflows/run-tests-pro.yaml index 8b0a9a121..7f6c6c83f 100644 --- a/.github/workflows/run-tests-pro.yaml +++ b/.github/workflows/run-tests-pro.yaml @@ -54,6 +54,10 @@ jobs: cd ../dbgate-merged cd e2e-tests yarn test:ci + - name: ls -R + run: | + cd ../dbgate-merged + ls -R - name: Copy screenshots run: | mkdir screenshots diff --git a/e2e-tests/cypress/e2e/add-connection.cy.js b/e2e-tests/cypress/e2e/add-connection.cy.js index 6f271e5b9..1e7f72ffb 100644 --- a/e2e-tests/cypress/e2e/add-connection.cy.js +++ b/e2e-tests/cypress/e2e/add-connection.cy.js @@ -1,15 +1,19 @@ const path = require('path'); +beforeEach(() => { + cy.visit('http://localhost:3000'); + cy.viewport(1200, 900); +}); + describe('Add connection', () => { it('successfully loads', () => { - cy.visit('http://localhost:3000'); cy.contains('Database not selected'); }); it('adds connection', () => { - cy.visit('http://localhost:3000'); // cy.get('[data-testid=ConnectionList_buttonNewConnection]').click(); cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL'); + cy.screenshot('connection'); cy.get('[data-testid=ConnectionDriverFields_user]').clear().type('root'); cy.get('[data-testid=ConnectionDriverFields_password]').clear().type('Pwd2020Db'); cy.get('[data-testid=ConnectionDriverFields_port]').clear().type('16004'); @@ -22,12 +26,10 @@ describe('Add connection', () => { // save and connect cy.get('[data-testid=ConnectionTab_buttonSave]').click(); cy.get('[data-testid=ConnectionTab_buttonConnect]').click(); - cy.screenshot('add-connection'); cy.contains('performance_schema'); }); it('SSH connection - user + password', () => { - cy.visit('http://localhost:3000'); cy.contains('Connections'); // cy.realPress('F1'); @@ -46,14 +48,12 @@ describe('Add connection', () => { cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear().type('root'); cy.get('[data-testid=ConnectionSshTunnelFields_sshPassword]').clear().type('root'); cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16006'); - cy.screenshot('ssh-tunnel-connection'); cy.get('[data-testid=ConnectionTab_buttonSave]').click(); cy.get('[data-testid=ConnectionTab_buttonConnect]').click(); cy.contains('performance_schema'); }); it('SSH connection - keyfile', () => { - cy.visit('http://localhost:3000'); cy.contains('Connections'); // cy.realPress('F1'); @@ -82,8 +82,6 @@ describe('Add connection', () => { }); it('ask password - mysql', () => { - cy.visit('http://localhost:3000'); - cy.get('[data-testid=ConnectionList_buttonNewConnection]').click(); cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL'); cy.get('[data-testid=ConnectionDriverFields_user]').clear().type('root'); diff --git a/workflow-templates/run-tests-pro.yaml b/workflow-templates/run-tests-pro.yaml index d984ea823..e16c6906c 100644 --- a/workflow-templates/run-tests-pro.yaml +++ b/workflow-templates/run-tests-pro.yaml @@ -45,6 +45,11 @@ jobs: cd e2e-tests yarn test:ci + - name: ls -R + run: | + cd ../dbgate-merged + ls -R + - name: Copy screenshots run: | mkdir screenshots