Skip to content

Commit c629df3

Browse files
committed
Form
1 parent 1820751 commit c629df3

File tree

5 files changed

+53
-19
lines changed

5 files changed

+53
-19
lines changed

cypress/support/index.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
namespace Cypress {
2+
export interface Chainable {
3+
/**
4+
* Custom command to select DOM element by data-cy attribute.
5+
* @example cy.dataCy('greeting')
6+
*/
7+
navigate(value: string): Chainable<JQuery<HTMLElement>>;
8+
getSlateEditorAndType(value: string): Chainable<JQuery<HTMLElement>>;
9+
setSlateSelection(value: string): Chainable<JQuery<HTMLElement>>;
10+
clickSlateButton(value: string): Chainable<JQuery<HTMLElement>>;
11+
autologin(): Chainable<JQuery<HTMLElement>>;
12+
createContent({
13+
contentType,
14+
contentId,
15+
contentTitle,
16+
path,
17+
bodyModifier,
18+
preview_image_link,
19+
}: {
20+
contentType: string;
21+
contentId: string;
22+
contentTitle: string;
23+
path?: string;
24+
bodyModifier?: (body: any) => any;
25+
preview_image_link?: { '@id': string };
26+
}): Chainable<JQuery<HTMLElement>>;
27+
addNewBlock(value: string): Chainable<JQuery<HTMLElement>>;
28+
matchImage(): Chainable<JQuery<HTMLElement>>;
29+
injectAxe({
30+
axeCorePath,
31+
}: {
32+
axeCorePath: string;
33+
}): Chainable<JQuery<HTMLElement>>;
34+
checkA11y(
35+
context?: Object | string,
36+
options?: Object,
37+
violationCallback?: (violations: any[]) => void,
38+
skipFailures?: boolean,
39+
): Chainable<JQuery<HTMLElement>>;
40+
checkAccessibility(): Chainable<JQuery<HTMLElement>>;
41+
getSlate(): Chainable<JQuery<HTMLElement>>;
42+
}
43+
}

cypress/tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": ["es5", "dom"],
5+
"types": ["cypress", "@testing-library/cypress", "node"]
6+
},
7+
"include": ["**/*.ts"]
8+
}

jest-addon.config.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"build": "VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto build",
2323
"build:deps": "pnpm --filter @plone/registry --filter @plone/components build",
2424
"i18n": "pnpm --filter addons i18n",
25-
"test": "RAZZLE_JEST_CONFIG=$(pwd)/jest-addon.config.js pnpm --filter @plone/volto test",
25+
"test": "pnpm --filter @kitconcept/volto-button-block exec vitest",
2626
"lint": "VOLTOCONFIG=$(pwd)/volto.config.js eslint --max-warnings=0 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
2727
"lint:fix": "VOLTOCONFIG=$(pwd)/volto.config.js eslint --fix 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
2828
"prettier": "prettier --check 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
@@ -51,4 +51,4 @@
5151
}
5252
},
5353
"packageManager": "pnpm@9.1.1"
54-
}
54+
}

0 commit comments

Comments
 (0)