Skip to content

Commit

Permalink
cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianTurner committed Jul 4, 2024
1 parent 3e91bba commit 61f2a81
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
21 changes: 11 additions & 10 deletions apps/party-time-frontend-17/-e2e/src/e2e/F003.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ const requirement = 'F003';
const deleteEvents = 'Events löschen';
describe(deleteEvents, () => {
beforeEach(() => {
cy.visit('/');
cy.viewport(1920, 1080);
cy.login();
cy.visit('/events');
cy.screenshot(
getScreenshotPath(requirement, deleteEvents, "1"),
{
overwrite: true,
}
);
});

const deleteEvent =
'Veranstalter können ein Event löschen, indem sie auf der Plattform auf das entsprechende Event zugreifen und die Option "Löschen" auswählen.';
it(deleteEvent, () => {
cy.screenshot(getScreenshotPath(requirement, deleteEvents, deleteEvent), {
overwrite: true,
});
});

const eventDeletionTest =
'Das Event wird dann dauerhaft von der Plattform entfernt.';
it(eventDeletionTest, () => {
cy.get('[data-cy="delete-button"]').first().click();
cy.screenshot(
getScreenshotPath(requirement, deleteEvents, eventDeletionTest),
getScreenshotPath(requirement, deleteEvents, "2"),
{
overwrite: true,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import { MatDividerModule } from '@angular/material/divider';
<button
mat-mini-fab
color="warn"
data-cy="delete-button"
(click)="onDeleteClicked(eventDetails.id)"
>
<mat-icon fontIcon="delete"></mat-icon>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61f2a81

Please sign in to comment.