Skip to content

Commit

Permalink
Fix cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Clauderic Demers committed Jun 22, 2021
1 parent 406c81f commit b5d7813
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"$schema": "https://on.cypress.io/cypress.schema.json",
"supportFile": "cypress/support/index.ts",
"projectId": "zkn9qu",
"baseUrl": "http://localhost:6006/"
"baseUrl": "http://localhost:6006/",
"viewportHeight": 1000
}
16 changes: 13 additions & 3 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,20 @@ Cypress.Commands.add(

cy.wrap(subject, {log: false})
.focus({log: false})
.type(Keys.Space, {force: true, log: false})
.type(Keys.Space, {
delay: 150,
scrollBehavior: false,
force: true,
log: false,
})
.closest('body')
.type(arrowKey.repeat(times), {delay: 150, force: true})
.type(Keys.Space, {log: false, force: true});
.type(arrowKey.repeat(times), {
scrollBehavior: false,
delay: 150,
force: true,
})
.wait(150)
.type(Keys.Space, {scrollBehavior: false, log: false, force: true});
}
);

Expand Down
2 changes: 0 additions & 2 deletions stories/2 - Presets/Sortable/3-Grid.story.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import {LayoutMeasuringStrategy} from '@dnd-kit/core';
import {restrictToWindowEdges} from '@dnd-kit/modifiers';
import {
AnimateLayoutChanges,
defaultAnimateLayoutChanges,
Expand All @@ -22,7 +21,6 @@ const props: Partial<SortableProps> = {
width: 140,
height: 140,
}),
modifiers: [restrictToWindowEdges],
};

export const BasicSetup = () => <Sortable {...props} />;
Expand Down

0 comments on commit b5d7813

Please sign in to comment.