blob: c00b578e180078b1071d8aa05c0cc32c0d3cf49a [file] [log] [blame]
load("//infra-sk:index.bzl", "karma_test", "sk_demo_page_server", "sk_element", "sk_element_puppeteer_test", "sk_page", "ts_library")
sk_demo_page_server(
name = "demo_page_server",
sk_page = ":list-page-sk-demo",
)
sk_element(
name = "list-page-sk",
sass_deps = ["//infra-sk:elements-sk_scss"],
sass_srcs = ["list-page-sk.scss"],
sk_element_deps = [
"//golden/modules/corpus-selector-sk",
"//golden/modules/query-dialog-sk",
"//golden/modules/search-controls-sk",
"//golden/modules/sort-toggle-sk",
],
ts_deps = [
"//golden/modules:common_ts_lib",
"//golden/modules:rpc_types_ts_lib",
"//golden/modules:settings_ts_lib",
"//infra-sk/modules/ElementSk:index_ts_lib",
"@npm//common-sk",
"@npm//elements-sk",
"@npm//lit-html",
],
ts_srcs = [
"index.ts",
"list-page-sk.ts",
],
visibility = ["//visibility:public"],
)
sk_page(
name = "list-page-sk-demo",
html_file = "list-page-sk-demo.html",
sk_element_deps = [
"//golden/modules/gold-scaffold-sk",
":list-page-sk",
],
ts_deps = [
"//golden/modules/last-commit-sk:demo_data_ts_lib",
"//golden/modules:demo_util_ts_lib",
"//golden/modules:settings_ts_lib",
"//golden/modules:shared_demo_data_ts_lib",
":test_data_ts_lib",
"@npm//fetch-mock",
],
ts_entry_point = "list-page-sk-demo.ts",
)
sk_element_puppeteer_test(
name = "list-page-sk_puppeteer_test",
src = "list-page-sk_puppeteer_test.ts",
sk_demo_page_server = ":demo_page_server",
deps = [
"//puppeteer-tests:util_ts_lib",
"@npm//@types/chai",
"@npm//chai",
"@npm//puppeteer",
],
)
karma_test(
name = "list-page-sk_test",
src = "list-page-sk_test.ts",
deps = [
":list-page-sk",
":test_data_ts_lib",
"//golden/modules:settings_ts_lib",
"//golden/modules/corpus-selector-sk",
"//golden/modules/corpus-selector-sk:corpus-selector-sk_po_ts_lib",
"//golden/modules/query-dialog-sk",
"//golden/modules/query-dialog-sk:query-dialog-sk_po_ts_lib",
"//infra-sk/modules:test_util_ts_lib",
"@npm//@types/chai",
"@npm//chai",
"@npm//common-sk",
"@npm//fetch-mock",
],
)
ts_library(
name = "test_data_ts_lib",
srcs = ["test_data.ts"],
visibility = ["//visibility:public"],
deps = ["//golden/modules:rpc_types_ts_lib"],
)