@lowdefy/blocks-basic 0.0.0-experimental-20260304094754 → 0.0.0-experimental-20260309075033

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ import { expect } from '@playwright/test';
17
+ const locator = (page, blockId)=>page.locator(`#${blockId}`);
18
+ export default createBlockHelper({
19
+ locator,
20
+ do: {
21
+ click: (page, blockId)=>locator(page, blockId).click()
22
+ },
23
+ expect: {
24
+ text: (page, blockId, text)=>expect(locator(page, blockId)).toHaveText(text),
25
+ href: (page, blockId, href)=>expect(locator(page, blockId)).toHaveAttribute('href', href)
26
+ }
27
+ });
@@ -0,0 +1,27 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ import { expect } from '@playwright/test';
17
+ const locator = (page, blockId)=>page.locator(`#${blockId}`);
18
+ export default createBlockHelper({
19
+ locator,
20
+ do: {
21
+ click: (page, blockId)=>locator(page, blockId).click()
22
+ },
23
+ expect: {
24
+ text: (page, blockId, text)=>expect(locator(page, blockId)).toHaveText(text),
25
+ containsText: (page, blockId, text)=>expect(locator(page, blockId)).toContainText(text)
26
+ }
27
+ });
@@ -0,0 +1,23 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ import { expect } from '@playwright/test';
17
+ const locator = (page, blockId)=>page.locator(`#bl-${blockId}`);
18
+ export default createBlockHelper({
19
+ locator,
20
+ expect: {
21
+ containsText: (page, blockId, text)=>expect(locator(page, blockId)).toContainText(text)
22
+ }
23
+ });
@@ -0,0 +1,23 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ import { expect } from '@playwright/test';
17
+ const locator = (page, blockId)=>page.locator(`#${blockId}`);
18
+ export default createBlockHelper({
19
+ locator,
20
+ expect: {
21
+ containsText: (page, blockId, text)=>expect(locator(page, blockId)).toContainText(text)
22
+ }
23
+ });
@@ -0,0 +1,23 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ // Icon renders an SVG without a blockId on the root element — use the block wrapper.
17
+ const locator = (page, blockId)=>page.locator(`#bl-${blockId}`);
18
+ export default createBlockHelper({
19
+ locator,
20
+ do: {
21
+ click: (page, blockId)=>locator(page, blockId).click()
22
+ }
23
+ });
@@ -0,0 +1,24 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ import { expect } from '@playwright/test';
17
+ const locator = (page, blockId)=>page.locator(`#${blockId}`);
18
+ export default createBlockHelper({
19
+ locator,
20
+ expect: {
21
+ src: (page, blockId, src)=>expect(locator(page, blockId)).toHaveAttribute('src', src),
22
+ alt: (page, blockId, alt)=>expect(locator(page, blockId)).toHaveAttribute('alt', alt)
23
+ }
24
+ });
@@ -0,0 +1,23 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ import { expect } from '@playwright/test';
17
+ const locator = (page, blockId)=>page.locator(`#${blockId}`);
18
+ export default createBlockHelper({
19
+ locator,
20
+ expect: {
21
+ itemCount: (page, blockId, count)=>expect(locator(page, blockId).locator('> div')).toHaveCount(count)
22
+ }
23
+ });
@@ -0,0 +1,26 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ import { expect } from '@playwright/test';
17
+ const locator = (page, blockId)=>page.locator(`#${blockId}`);
18
+ export default createBlockHelper({
19
+ locator,
20
+ do: {
21
+ click: (page, blockId)=>locator(page, blockId).click()
22
+ },
23
+ expect: {
24
+ text: (page, blockId, text)=>expect(locator(page, blockId)).toHaveText(text)
25
+ }
26
+ });
@@ -0,0 +1,20 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { createBlockHelper } from '@lowdefy/e2e-utils';
16
+ // Throw intentionally throws an error on render — use the block wrapper for presence checks.
17
+ const locator = (page, blockId)=>page.locator(`#bl-${blockId}`);
18
+ export default createBlockHelper({
19
+ locator
20
+ });
package/dist/e2e.js ADDED
@@ -0,0 +1,23 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export { default as Anchor } from './blocks/Anchor/e2e.js';
16
+ export { default as Box } from './blocks/Box/e2e.js';
17
+ export { default as DangerousHtml } from './blocks/DangerousHtml/e2e.js';
18
+ export { default as Html } from './blocks/Html/e2e.js';
19
+ export { default as Icon } from './blocks/Icon/e2e.js';
20
+ export { default as Img } from './blocks/Img/e2e.js';
21
+ export { default as List } from './blocks/List/e2e.js';
22
+ export { default as Span } from './blocks/Span/e2e.js';
23
+ export { default as Throw } from './blocks/Throw/e2e.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-basic",
3
- "version": "0.0.0-experimental-20260304094754",
3
+ "version": "0.0.0-experimental-20260309075033",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Basic html Lowdefy blocks.",
6
6
  "homepage": "https://lowdefy.com",
@@ -34,6 +34,7 @@
34
34
  "exports": {
35
35
  "./*": "./dist/*",
36
36
  "./blocks": "./dist/blocks.js",
37
+ "./e2e": "./dist/e2e.js",
37
38
  "./schemas": "./dist/schemas.js",
38
39
  "./types": "./dist/types.js"
39
40
  },
@@ -41,28 +42,19 @@
41
42
  "dist/*"
42
43
  ],
43
44
  "dependencies": {
44
- "@lowdefy/block-utils": "0.0.0-experimental-20260304094754",
45
- "@lowdefy/helpers": "0.0.0-experimental-20260304094754",
45
+ "@lowdefy/block-utils": "0.0.0-experimental-20260309075033",
46
+ "@lowdefy/helpers": "0.0.0-experimental-20260309075033",
46
47
  "dompurify": "3.2.4",
47
48
  "react": "18.2.0",
48
49
  "react-dom": "18.2.0"
49
50
  },
50
51
  "devDependencies": {
51
- "@emotion/jest": "11.10.5",
52
- "@lowdefy/block-dev": "0.0.0-experimental-20260304094754",
53
- "@lowdefy/block-dev-e2e": "0.0.0-experimental-20260304094754",
54
- "@lowdefy/jest-yaml-transform": "0.0.0-experimental-20260304094754",
52
+ "@lowdefy/block-dev-e2e": "0.0.0-experimental-20260309075033",
53
+ "@lowdefy/e2e-utils": "0.0.0-experimental-20260309075033",
55
54
  "@playwright/test": "1.50.1",
56
55
  "@swc/cli": "0.1.63",
57
56
  "@swc/core": "1.3.99",
58
- "@swc/jest": "0.2.29",
59
- "@testing-library/dom": "8.19.1",
60
- "@testing-library/react": "13.4.0",
61
- "@testing-library/user-event": "14.4.3",
62
- "copyfiles": "2.4.1",
63
- "jest": "28.1.3",
64
- "jest-environment-jsdom": "28.1.3",
65
- "jest-serializer-html": "7.1.0"
57
+ "copyfiles": "2.4.1"
66
58
  },
67
59
  "publishConfig": {
68
60
  "access": "public"
@@ -72,7 +64,6 @@
72
64
  "clean": "rm -rf dist",
73
65
  "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
74
66
  "e2e": "playwright test --config e2e/playwright.config.js",
75
- "e2e:ui": "playwright test --config e2e/playwright.config.js --ui",
76
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
67
+ "e2e:ui": "playwright test --config e2e/playwright.config.js --ui"
77
68
  }
78
69
  }