diff options
author | vturov <vturov@yandex-team.com> | 2024-03-22 15:22:32 +0300 |
---|---|---|
committer | vturov <vturov@yandex-team.com> | 2024-03-22 15:51:16 +0300 |
commit | 2d7d83aa28300bcd8223468f804986f08d3155ae (patch) | |
tree | 6113639d8d22153e6df21c45e510be88266b79ca /build/conf | |
parent | 37f07e5161d87439118d51f28cec342b7a26e3b8 (diff) | |
download | ydb-2d7d83aa28300bcd8223468f804986f08d3155ae.tar.gz |
playwright: Поддержать тесты Playwright в автосборке
3ab94329178d22f1c481aa6e46315949f531361d
Diffstat (limited to 'build/conf')
-rw-r--r-- | build/conf/ts/ts_test.conf | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/build/conf/ts/ts_test.conf b/build/conf/ts/ts_test.conf index cd5dc172f1..a940cafa66 100644 --- a/build/conf/ts/ts_test.conf +++ b/build/conf/ts/ts_test.conf @@ -74,6 +74,39 @@ module TS_TEST_HERMIONE_FOR: _TS_TEST_BASE { _TS_TEST_FOR_CONFIGURE(hermione .hermione.conf.js workspace_node_modules.tar) } +TS_TEST_PLAYWRIGHT_CMD=$TOUCH_UNIT \ + && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS create-node-modules --moddir $TS_TEST_FOR_PATH \ + $_NODE_MODULES_INOUTS ${hide:PEERS} \ + && ${cwd:BINDIR} $MOVE_FILE $TS_TEST_NM ${output:"workspace_node_modules.tar"} \ + ${kv;hide:"p TSPW"} ${kv;hide:"pc magenta"} + +### @usage: TS_TEST_PLAYWRIGHT_FOR(Path) +### +### Defines testing module with playwright test runner. +### +### @example +### +### TS_TEST_PLAYWRIGHT_FOR(path/to/module) +### TS_TEST_SRCS(../src) +### TS_TEST_CONFIG(../playwright.config.js) +### END() +### +module TS_TEST_PLAYWRIGHT_FOR: _TS_TEST_BASE { + .CMD=TS_TEST_PLAYWRIGHT_CMD + + # for multimodule peers we should choose TS + SET(PEERDIR_TAGS TS) + + # compatibility with old TS_TEST_SRCS + SET(TS_TEST_EXTENSION (playwright|spec).(ts|js)) + + _DEPENDS_ON_MOD() + _TS_ADD_NODE_MODULES_FOR_BUILDER() + + _PEERDIR_TS_RESOURCE(nodejs pnpm playwright) + _TS_TEST_FOR_CONFIGURE(playwright playwright.config.ts workspace_node_modules.tar) +} + module _TS_TEST_BASE: _BARE_UNIT { # ignore SRCS macro .ALIASES=SRCS=_NOOP_MACRO |