blob: c0b4869eac7e90ffad133e378bd89fe55d0e270c [file] [log] [blame]
load("//infra-sk:index.bzl", "karma_test", "sk_demo_page_server", "sk_element", "sk_element_puppeteer_test", "sk_page", "ts_library")
load("//golden/demo-page-assets:index.bzl", "GOLD_DEMO_PAGE_ASSETS")
sk_demo_page_server(
name = "demo_page_server",
sk_page = ":image-compare-sk-demo",
static_assets = GOLD_DEMO_PAGE_ASSETS,
)
sk_element(
name = "image-compare-sk",
sass_deps = ["//infra-sk:elements-sk_scss"],
sass_srcs = ["image-compare-sk.scss"],
sk_element_deps = ["//golden/modules/multi-zoom-sk"],
ts_deps = [
"//golden/modules:common_ts_lib",
"//infra-sk/modules/ElementSk:index_ts_lib",
"@npm//@types/dialog-polyfill",
"@npm//dialog-polyfill",
"@npm//elements-sk",
"@npm//lit-html",
],
ts_srcs = [
"image-compare-sk.ts",
"index.ts",
],
visibility = ["//visibility:public"],
)
sk_page(
name = "image-compare-sk-demo",
html_file = "image-compare-sk-demo.html",
sk_element_deps = [":image-compare-sk"],
ts_deps = ["@npm//common-sk"],
ts_entry_point = "image-compare-sk-demo.ts",
)
ts_library(
name = "image-compare-sk_po_ts_lib",
srcs = ["image-compare-sk_po.ts"],
visibility = ["//visibility:public"],
deps = [
"//golden/modules/multi-zoom-sk:multi-zoom-sk_po_ts_lib",
"//infra-sk/modules/page_object:page_object_element_ts_lib",
"//infra-sk/modules/page_object:page_object_ts_lib",
],
)
sk_element_puppeteer_test(
name = "image-compare-sk_puppeteer_test",
src = "image-compare-sk_puppeteer_test.ts",
sk_demo_page_server = ":demo_page_server",
deps = [
":image-compare-sk_po_ts_lib",
"//puppeteer-tests:util_ts_lib",
"@npm//@types/chai",
"@npm//chai",
],
)
karma_test(
name = "image-compare-sk_test",
src = "image-compare-sk_test.ts",
deps = [
":image-compare-sk",
":image-compare-sk_po_ts_lib",
"//infra-sk/modules:test_util_ts_lib",
"@npm//@types/chai",
"@npm//chai",
],
)