-
Notifications
You must be signed in to change notification settings - Fork 1
Konzertgaeste #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Konzertgaeste #55
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6ba88c3
first try to add gaeste
stefanrinderle d274f96
First test to create a guest list entry
stefanrinderle 71d0a47
Set already in
stefanrinderle 6203b43
cleaner replacer solution
stefanrinderle a2af226
Revert "cleaner replacer solution"
leider File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
frontendtests/data/veranstaltungenstore/Replacervorlage.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "startDate": "2020-03-20T17:30:00.000Z", | ||
| "endDate": "2020-03-20T19:00:00.000Z", | ||
| "id": "[title]", | ||
| "url": "[title]", | ||
| "kopf": { | ||
| "titel": "[title]", | ||
| "beschreibung": "", | ||
| "eventTyp": "Club Konzert", | ||
| "flaeche": 100, | ||
| "kooperation": "", | ||
| "ort": "Jazzclub", | ||
| "pressename": "Jazzclub Karlsruhe", | ||
| "presseIn": "im Jazzclub Karlsruhe", | ||
| "genre": "", | ||
| "confirmed": false, | ||
| "rechnungAnKooperation": false, | ||
| "abgesagt": false, | ||
| "fotografBestellen": false, | ||
| "kannAufHomePage": false, | ||
| "kannInSocialMedia": false | ||
| }, | ||
| "artist": {}, | ||
| "presse": {}, | ||
| "technik": {}, | ||
| "unterkunft": {} | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| const { I } = inject(); | ||
|
|
||
| const buttons = { | ||
| addInTable: '(//button[@data-testid="add-in-table"])', | ||
| speichern: "Speichern", | ||
| }; | ||
|
|
||
| export async function goToGaestePage() { | ||
| I.click(locate('div[role="tab"]').withText("Gäste am Abend")); | ||
|
|
||
| I.waitForText("Gästeliste"); | ||
| } | ||
|
|
||
| export async function addGaesteListe(guest: { | ||
leider marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| name: string; | ||
| comment: string; | ||
| number: number; | ||
| alreadyIn: number; | ||
| }) { | ||
| I.click(buttons.addInTable); | ||
| I.click('[data-testid="name0"]'); | ||
| I.fillField("#name", guest.name); | ||
| I.pressKey("Tab"); | ||
| I.fillField("#comment", guest.comment); | ||
| I.pressKey("Tab"); | ||
| I.fillField("#number", guest.number); | ||
|
|
||
| I.click(buttons.speichern); | ||
| } | ||
|
|
||
| export async function setAlreadyIn(row: number, value: number) { | ||
| I.click('[data-testid="alreadyIn' + row + '"]'); | ||
| I.fillField("#alreadyIn", value); | ||
|
|
||
| // I.wait(5); | ||
|
|
||
| I.pressKey("Tab"); | ||
|
|
||
| // I.wait(5); | ||
|
|
||
| I.click(buttons.speichern); | ||
| } | ||
|
|
||
| export async function verifyGuestInStore( | ||
| title: string, | ||
| guest: { | ||
| name: string; | ||
| comment: string; | ||
| number: number; | ||
| alreadyIn: number; | ||
| }, | ||
| index: number = 0, | ||
| ) { | ||
| const res = await I.loadObjectInCollection("veranstaltungenstore", title); | ||
|
|
||
| I.assertDeepEqual(res.gaesteliste[index], { | ||
| name: guest.name, | ||
| comment: guest.comment, | ||
| number: guest.number, | ||
| alreadyIn: guest.alreadyIn, | ||
| key: "row" + index, | ||
| }); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| const { I } = inject(); | ||
|
|
||
| export async function createExampleKonzert(title: string) { | ||
| I.createData("optionenstore", "optionen"); | ||
| I.createData("optionenstore", "orte"); | ||
|
|
||
| const replacer = new Map<string, string>(); | ||
| replacer.set("title", title); | ||
|
|
||
| I.createDataWithReplacer("veranstaltungenstore", "Replacervorlage", replacer); | ||
| } | ||
|
|
||
| export async function goToEditKonzert(konzertTitle: string) { | ||
| I.amOnPage("/vue/veranstaltungen"); | ||
| I.waitForText(konzertTitle); | ||
|
|
||
| I.click(locate("span.ant-collapse-header-text").withText(konzertTitle)); | ||
|
|
||
| I.click(".bi-keyboard"); | ||
| I.waitForText("Allgemein"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| Feature("Konzert Gäste"); | ||
|
|
||
| Before(({ login }) => { | ||
| login("admin"); | ||
| }); | ||
|
|
||
| Scenario( | ||
| "Erstelle Gast in Gästeliste und setze alreadyIn", | ||
| async ({ konzertPage, konzertGaestePage }) => { | ||
| const konzertTitle = "GaesteBeispiel"; | ||
| await konzertPage.createExampleKonzert(konzertTitle); | ||
|
|
||
| await konzertPage.goToEditKonzert(konzertTitle); | ||
| await konzertGaestePage.goToGaestePage(); | ||
|
|
||
| const guest = { | ||
| name: "Stefan Rinderle", | ||
| comment: "Kommt später", | ||
| number: 2, | ||
| alreadyIn: 0, | ||
| }; | ||
|
|
||
| await konzertGaestePage.addGaesteListe(guest); | ||
|
|
||
| await konzertGaestePage.verifyGuestInStore(konzertTitle, guest); | ||
|
|
||
| await konzertGaestePage.setAlreadyIn(0, 1); | ||
|
|
||
| await konzertGaestePage.verifyGuestInStore(konzertTitle, { | ||
| ...guest, | ||
| alreadyIn: 1, | ||
| }); | ||
| }, | ||
| ); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keine let variablen bitte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich brauche aber eine Variable die geändert werden kann für die replacer.