Skip to content

Commit

Permalink
Merge pull request #3701 from BacLuc/update-testdata
Browse files Browse the repository at this point in the history
api: update dev-data
  • Loading branch information
BacLuc authored Aug 20, 2023
2 parents 5d8277f + d9224bc commit 077ced4
Show file tree
Hide file tree
Showing 7 changed files with 1,594 additions and 773 deletions.
8 changes: 0 additions & 8 deletions api/migrations/dev-data/Version202306250019.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ public function getDescription(): string {

public function up(Schema $schema): void {
// START PHP CODE
$this->addSql(createTruncateDatabaseCommand());

$statements = getStatementsForMigrationFile();
foreach ($statements as $statement) {
if (trim($statement)) {
$this->addSql($statement);
}
}
// END PHP CODE
}

Expand Down
32 changes: 32 additions & 0 deletions api/migrations/dev-data/Version202308081601.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

declare(strict_types=1);

namespace DataMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

require_once __DIR__.'/helpers.php';

final class Version202308081601 extends AbstractMigration {
public function getDescription(): string {
return '';
}

public function up(Schema $schema): void {
// START PHP CODE
$this->addSql(createTruncateDatabaseCommand());

$statements = getStatementsForMigrationFile();
foreach ($statements as $statement) {
if (trim($statement)) {
$this->addSql($statement);
}
}
// END PHP CODE
}

public function down(Schema $schema): void {
}
}
2,283 changes: 1,540 additions & 743 deletions api/migrations/dev-data/data.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions e2e/specs/clientPrint.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ describe('Client print test', () => {

cy.visit('/camps')
cy.get('a:contains("GRGR")').click()
cy.get('a:contains("Print")').click()
cy.get('button:contains("Download PDF (layout #2)")').click()
cy.get('a:contains("Drucken")').click()
cy.get('button:contains("PDF herunterladen (Layout #2)")').click()

const downloadsFolder = Cypress.config('downloadsFolder')
cy.readFile(path.join(downloadsFolder, 'Pfila-2023.pdf'), {
Expand Down
2 changes: 1 addition & 1 deletion e2e/specs/login.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Login test', () => {

cy.location('pathname', { timeout: 60000 }).should('include', '/camps')

cy.contains('My Camps')
cy.contains('Meine Lager')
cy.contains('GRGR')
cy.contains('Harry Potter Lager')
})
Expand Down
4 changes: 2 additions & 2 deletions e2e/specs/nuxtPrint.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe('Nuxt print test', () => {

cy.visit('/camps')
cy.get('a:contains("GRGR")').click()
cy.get('a:contains("Print")').click()
cy.get('button:contains("Download PDF (layout #1)")').click()
cy.get('a:contains("Drucken")').click()
cy.get('button:contains("PDF herunterladen (Layout #1)")').click()

const downloadsFolder = Cypress.config('downloadsFolder')
cy.readFile(path.join(downloadsFolder, 'Pfila-2023.pdf'), {
Expand Down
34 changes: 17 additions & 17 deletions e2e/specs/persistDashboardFilter.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ describe('Persist Dashboard Filter', () => {
cy.login('[email protected]')
cy.visit('/camps')
cy.get('a:contains("GRGR")').click()
cy.get('span.v-chip:contains("Category")').click()
cy.get('span.v-chip:contains("Kategorie")').click()
clickOnItemWithLabel('Essen')
clickOnItemWithLabel('Lagersport')
cy.wait(500)
cy.url().should('include', 'category')
cy.url().should('include', '6adced5270de')
cy.url().should('include', '9af703a10a9c')
cy.url().should('include', 'ebfd46a1c181')
cy.url().should('include', 'a023e85227ac')
})
it('should remove Category-Filters from query', () => {
cy.login('[email protected]')
cy.visit('/camps')
cy.get('a:contains("GRGR")').click()
cy.get('span.v-chip:contains("Category")').click()
cy.get('span.v-chip:contains("Kategorie")').click()
clickOnItemWithLabel('Essen')
clickOnItemWithLabel('Lagersport')
cy.wait(500)
Expand All @@ -24,47 +24,47 @@ describe('Persist Dashboard Filter', () => {
cy.wait(500)

cy.url().should('not.include', 'category')
cy.url().should('not.include', '6adced5270de')
cy.url().should('not.include', '9af703a10a9c')
cy.url().should('not.include', 'ebfd46a1c181')
cy.url().should('not.include', 'a023e85227ac')
})
it('should add Filters to query', () => {
cy.login('[email protected]')
cy.visit('/camps')
cy.get('a:contains("GRGR")').click()
cy.get('span.v-chip:contains("Category")').click()
cy.get('span.v-chip:contains("Kategorie")').click()
clickOnItemWithLabel('Essen')
clickOnItemWithLabel('Lagersport')
cy.wait(500)
cy.get('span.v-chip:contains("State")').click()
cy.get('span.v-chip:contains("Status")').click()
clickOnItemWithLabel('Geplant')
clickOnItemWithLabel('Coach OK')
cy.wait(500)

cy.url().should('include', 'category')
cy.url().should('include', '6adced5270de')
cy.url().should('include', '9af703a10a9c')
cy.url().should('include', 'ebfd46a1c181')
cy.url().should('include', 'a023e85227ac')

cy.url().should('include', 'progressLabel')
cy.url().should('include', '56d24f5359de')
cy.url().should('include', 'c50da81e0cfc')
cy.url().should('include', '82547049ea38')
cy.url().should('include', '332e0c387141')

cy.reload(true)
cy.wait(500)

cy.get('span.v-chip:contains("Category: ES or LS")')
cy.get('span.v-chip:contains("State: Geplant or Coach OK")')
cy.get('span.v-chip:contains("Kategorie: ES oder LS")')
cy.get('span.v-chip:contains("Status: Geplant oder Coach OK")')
})
it('should add Responsible-Filters to query', () => {
cy.login('[email protected]')
cy.visit('/camps')
cy.get('a:contains("GRGR")').click()
cy.get('span.v-chip:contains("Responsible")').click()
clickOnItemWithLabel('No responsibles')
cy.get('span.v-chip:contains("Verantwortlich")').click()
clickOnItemWithLabel('Keine Verantwortlichen')
cy.url().should('include', 'responsible=none')
cy.wait(500)
cy.reload(true)
cy.wait(10000)
cy.get('span.v-chip:contains("Responsible: No responsibles")')
cy.get('span.v-chip:contains("Verantwortlich: Keine Verantwortlichen")')
})
})

Expand Down

0 comments on commit 077ced4

Please sign in to comment.