test connect too SSH via keyfile

This commit is contained in:
SPRINX0\prochazka
2025-01-06 10:16:58 +01:00
parent 42ad78df58
commit 362d4a5a0d

View File

@@ -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();