@lowdefy/block-dev-e2e 0.0.0-experimental-20260220142815 → 0.0.0-experimental-20260220143146
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.
- package/dist/createPlaywrightConfig.js +4 -6
- package/dist/getBlock.js +20 -0
- package/dist/index.js +2 -5
- package/package.json +2 -3
|
@@ -14,20 +14,18 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import path from 'path';
|
|
16
16
|
import { defineConfig, devices } from '@playwright/test';
|
|
17
|
-
function createPlaywrightConfig({ packageDir, port = 3001 }) {
|
|
17
|
+
function createPlaywrightConfig({ packageDir, port = 3001, testMatch = '**/tests/*.e2e.spec.js' }) {
|
|
18
18
|
const e2eDir = path.join(packageDir, 'e2e');
|
|
19
19
|
const appDir = path.join(e2eDir, 'app');
|
|
20
|
+
const srcDir = path.join(packageDir, 'src');
|
|
20
21
|
// Calculate paths relative to monorepo root
|
|
21
22
|
// packageDir is like: /path/to/lowdefy/packages/plugins/blocks/blocks-basic
|
|
22
23
|
const monorepoRoot = path.resolve(packageDir, '../../../../');
|
|
23
24
|
const cliPath = path.join(monorepoRoot, 'packages/cli/dist/index.js');
|
|
24
25
|
const serverDir = path.join(monorepoRoot, 'packages/servers/server');
|
|
25
26
|
return defineConfig({
|
|
26
|
-
testDir:
|
|
27
|
-
testMatch
|
|
28
|
-
'src/**/tests/*.e2e.spec.js',
|
|
29
|
-
'e2e/tests/*.e2e.spec.js'
|
|
30
|
-
],
|
|
27
|
+
testDir: srcDir,
|
|
28
|
+
testMatch,
|
|
31
29
|
fullyParallel: true,
|
|
32
30
|
reporter: 'list',
|
|
33
31
|
outputDir: path.join(e2eDir, 'test-results'),
|
package/dist/getBlock.js
ADDED
|
@@ -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
|
+
*/ function getBlock(page, blockId) {
|
|
16
|
+
// Use the framework-provided wrapper ID (bl-{blockId}) which is guaranteed
|
|
17
|
+
// to exist for all block types, applied by BlockLayout in packages/client
|
|
18
|
+
return page.locator(`#bl-${blockId}`);
|
|
19
|
+
}
|
|
20
|
+
export default getBlock;
|
package/dist/index.js
CHANGED
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export { default as
|
|
17
|
-
// Re-export shared helpers from e2e-utils
|
|
18
|
-
export { getBlock } from '@lowdefy/e2e-utils';
|
|
19
|
-
// Keep navigateToTestPage as it's specific to monorepo test structure
|
|
15
|
+
*/ export { default as createPlaywrightConfig } from './createPlaywrightConfig.js';
|
|
16
|
+
export { default as getBlock } from './getBlock.js';
|
|
20
17
|
export { default as navigateToTestPage } from './navigateToTestPage.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/block-dev-e2e",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260220143146",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy Block E2E Testing Tools",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"contributors": [
|
|
17
17
|
{
|
|
18
|
-
"name": "Machiel
|
|
18
|
+
"name": "Machiel",
|
|
19
19
|
"url": "https://github.com/machielvdw"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"dist/*"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@lowdefy/e2e-utils": "0.0.0-experimental-20260220142815",
|
|
33
32
|
"@playwright/test": "1.50.1"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|