-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f8b97d
commit 2ba2f9b
Showing
39 changed files
with
24,719 additions
and
19,670 deletions.
There are no files selected for viewing
This file contains 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,58 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"@antfu", | ||
"plugin:prettier/recommended", | ||
"plugin:cypress/recommended" | ||
], | ||
"plugins": [ | ||
"prettier" | ||
], | ||
"rules": { | ||
"curly": [ | ||
"error", | ||
"all" | ||
], | ||
"vue/no-setup-props-destructure": 0, | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": [ | ||
"warn", | ||
"error" | ||
] | ||
} | ||
], | ||
"unused-imports/no-unused-vars": 0, | ||
"@typescript-eslint/no-use-before-define": 0, | ||
"eqeqeq": 0, | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_" | ||
} | ||
], | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"semi": false, | ||
"quoteProps": "consistent", | ||
"bracketSpacing": true, | ||
"printWidth": 130 | ||
} | ||
], | ||
"antfu/if-newline": 0, | ||
"antfu/generic-spacing": 0, | ||
// typescript | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
// stylistic | ||
"@stylistic/ts/member-delimiter-style": "off", | ||
"@stylistic/ts/brace-style": "off", | ||
"@stylistic/js/operator-linebreak": "off", | ||
"@stylistic/ts/indent": "off" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,30 +1,30 @@ | ||
/// <reference types="cypress" /> | ||
describe('draggable', () => { | ||
beforeEach(() => { | ||
cy.visit('http://localhost:3000'); | ||
}); | ||
cy.visit('http://localhost:3000') | ||
}) | ||
|
||
it('Displays the example page and moves boxes around', () => { | ||
cy.get('#app').should('be.visible'); | ||
cy.get('#app').should('be.visible') | ||
cy.get('#app') | ||
.get('.wrapper-box') | ||
.should('have.length.at.least', 1) | ||
.should('have.class', 'revue-draggable') | ||
.each((el) => { | ||
const originalPosition = el.position(); | ||
const box = Cypress.$(el)[0]; | ||
const coords = { x: 200, y: 300 }; | ||
box.dispatchEvent(new MouseEvent('mousedown')); | ||
box.dispatchEvent(new MouseEvent('mousemove', { x: 10, y: 0 })); | ||
const originalPosition = el.position() | ||
const box = Cypress.$(el)[0] | ||
const coords = { x: 200, y: 300 } | ||
box.dispatchEvent(new MouseEvent('mousedown')) | ||
box.dispatchEvent(new MouseEvent('mousemove', { x: 10, y: 0 })) | ||
box.dispatchEvent( | ||
new MouseEvent('mousemove', { | ||
clientX: coords.x + 10, | ||
clientY: coords.y + 10 | ||
}) | ||
); | ||
expect(el.position()).exist; | ||
expect(originalPosition).not.eq(el.position()); | ||
box.dispatchEvent(new MouseEvent('mouseup')); | ||
}); | ||
}); | ||
}); | ||
clientY: coords.y + 10, | ||
}), | ||
) | ||
expect(el.position()).exist | ||
expect(originalPosition).not.eq(el.position()) | ||
box.dispatchEvent(new MouseEvent('mouseup')) | ||
}) | ||
}) | ||
}) |
This file contains 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
Oops, something went wrong.