This commit is contained in:
SPRINX0\prochazka
2024-12-09 15:41:50 +01:00
parent ae5c539e31
commit 75f75d95a6
4 changed files with 9 additions and 9 deletions

View File

@@ -32,7 +32,7 @@ jobs:
- name: Run Cypress tests
run: |
cd e2e-tests
yarn ci
yarn test:ci
services:
mysql:

View File

@@ -14,7 +14,7 @@ describe('Initialization', () => {
if (process.env.CI) {
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');
});
});

View File

@@ -12,7 +12,7 @@
"cy:open": "cypress open",
"cy:run": "cypress run",
"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:local": "start-server-and-test start:local http://localhost:3000 cy:run"
}

View File

@@ -223,20 +223,20 @@
<div class="buttons">
{#if onlyTestButton}
{#if isTesting}
<FormButton value="Cancel test" on:click={handleCancelTest} />
<FormButton value="Cancel test" on:click={handleCancelTest} data-testid="ConnectionTab_buttonCancelTest" />
{:else}
<FormButton value="Test connection" on:click={handleTest} />
<FormButton value="Test connection" on:click={handleTest} data-testid="ConnectionTab_buttonDisconnect" />
{/if}
{:else if isConnected}
<FormButton value="Disconnect" on:click={handleDisconnect} />
<FormButton value="Disconnect" on:click={handleDisconnect} data-testid='ConnectionTab_buttonDisconnect' />
{:else}
<FormButton value="Connect" on:click={handleConnect} data-testid='ConnectionTab_connect' />
<FormButton value="Connect" on:click={handleConnect} data-testid='ConnectionTab_buttonConnect' />
{#if isTesting}
<FormButton value="Cancel test" on:click={handleCancelTest} />
{:else}
<FormButton value="Test" on:click={handleTest} />
<FormButton value="Test" on:click={handleTest} data-testid='ConnectionTab_buttonTest' />
{/if}
<FormButton value="Save" on:click={handleSave} />
<FormButton value="Save" on:click={handleSave} data-testid='ConnectionTab_buttonSave' />
{/if}
</div>
<div class="test-result">