mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 14:06:00 +00:00
portal tests WIP
This commit is contained in:
@@ -1,8 +1,54 @@
|
||||
describe('Run as portal', () => {
|
||||
it('successfully loads', () => {
|
||||
cy.visit('http://localhost:3000');
|
||||
cy.contains('MySql');
|
||||
cy.contains('Postgres');
|
||||
cy.contains('MySql-connection');
|
||||
cy.contains('Postgres-connection');
|
||||
});
|
||||
|
||||
it('Delete chinook', () => {
|
||||
cy.visit('http://localhost:3000');
|
||||
|
||||
cy.contains('MySql-connection').rightclick();
|
||||
cy.contains('New Query (server)').click();
|
||||
cy.realType('drop database if exists Chinook');
|
||||
cy.realPress('F5');
|
||||
cy.contains('Query execution finished');
|
||||
|
||||
cy.contains('Postgres-connection').rightclick();
|
||||
cy.contains('New Query (server)').click();
|
||||
cy.realType('drop database if exists "Chinook"');
|
||||
cy.realPress('F5');
|
||||
cy.contains('Query execution finished');
|
||||
|
||||
// cy.realPress('F1');
|
||||
// cy.realType('Close all');
|
||||
// cy.realPress('Enter');
|
||||
});
|
||||
|
||||
it('Create Chinook', () => {
|
||||
cy.visit('http://localhost:3000');
|
||||
|
||||
cy.contains('MySql-connection').click();
|
||||
cy.contains('MySql-connection').rightclick();
|
||||
cy.contains('Create database').click();
|
||||
cy.get('[data-testid=InputTextModal_value]').clear().type('Chinook');
|
||||
cy.get('[data-testid=InputTextModal_ok]').click();
|
||||
});
|
||||
|
||||
|
||||
it('Import Chinook', () => {
|
||||
cy.visit('http://localhost:3000');
|
||||
cy.contains('MySql-connection').click();
|
||||
cy.contains('Chinook').rightclick();
|
||||
cy.contains('Restore/import SQL dump').click();
|
||||
cy.get('#uploadFileButton').selectFile('data/chinook-mysql.sql', { force: true });
|
||||
cy.wait(500);
|
||||
cy.get('[data-testid=ImportDatabaseDumpModal_runImport]').click();
|
||||
cy.contains('Importing database');
|
||||
cy.contains('Finished job script');
|
||||
cy.get('[data-testid=RunScriptModal_close]').click();
|
||||
cy.contains('Chinook').click();
|
||||
cy.contains('Album');
|
||||
});
|
||||
|
||||
// it('import chinook DB', () => {
|
||||
|
||||
15846
e2e-tests/data/chinook-mysql.sql
Normal file
15846
e2e-tests/data/chinook-mysql.sql
Normal file
File diff suppressed because it is too large
Load Diff
4
e2e-tests/env/portal-ci/.env
vendored
4
e2e-tests/env/portal-ci/.env
vendored
@@ -1,13 +1,13 @@
|
||||
CONNECTIONS=mysql,postgres
|
||||
|
||||
LABEL_mysql=MySql
|
||||
LABEL_mysql=MySql-connection
|
||||
SERVER_mysql=mariadb
|
||||
USER_mysql=root
|
||||
PASSWORD_mysql=Pwd2020Db
|
||||
PORT_mysql=3306
|
||||
ENGINE_mysql=mysql@dbgate-plugin-mysql
|
||||
|
||||
LABEL_postgres=Postgres
|
||||
LABEL_postgres=Postgres-connection
|
||||
SERVER_postgres=postgres
|
||||
USER_postgres=postgres
|
||||
PASSWORD_postgres=Pwd2020Db
|
||||
|
||||
4
e2e-tests/env/portal-local/.env
vendored
4
e2e-tests/env/portal-local/.env
vendored
@@ -1,13 +1,13 @@
|
||||
CONNECTIONS=mysql,postgres
|
||||
|
||||
LABEL_mysql=MySql
|
||||
LABEL_mysql=MySql-connection
|
||||
SERVER_mysql=localhost
|
||||
USER_mysql=root
|
||||
PASSWORD_mysql=Pwd2020Db
|
||||
PORT_mysql=16004
|
||||
ENGINE_mysql=mysql@dbgate-plugin-mysql
|
||||
|
||||
LABEL_postgres=Postgres
|
||||
LABEL_postgres=Postgres-connection
|
||||
SERVER_postgres=localhost
|
||||
USER_postgres=postgres
|
||||
PASSWORD_postgres=Pwd2020Db
|
||||
|
||||
Reference in New Issue
Block a user