mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
SYNC: private cloud test
This commit is contained in:
committed by
Diflow
parent
eba16cc15d
commit
c641830825
@@ -40,6 +40,9 @@ module.exports = defineConfig({
|
|||||||
case 'multi-sql':
|
case 'multi-sql':
|
||||||
serverProcess = exec('yarn start:multi-sql');
|
serverProcess = exec('yarn start:multi-sql');
|
||||||
break;
|
break;
|
||||||
|
case 'cloud':
|
||||||
|
serverProcess = exec('yarn start:cloud');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
await waitOn({ resources: ['http://localhost:3000'] });
|
await waitOn({ resources: ['http://localhost:3000'] });
|
||||||
|
|||||||
@@ -513,9 +513,4 @@ describe('Data browser data', () => {
|
|||||||
cy.testid('chart-canvas').should($c => expect($c[0].toDataURL()).to.match(/^data:image\/png;base64/));
|
cy.testid('chart-canvas').should($c => expect($c[0].toDataURL()).to.match(/^data:image\/png;base64/));
|
||||||
cy.themeshot('query-result-chart');
|
cy.themeshot('query-result-chart');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.only('Private cloud', () => {
|
|
||||||
cy.testid('WidgetIconPanel_cloudAccount').click();
|
|
||||||
cy.contains('Sign in with Google').click();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
34
e2e-tests/cypress/e2e/cloud.cy.js
Normal file
34
e2e-tests/cypress/e2e/cloud.cy.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
Cypress.on('uncaught:exception', (err, runnable) => {
|
||||||
|
// if the error message matches the one about WorkerGlobalScope importScripts
|
||||||
|
if (err.message.includes("Failed to execute 'importScripts' on 'WorkerGlobalScope'")) {
|
||||||
|
// return false to let Cypress know we intentionally want to ignore this error
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// otherwise let Cypress throw the error
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.visit('http://localhost:3000');
|
||||||
|
cy.viewport(1250, 900);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Cloud tests', () => {
|
||||||
|
it('Private cloud', () => {
|
||||||
|
cy.testid('WidgetIconPanel_cloudAccount').click();
|
||||||
|
|
||||||
|
cy.origin('https://identity.dbgate.io', () => {
|
||||||
|
cy.contains('Sign in with GitHub').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
cy.origin('https://github.com', () => {
|
||||||
|
cy.get('#login_field').type('dbgatetest');
|
||||||
|
cy.get('#password').type('Pwd2020Db');
|
||||||
|
cy.get('input[type="submit"]').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
cy.contains('Testing Connections').rightclick();
|
||||||
|
cy.contains('Administrate access').click();
|
||||||
|
cy.contains('User email');
|
||||||
|
cy.themeshot('administer-shared-folder');
|
||||||
|
});
|
||||||
|
});
|
||||||
2
e2e-tests/env/browse-data/.env
vendored
2
e2e-tests/env/browse-data/.env
vendored
@@ -1,6 +1,4 @@
|
|||||||
CONNECTIONS=mysql,postgres,mongo,redis
|
CONNECTIONS=mysql,postgres,mongo,redis
|
||||||
ALLOW_DBGATE_PRIVATE_CLOUD=1
|
|
||||||
REDIRECT_TO_DBGATE_CLOUD_LOGIN=1
|
|
||||||
|
|
||||||
LABEL_mysql=MySql-connection
|
LABEL_mysql=MySql-connection
|
||||||
SERVER_mysql=localhost
|
SERVER_mysql=localhost
|
||||||
|
|||||||
2
e2e-tests/env/cloud/.env
vendored
Normal file
2
e2e-tests/env/cloud/.env
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALLOW_DBGATE_PRIVATE_CLOUD=1
|
||||||
|
REDIRECT_TO_DBGATE_CLOUD_LOGIN=1
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
"start:browse-data": "node clearTestingData && cd .. && env-cmd -f e2e-tests/env/browse-data/.env node e2e-tests/init/browse-data.js && env-cmd -f e2e-tests/env/browse-data/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
"start:browse-data": "node clearTestingData && cd .. && env-cmd -f e2e-tests/env/browse-data/.env node e2e-tests/init/browse-data.js && env-cmd -f e2e-tests/env/browse-data/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
"start:team": "node clearTestingData && cd .. && env-cmd -f e2e-tests/env/team/.env node e2e-tests/init/team.js && env-cmd -f e2e-tests/env/team/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
"start:team": "node clearTestingData && cd .. && env-cmd -f e2e-tests/env/team/.env node e2e-tests/init/team.js && env-cmd -f e2e-tests/env/team/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
"start:multi-sql": "node clearTestingData && cd .. && env-cmd -f e2e-tests/env/multi-sql/.env node e2e-tests/init/multi-sql.js && env-cmd -f e2e-tests/env/multi-sql/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
"start:multi-sql": "node clearTestingData && cd .. && env-cmd -f e2e-tests/env/multi-sql/.env node e2e-tests/init/multi-sql.js && env-cmd -f e2e-tests/env/multi-sql/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
|
"start:cloud": "node clearTestingData && cd .. && env-cmd -f e2e-tests/env/cloud/.env node packer/build/bundle.js --listen-api --run-e2e-tests",
|
||||||
|
|
||||||
"test:add-connection": "start-server-and-test start:add-connection http://localhost:3000 cy:run:add-connection",
|
"test:add-connection": "start-server-and-test start:add-connection http://localhost:3000 cy:run:add-connection",
|
||||||
"test:portal": "start-server-and-test start:portal http://localhost:3000 cy:run:portal",
|
"test:portal": "start-server-and-test start:portal http://localhost:3000 cy:run:portal",
|
||||||
@@ -35,8 +36,9 @@
|
|||||||
"test:browse-data": "start-server-and-test start:browse-data http://localhost:3000 cy:run:browse-data",
|
"test:browse-data": "start-server-and-test start:browse-data http://localhost:3000 cy:run:browse-data",
|
||||||
"test:team": "start-server-and-test start:team http://localhost:3000 cy:run:team",
|
"test:team": "start-server-and-test start:team http://localhost:3000 cy:run:team",
|
||||||
"test:multi-sql": "start-server-and-test start:multi-sql http://localhost:3000 cy:run:multi-sql",
|
"test:multi-sql": "start-server-and-test start:multi-sql http://localhost:3000 cy:run:multi-sql",
|
||||||
|
"test:cloud": "start-server-and-test start:cloud http://localhost:3000 cy:run:cloud",
|
||||||
|
|
||||||
"test": "yarn test:add-connection && yarn test:portal && yarn test:oauth && yarn test:browse-data && yarn test:team && yarn test:multi-sql",
|
"test": "yarn test:add-connection && yarn test:portal && yarn test:oauth && yarn test:browse-data && yarn test:team && yarn test:multi-sql && yarn test:cloud",
|
||||||
"test:ci": "yarn test"
|
"test:ci": "yarn test"
|
||||||
},
|
},
|
||||||
"dependencies": {}
|
"dependencies": {}
|
||||||
|
|||||||
Reference in New Issue
Block a user