Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoCa96 committed Sep 17, 2024
1 parent e58ff5d commit fe9eda1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@ test.describe("screenshot tests", () => {

test("should behave correctly", async ({ mount }) => {
// ARRANGE
let clickEventCount = 0;

const component = await mount(GridElement, {
props: {
label: "Label",
columnCount: 2,
},
on: {
click: () => clickEventCount++,
},
});

// ACT
Expand All @@ -50,7 +46,7 @@ test("should behave correctly", async ({ mount }) => {
// ASSERT
await expect(component).toHaveClass(/onyx-grid-span-2/);
await expect(component).toHaveAccessibleName("Label");
expect(clickEventCount).toBe(1);
await expect(component).toBeEnabled();

// ARRANGE
await component.update({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const currentBreakpoint = computed(() => {
<EditGridElementDialog
:open="isAddDialogOpen"
@close="isAddDialogOpen = false"
@submit="
@apply="
gridElements.push($event);
isAddDialogOpen = false;
"
Expand All @@ -238,7 +238,7 @@ const currentBreakpoint = computed(() => {
gridElementIndexToEdit != undefined ? gridElements[gridElementIndexToEdit] : undefined
"
@close="closeEdit"
@submit="updateElement(gridElementIndexToEdit!, $event)"
@apply="updateElement(gridElementIndexToEdit!, $event)"
@delete="deleteElement(gridElementIndexToEdit!)"
/>
</div>
Expand Down

0 comments on commit fe9eda1

Please sign in to comment.