mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 15:35:58 +00:00
test connect too SSH via keyfile
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
const path = require('path');
|
||||||
|
|
||||||
describe('Initialization', () => {
|
describe('Initialization', () => {
|
||||||
it('successfully loads', () => {
|
it('successfully loads', () => {
|
||||||
cy.visit('http://localhost:3000');
|
cy.visit('http://localhost:3000');
|
||||||
@@ -29,9 +31,9 @@ describe('Initialization', () => {
|
|||||||
cy.visit('http://localhost:3000');
|
cy.visit('http://localhost:3000');
|
||||||
cy.contains('Connections');
|
cy.contains('Connections');
|
||||||
|
|
||||||
cy.realPress("F1");
|
cy.realPress('F1');
|
||||||
cy.realType("Close all");
|
cy.realType('Close all');
|
||||||
cy.realPress("Enter");
|
cy.realPress('Enter');
|
||||||
|
|
||||||
cy.get('[data-testid=ConnectionList_buttonNewConnection]').click();
|
cy.get('[data-testid=ConnectionList_buttonNewConnection]').click();
|
||||||
cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL');
|
cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL');
|
||||||
@@ -60,9 +62,9 @@ describe('Initialization', () => {
|
|||||||
cy.visit('http://localhost:3000');
|
cy.visit('http://localhost:3000');
|
||||||
cy.contains('Connections');
|
cy.contains('Connections');
|
||||||
|
|
||||||
cy.realPress("F1");
|
cy.realPress('F1');
|
||||||
cy.realType("Close all");
|
cy.realType('Close all');
|
||||||
cy.realPress("Enter");
|
cy.realPress('Enter');
|
||||||
|
|
||||||
cy.get('[data-testid=ConnectionList_buttonNewConnection]').click();
|
cy.get('[data-testid=ConnectionList_buttonNewConnection]').click();
|
||||||
cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL');
|
cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL');
|
||||||
@@ -73,12 +75,16 @@ describe('Initialization', () => {
|
|||||||
|
|
||||||
cy.get('[data-testid=ConnectionTab_tabSshTunnel]').click();
|
cy.get('[data-testid=ConnectionTab_tabSshTunnel]').click();
|
||||||
cy.get('[data-testid=ConnectionSshTunnelFields_useSshTunnel]').check();
|
cy.get('[data-testid=ConnectionSshTunnelFields_useSshTunnel]').check();
|
||||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear().type('root');
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshMode]').select('Key file');
|
||||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshPassword]').clear().type('root');
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear()
|
||||||
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').type('root');
|
||||||
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshKeyfile]')
|
||||||
|
.clear()
|
||||||
|
.type(path.join(Cypress.config('fileServerFolder'), 'cypress', 'e2e', 'mykey'));
|
||||||
if (runOnCI) {
|
if (runOnCI) {
|
||||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh-login');
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh-keyfile');
|
||||||
} else {
|
} else {
|
||||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16006');
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16008');
|
||||||
}
|
}
|
||||||
cy.get('[data-testid=ConnectionTab_buttonSave]').click();
|
cy.get('[data-testid=ConnectionTab_buttonSave]').click();
|
||||||
cy.get('[data-testid=ConnectionTab_buttonConnect]').click();
|
cy.get('[data-testid=ConnectionTab_buttonConnect]').click();
|
||||||
|
|||||||
Reference in New Issue
Block a user