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 - name: Run Cypress tests
run: | run: |
cd e2e-tests cd e2e-tests
yarn ci yarn test:ci
services: services:
mysql: mysql:

View File

@@ -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');
}); });
}); });

View File

@@ -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"
} }

View File

@@ -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">