mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 03:16:01 +00:00
test connect too SSH via keyfile
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const path = require('path');
|
||||
|
||||
describe('Initialization', () => {
|
||||
it('successfully loads', () => {
|
||||
cy.visit('http://localhost:3000');
|
||||
@@ -29,9 +31,9 @@ describe('Initialization', () => {
|
||||
cy.visit('http://localhost:3000');
|
||||
cy.contains('Connections');
|
||||
|
||||
cy.realPress("F1");
|
||||
cy.realType("Close all");
|
||||
cy.realPress("Enter");
|
||||
cy.realPress('F1');
|
||||
cy.realType('Close all');
|
||||
cy.realPress('Enter');
|
||||
|
||||
cy.get('[data-testid=ConnectionList_buttonNewConnection]').click();
|
||||
cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL');
|
||||
@@ -60,9 +62,9 @@ describe('Initialization', () => {
|
||||
cy.visit('http://localhost:3000');
|
||||
cy.contains('Connections');
|
||||
|
||||
cy.realPress("F1");
|
||||
cy.realType("Close all");
|
||||
cy.realPress("Enter");
|
||||
cy.realPress('F1');
|
||||
cy.realType('Close all');
|
||||
cy.realPress('Enter');
|
||||
|
||||
cy.get('[data-testid=ConnectionList_buttonNewConnection]').click();
|
||||
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=ConnectionSshTunnelFields_useSshTunnel]').check();
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear().type('root');
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshPassword]').clear().type('root');
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshMode]').select('Key file');
|
||||
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) {
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh-login');
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh-keyfile');
|
||||
} 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_buttonConnect]').click();
|
||||
|
||||
Reference in New Issue
Block a user