mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 20:16:00 +00:00
ux tests
This commit is contained in:
2
.github/workflows/e2e-tests.yaml
vendored
2
.github/workflows/e2e-tests.yaml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
- name: Run Cypress tests
|
- name: Run Cypress tests
|
||||||
run: |
|
run: |
|
||||||
cd e2e-tests
|
cd e2e-tests
|
||||||
yarn ci
|
yarn test:ci
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ describe('Initialization', () => {
|
|||||||
if (process.env.CI) {
|
if (process.env.CI) {
|
||||||
cy.get('[data-testid=ConnectionDriverFields_server]').clear().type('mysql');
|
cy.get('[data-testid=ConnectionDriverFields_server]').clear().type('mysql');
|
||||||
}
|
}
|
||||||
cy.get('[data-testid=ConnectionTab_connect]').click();
|
cy.get('[data-testid=ConnectionTab_buttonConnect]').click();
|
||||||
cy.contains('performance_schema');
|
cy.contains('performance_schema');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"cy:open": "cypress open",
|
"cy:open": "cypress open",
|
||||||
"cy:run": "cypress run",
|
"cy:run": "cypress run",
|
||||||
"start:ci": "cd .. && cross-env CI=true node packer/build/bundle.js --listen-api --run-packer-build",
|
"start:ci": "cd .. && cross-env CI=true node packer/build/bundle.js --listen-api --run-packer-build",
|
||||||
"start:local": "cd .. && node common/clearDataWithBackup.js && cross-env CI=true node packer/build/bundle.js --listen-api --run-packer-build",
|
"start:local": "cd .. && node common/clearDataWithBackup.js && node packer/build/bundle.js --listen-api --run-packer-build",
|
||||||
"test:ci": "start-server-and-test start:ci http://localhost:3000 cy:run",
|
"test:ci": "start-server-and-test start:ci http://localhost:3000 cy:run",
|
||||||
"test:local": "start-server-and-test start:local http://localhost:3000 cy:run"
|
"test:local": "start-server-and-test start:local http://localhost:3000 cy:run"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,20 +223,20 @@
|
|||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
{#if onlyTestButton}
|
{#if onlyTestButton}
|
||||||
{#if isTesting}
|
{#if isTesting}
|
||||||
<FormButton value="Cancel test" on:click={handleCancelTest} />
|
<FormButton value="Cancel test" on:click={handleCancelTest} data-testid="ConnectionTab_buttonCancelTest" />
|
||||||
{:else}
|
{:else}
|
||||||
<FormButton value="Test connection" on:click={handleTest} />
|
<FormButton value="Test connection" on:click={handleTest} data-testid="ConnectionTab_buttonDisconnect" />
|
||||||
{/if}
|
{/if}
|
||||||
{:else if isConnected}
|
{:else if isConnected}
|
||||||
<FormButton value="Disconnect" on:click={handleDisconnect} />
|
<FormButton value="Disconnect" on:click={handleDisconnect} data-testid='ConnectionTab_buttonDisconnect' />
|
||||||
{:else}
|
{:else}
|
||||||
<FormButton value="Connect" on:click={handleConnect} data-testid='ConnectionTab_connect' />
|
<FormButton value="Connect" on:click={handleConnect} data-testid='ConnectionTab_buttonConnect' />
|
||||||
{#if isTesting}
|
{#if isTesting}
|
||||||
<FormButton value="Cancel test" on:click={handleCancelTest} />
|
<FormButton value="Cancel test" on:click={handleCancelTest} />
|
||||||
{:else}
|
{:else}
|
||||||
<FormButton value="Test" on:click={handleTest} />
|
<FormButton value="Test" on:click={handleTest} data-testid='ConnectionTab_buttonTest' />
|
||||||
{/if}
|
{/if}
|
||||||
<FormButton value="Save" on:click={handleSave} />
|
<FormButton value="Save" on:click={handleSave} data-testid='ConnectionTab_buttonSave' />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="test-result">
|
<div class="test-result">
|
||||||
|
|||||||
Reference in New Issue
Block a user