@angular-wave/angular.ts 0.0.37 → 0.0.39
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/Makefile +6 -5
- package/dist/angular-ts.esm.js +2 -1
- package/dist/angular-ts.umd.js +1 -1
- package/package.json +2 -4
- package/rollup.config.js +5 -1
- package/src/binding.spec.js +4 -4
- package/src/core/location/location.js +1 -1
- package/src/core/scope/scope.js +4 -7
- package/src/exts/aria/aria.html +1 -4
- package/src/exts/messages/messages.html +1 -4
- package/src/index.js +307 -1
- package/src/loader.js +13 -6
- package/src/public.js +7 -2
- package/src/router/directives/directives.test.js +19 -0
- package/src/router/directives/state-directives.html +21 -0
- package/src/router/{state-directives.spec.js → directives/state-directives.spec.js} +2 -1
- package/src/router/{view-directive.spec.js → directives/view-directive.spec.js} +2 -1
- package/src/router/directives/view-directives.html +21 -0
- package/src/router/router.html +22 -0
- package/src/router/router.test.js +11 -0
- package/src/router/services.spec.js +2 -2
- package/src/router/{state-builder.spec.js → state/state-builder.spec.js} +9 -12
- package/src/router/state/state.html +22 -0
- package/src/router/{state.spec.js → state/state.spec.js} +1 -1
- package/src/router/state/state.test.js +11 -0
- package/src/router/state-filter.spec.js +2 -2
- package/src/router/template-factory.spec.js +4 -4
- package/src/router/url/url.html +18 -0
- package/src/router/url/url.test.js +11 -0
- package/src/router/view/view.html +18 -0
- package/src/router/{view.spec.js → view/view.spec.js} +1 -1
- package/src/router/view/view.test.js +11 -0
- package/src/router/view-hook.spec.js +4 -4
- package/src/router/view-scroll.spec.js +4 -4
- package/src/services/http/http.html +22 -0
- package/src/services/http/http.test.js +11 -0
- package/src/services/http-backend/http-backend.html +21 -0
- package/src/services/http-backend/http-backend.js +1 -1
- package/src/services/http-backend/http-backend.spec.js +1 -1
- package/src/services/http-backend/http-backend.test.js +11 -0
- package/src/shared/common.spec.js +4 -4
- package/src/shared/hof.spec.js +1 -1
- package/src/shared/min-err.spec.js +2 -2
- package/src/shared/shared.html +22 -0
- package/src/shared/shared.test.js +11 -0
- package/src/shared/test-utils.js +2 -2
- package/src/shared/utils.spec.js +1 -1
- package/src/src.html +22 -0
- package/src/src.test.js +10 -0
- package/tsconfig.json +1 -1
- package/tsconfig.types.json +11 -0
- package/types/animations/animate-cache.d.ts +7 -7
- package/types/animations/animate-children-directive.d.ts +3 -6
- package/types/animations/animate-swap.d.ts +7 -16
- package/types/animations/animation.d.ts +2 -11
- package/types/animations/raf-scheduler.d.ts +3 -3
- package/types/animations/shared.d.ts +8 -23
- package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
- package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
- package/types/core/compile/compile.d.ts +173 -0
- package/types/core/controller/controller.d.ts +32 -0
- package/types/core/exception-handler.d.ts +1 -1
- package/types/core/filter/filter.d.ts +9 -0
- package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
- package/types/core/interval/interval-factory.d.ts +4 -0
- package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
- package/types/core/location/location.d.ts +209 -0
- package/types/core/pubsub/pubsub.d.ts +156 -0
- package/types/core/q/q.d.ts +31 -0
- package/types/core/sanitize/sanitize-uri.d.ts +53 -0
- package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
- package/types/core/scope/scope.d.ts +727 -0
- package/types/core/task-tracker-factory.d.ts +29 -29
- package/types/core/timeout/timeout.d.ts +20 -0
- package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
- package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
- package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
- package/types/directive/controller/controller.d.ts +6 -0
- package/types/directive/events/events.d.ts +5 -0
- package/types/directive/form/form.d.ts +200 -0
- package/types/directive/if/if.d.ts +8 -0
- package/types/directive/include/include.d.ts +14 -0
- package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
- package/types/directive/{model.d.ts → model/model.d.ts} +256 -279
- package/types/directive/options/options.d.ts +9 -0
- package/types/directive/ref/ref.d.ts +5 -0
- package/types/directive/repeat/repeat.d.ts +8 -0
- package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
- package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
- package/types/directive/switch/switch.d.ts +17 -0
- package/types/directive/transclude/transclude.d.ts +4 -0
- package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
- package/types/filters/filters.d.ts +10 -16
- package/types/filters/order-by.d.ts +2 -4
- package/types/index.d.ts +117 -0
- package/types/injector.d.ts +12 -0
- package/types/public.d.ts +5 -0
- package/types/router/common/coreservices.d.ts +2 -2
- package/types/router/common/glob.d.ts +9 -9
- package/types/router/common/queue.d.ts +13 -13
- package/types/router/common/trace.d.ts +43 -43
- package/types/router/directives/view-directive.d.ts +13 -32
- package/types/router/globals.d.ts +20 -20
- package/types/router/hooks/lazy-load.d.ts +2 -11
- package/types/router/hooks/redirect-to.d.ts +1 -4
- package/types/router/hooks/url.d.ts +1 -5
- package/types/router/hooks/views.d.ts +1 -4
- package/types/router/params/param-factory.d.ts +5 -5
- package/types/router/params/param-type.d.ts +35 -35
- package/types/router/params/param-types.d.ts +11 -11
- package/types/router/params/param.d.ts +38 -38
- package/types/router/params/state-params.d.ts +10 -10
- package/types/router/path/path-node.d.ts +34 -34
- package/types/router/path/path-utils.d.ts +73 -77
- package/types/router/resolve/resolvable.d.ts +32 -32
- package/types/router/resolve/resolve-context.d.ts +84 -84
- package/types/router/services.d.ts +4 -9
- package/types/router/state/state-builder.d.ts +27 -27
- package/types/router/state/state-matcher.d.ts +5 -5
- package/types/router/state/state-object.d.ts +58 -58
- package/types/router/state/state-queue-manager.d.ts +10 -16
- package/types/router/state/state-registry.d.ts +100 -107
- package/types/router/state/state-service.d.ts +411 -411
- package/types/router/state/target-state.d.ts +64 -69
- package/types/router/state/views.d.ts +31 -37
- package/types/router/state-filters.d.ts +7 -7
- package/types/router/state-provider.d.ts +105 -105
- package/types/router/template-factory.d.ts +83 -112
- package/types/router/transition/hook-builder.d.ts +25 -25
- package/types/router/transition/hook-registry.d.ts +68 -83
- package/types/router/transition/interface.d.ts +7 -7
- package/types/router/transition/reject-factory.d.ts +34 -34
- package/types/router/transition/transition-event-type.d.ts +9 -18
- package/types/router/transition/transition-hook.d.ts +77 -82
- package/types/router/transition/transition-service.d.ts +82 -99
- package/types/router/transition/transition.d.ts +369 -377
- package/types/router/url/url-config.d.ts +84 -84
- package/types/router/url/url-matcher.d.ts +115 -119
- package/types/router/url/url-rule.d.ts +114 -124
- package/types/router/url/url-rules.d.ts +217 -217
- package/types/router/url/url-service.d.ts +264 -269
- package/types/router/view/view.d.ts +114 -117
- package/types/router/view-scroll.d.ts +2 -2
- package/types/services/anchor-scroll.d.ts +2 -8
- package/types/services/browser.d.ts +122 -130
- package/types/services/cache-factory.d.ts +25 -25
- package/types/services/cookie-reader.d.ts +2 -2
- package/types/services/document.d.ts +2 -2
- package/types/services/http/http.d.ts +145 -0
- package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
- package/types/services/log.d.ts +49 -49
- package/types/services/template-request.d.ts +44 -53
- package/types/shared/common.d.ts +4 -19
- package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
- package/types/shared/hof.d.ts +1 -1
- package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +11 -11
- package/types/shared/test-utils.d.ts +11 -0
- package/types/shared/utils.d.ts +7 -24
- package/types-back/global.d.ts +3 -1
- package/types-back/index.d.ts +2 -221
- package/types/core/compile.d.ts +0 -206
- package/types/core/controller.d.ts +0 -42
- package/types/core/filter.d.ts +0 -9
- package/types/core/interval-factory.d.ts +0 -21
- package/types/core/location.d.ts +0 -234
- package/types/core/pubsub.d.ts +0 -164
- package/types/core/q.d.ts +0 -33
- package/types/core/root-scope.d.ts +0 -754
- package/types/core/sanitize-uri.d.ts +0 -57
- package/types/core/timeout.d.ts +0 -31
- package/types/directive/controller.d.ts +0 -6
- package/types/directive/events.d.ts +0 -12
- package/types/directive/form.d.ts +0 -230
- package/types/directive/if.d.ts +0 -17
- package/types/directive/include.d.ts +0 -33
- package/types/directive/options.d.ts +0 -16
- package/types/directive/ref.d.ts +0 -11
- package/types/directive/repeat.d.ts +0 -23
- package/types/directive/switch.d.ts +0 -23
- package/types/directive/transclude.d.ts +0 -15
- package/types/services/http.d.ts +0 -157
- /package/src/router/{url-service.spec.js → url/url-service.spec.js} +0 -0
- /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
- /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
- /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
- /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
- /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
- /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
- /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
- /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
- /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { StateBuilder } from "../../router/state/
|
|
1
|
+
import { StateBuilder } from "../../router/state/state-builder";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// TODO refactor this to url service
|
|
4
|
+
xdescribe("StateBuilder", function () {
|
|
4
5
|
const parent = { name: "" };
|
|
5
6
|
let builder,
|
|
6
7
|
matcher,
|
|
@@ -15,7 +16,7 @@ describe("Ng1 StateBuilder", function () {
|
|
|
15
16
|
builder.builder("views", ng1ViewsBuilder);
|
|
16
17
|
});
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
xit("should use the state object to build a default view, when no `views` property is found", function () {
|
|
19
20
|
const config = {
|
|
20
21
|
url: "/foo",
|
|
21
22
|
templateUrl: "/foo.html",
|
|
@@ -34,7 +35,7 @@ describe("Ng1 StateBuilder", function () {
|
|
|
34
35
|
);
|
|
35
36
|
});
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
xit("It should use the views object to build views, when defined", function () {
|
|
38
39
|
const config = { a: { foo: "bar", controller: "FooController" } };
|
|
39
40
|
const builtViews = builder.builder("views")({
|
|
40
41
|
parent: parent,
|
|
@@ -44,9 +45,7 @@ describe("Ng1 StateBuilder", function () {
|
|
|
44
45
|
expect(builtViews.a.controller).toEqual(config.a.controller);
|
|
45
46
|
});
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
$injector,
|
|
49
|
-
) {
|
|
48
|
+
xit("should not allow a view config with both component and template keys", function () {
|
|
50
49
|
const config = {
|
|
51
50
|
name: "foo",
|
|
52
51
|
url: "/foo",
|
|
@@ -68,14 +67,12 @@ describe("Ng1 StateBuilder", function () {
|
|
|
68
67
|
expect(() =>
|
|
69
68
|
builder.builder("views")(Object.assign({ bindings: {} }, config)),
|
|
70
69
|
).toThrow();
|
|
71
|
-
})
|
|
70
|
+
});
|
|
72
71
|
|
|
73
|
-
it("should replace a resolve: string value with a function that injects the service of the same name",
|
|
74
|
-
$injector,
|
|
75
|
-
) {
|
|
72
|
+
it("should replace a resolve: string value with a function that injects the service of the same name", function () {
|
|
76
73
|
const config = { resolve: { foo: "bar" } };
|
|
77
74
|
expect(builder.builder("resolvables")).toBeDefined();
|
|
78
75
|
const built = builder.builder("resolvables")(config);
|
|
79
76
|
expect(built[0].deps).toEqual(["bar"]);
|
|
80
|
-
})
|
|
77
|
+
});
|
|
81
78
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script
|
|
14
|
+
type="module"
|
|
15
|
+
src="/src/router/state/state-builder.spec.js"
|
|
16
|
+
></script>
|
|
17
|
+
<script type="module" src="/src/router/state/state.spec.js"></script>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="dummy"></div>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -2,7 +2,7 @@ import { dealoc, jqLite } from "../../shared/jqlite/jqlite";
|
|
|
2
2
|
import { Angular } from "../../loader";
|
|
3
3
|
import { publishExternalAPI } from "../../public";
|
|
4
4
|
import { isFunction } from "../../shared/utils";
|
|
5
|
-
import { wait } from "
|
|
5
|
+
import { wait } from "../../shared/test-utils";
|
|
6
6
|
|
|
7
7
|
describe("$state", () => {
|
|
8
8
|
let $injector, template, ctrlName, $provide, $compile, module, $stateRegistry;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
const TEST_URL = "src/router/state/state.html";
|
|
4
|
+
|
|
5
|
+
test("unit tests contain no errors", async ({ page }) => {
|
|
6
|
+
await page.goto(TEST_URL);
|
|
7
|
+
await page.content();
|
|
8
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
9
|
+
/0 failures/,
|
|
10
|
+
);
|
|
11
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Angular } from "
|
|
2
|
-
import { publishExternalAPI } from "
|
|
1
|
+
import { Angular } from "../loader";
|
|
2
|
+
import { publishExternalAPI } from "../public";
|
|
3
3
|
|
|
4
4
|
describe("router filters", function () {
|
|
5
5
|
let module, $parse, $state, $q, $rootScope, $location;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { dealoc, jqLite } from "
|
|
2
|
-
import { Angular } from "
|
|
3
|
-
import { publishExternalAPI } from "
|
|
4
|
-
import { wait } from "../test-utils";
|
|
1
|
+
import { dealoc, jqLite } from "../shared/jqlite/jqlite";
|
|
2
|
+
import { Angular } from "../loader";
|
|
3
|
+
import { publishExternalAPI } from "../public";
|
|
4
|
+
import { wait } from "../shared/test-utils";
|
|
5
5
|
|
|
6
6
|
describe("templateFactory", () => {
|
|
7
7
|
let $injector,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script type="module" src="/src/router/url/url-service.spec.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div id="dummy"></div>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
const TEST_URL = "src/router/url/url.html";
|
|
4
|
+
|
|
5
|
+
test("unit tests contain no errors", async ({ page }) => {
|
|
6
|
+
await page.goto(TEST_URL);
|
|
7
|
+
await page.content();
|
|
8
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
9
|
+
/0 failures/,
|
|
10
|
+
);
|
|
11
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script type="module" src="/src/router/view/view.spec.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div id="dummy"></div>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import { PathNode } from "../../router/path/path-node";
|
|
14
14
|
import { PathUtils } from "../../router/path/path-utils";
|
|
15
15
|
import { tail } from "../../shared/common";
|
|
16
|
-
import { wait } from "
|
|
16
|
+
import { wait } from "../../shared/test-utils";
|
|
17
17
|
|
|
18
18
|
describe("view", () => {
|
|
19
19
|
let scope,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
const TEST_URL = "src/router/view/view.html";
|
|
4
|
+
|
|
5
|
+
test("unit tests contain no errors", async ({ page }) => {
|
|
6
|
+
await page.goto(TEST_URL);
|
|
7
|
+
await page.content();
|
|
8
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
9
|
+
/0 failures/,
|
|
10
|
+
);
|
|
11
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { dealoc
|
|
2
|
-
import { Angular } from "
|
|
3
|
-
import { publishExternalAPI } from "
|
|
4
|
-
import { wait } from "../test-utils";
|
|
1
|
+
import { dealoc } from "../shared/jqlite/jqlite";
|
|
2
|
+
import { Angular } from "../loader";
|
|
3
|
+
import { publishExternalAPI } from "../public";
|
|
4
|
+
import { wait } from "../shared/test-utils";
|
|
5
5
|
|
|
6
6
|
describe("view hooks", () => {
|
|
7
7
|
let app,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { dealoc
|
|
2
|
-
import { Angular } from "
|
|
3
|
-
import { publishExternalAPI } from "
|
|
4
|
-
import { wait } from "../test-utils";
|
|
1
|
+
import { dealoc } from "../shared/jqlite/jqlite";
|
|
2
|
+
import { Angular } from "../loader";
|
|
3
|
+
import { publishExternalAPI } from "../public";
|
|
4
|
+
import { wait } from "../shared/test-utils";
|
|
5
5
|
|
|
6
6
|
describe("ngView", () => {
|
|
7
7
|
describe("scrollIntoView", () => {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script type="module" src="/src/services/http/http.spec.js"></script>
|
|
14
|
+
<script
|
|
15
|
+
type="module"
|
|
16
|
+
src="/src/services/http/template-request.spec.js"
|
|
17
|
+
></script>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="dummy"></div>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
const TEST_URL = "src/services/http/http.html";
|
|
4
|
+
|
|
5
|
+
test("unit tests contain no errors", async ({ page }) => {
|
|
6
|
+
await page.goto(TEST_URL);
|
|
7
|
+
await page.content();
|
|
8
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
9
|
+
/0 failures/,
|
|
10
|
+
);
|
|
11
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script
|
|
14
|
+
type="module"
|
|
15
|
+
src="/src/services/http-backend/http-backend.spec.js"
|
|
16
|
+
></script>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<div id="dummy"></div>
|
|
20
|
+
</body>
|
|
21
|
+
</html>
|
|
@@ -201,7 +201,7 @@ export function createHttpBackend($browser, createXhr, $browserDefer) {
|
|
|
201
201
|
) {
|
|
202
202
|
// cancel timeout and subsequent timeout promise resolution
|
|
203
203
|
if (isDefined(timeoutId)) {
|
|
204
|
-
$
|
|
204
|
+
$browser.cancel(timeoutId);
|
|
205
205
|
}
|
|
206
206
|
xhr = null;
|
|
207
207
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createInjector } from "../../injector";
|
|
2
2
|
import { publishExternalAPI } from "../../public";
|
|
3
|
-
import { createHttpBackend } from "
|
|
3
|
+
import { createHttpBackend } from "./http-backend";
|
|
4
4
|
import sinon from "sinon";
|
|
5
5
|
|
|
6
6
|
describe("$httpBackend", () => {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
const TEST_URL = "src/services/http-backend/http-backend.html";
|
|
4
|
+
|
|
5
|
+
test("unit tests contain no errors", async ({ page }) => {
|
|
6
|
+
await page.goto(TEST_URL);
|
|
7
|
+
await page.content();
|
|
8
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
9
|
+
/0 failures/,
|
|
10
|
+
);
|
|
11
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defaults, filter, map, mapObj, pick } from "
|
|
2
|
-
import { is, eq, not, pattern, val } from "
|
|
3
|
-
import { isInjectable } from "
|
|
4
|
-
import { Queue } from "
|
|
1
|
+
import { defaults, filter, map, mapObj, pick } from "./common";
|
|
2
|
+
import { is, eq, not, pattern, val } from "./hof";
|
|
3
|
+
import { isInjectable } from "./predicates";
|
|
4
|
+
import { Queue } from "../router/common/queue";
|
|
5
5
|
|
|
6
6
|
describe("common", function () {
|
|
7
7
|
describe("filter", function () {
|
package/src/shared/hof.spec.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { minErr, isDefined, toDebugString } from "./
|
|
2
|
-
import { errorHandlingConfig } from "
|
|
1
|
+
import { minErr, isDefined, toDebugString } from "./utils";
|
|
2
|
+
import { errorHandlingConfig } from "../loader";
|
|
3
3
|
|
|
4
4
|
describe("errors", () => {
|
|
5
5
|
afterEach(() => {});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script type="module" src="/src/shared/common.spec.js"></script>
|
|
14
|
+
<script type="module" src="/src/shared/hof.spec.js"></script>
|
|
15
|
+
<script type="module" src="/src/shared/min-err.spec.js"></script>
|
|
16
|
+
<script type="module" src="/src/shared/strings.spec.js"></script>
|
|
17
|
+
<script type="module" src="/src/shared/utils.spec.js"></script>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="dummy"></div>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
const TEST_URL = "src/shared/shared.html";
|
|
4
|
+
|
|
5
|
+
test("unit tests contain no errors", async ({ page }) => {
|
|
6
|
+
await page.goto(TEST_URL);
|
|
7
|
+
await page.content();
|
|
8
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
9
|
+
/0 failures/,
|
|
10
|
+
);
|
|
11
|
+
});
|
package/src/shared/test-utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jqLite } from "
|
|
1
|
+
import { jqLite } from "./jqlite/jqlite";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @param {HTMLElement} element
|
|
@@ -16,5 +16,5 @@ export function browserTrigger(element, event) {
|
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
18
|
export function wait(t) {
|
|
19
|
-
return new Promise((resolve
|
|
19
|
+
return new Promise((resolve) => setTimeout(resolve, t));
|
|
20
20
|
}
|
package/src/shared/utils.spec.js
CHANGED
package/src/src.html
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script type="module" src="/src/angular.spec.js"></script>
|
|
14
|
+
<script type="module" src="/src/binding.spec.js"></script>
|
|
15
|
+
<script type="module" src="/src/injector.spec.js"></script>
|
|
16
|
+
<script type="module" src="/src/loader.spec.js"></script>
|
|
17
|
+
<script type="module" src="/src/public.spec.js"></script>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="dummy"></div>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
package/src/src.test.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
test("unitstate-directives tests contain no errors", async ({ page }) => {
|
|
4
|
+
await page.goto("src/src.html");
|
|
5
|
+
await page.content();
|
|
6
|
+
await page.waitForTimeout(6000);
|
|
7
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
8
|
+
/0 failures/,
|
|
9
|
+
);
|
|
10
|
+
});
|
package/tsconfig.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export function animateCache(): {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
cacheKey(node: any, method: any, addClass: any, removeClass: any): string;
|
|
3
|
+
containsCachedAnimationWithoutDuration(key: any): boolean;
|
|
4
|
+
flush(): void;
|
|
5
|
+
count(key: any): any;
|
|
6
|
+
get(key: any): any;
|
|
7
|
+
put(key: any, value: any, isValid: any): void;
|
|
8
8
|
};
|
|
9
9
|
export function $$AnimateCacheProvider(): void;
|
|
10
10
|
export class $$AnimateCacheProvider {
|
|
11
|
-
|
|
11
|
+
$get: (typeof animateCache)[];
|
|
12
12
|
}
|
|
@@ -76,9 +76,6 @@
|
|
|
76
76
|
</file>
|
|
77
77
|
</example>
|
|
78
78
|
*/
|
|
79
|
-
export const $$AnimateChildrenDirective: (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
link(scope: any, element: any, attrs: any): void;
|
|
83
|
-
})
|
|
84
|
-
)[];
|
|
79
|
+
export const $$AnimateChildrenDirective: (string | (($interpolate: any) => {
|
|
80
|
+
link(scope: any, element: any, attrs: any): void;
|
|
81
|
+
}))[];
|
|
@@ -85,19 +85,10 @@
|
|
|
85
85
|
* </file>
|
|
86
86
|
* </example>
|
|
87
87
|
*/
|
|
88
|
-
export const ngAnimateSwapDirective: (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
link(
|
|
96
|
-
scope: any,
|
|
97
|
-
$element: any,
|
|
98
|
-
attrs: any,
|
|
99
|
-
ctrl: any,
|
|
100
|
-
$transclude: any,
|
|
101
|
-
): void;
|
|
102
|
-
})
|
|
103
|
-
)[];
|
|
88
|
+
export const ngAnimateSwapDirective: (string | (($animate: any) => {
|
|
89
|
+
restrict: string;
|
|
90
|
+
transclude: string;
|
|
91
|
+
terminal: boolean;
|
|
92
|
+
priority: number;
|
|
93
|
+
link(scope: any, $element: any, attrs: any, ctrl: any, $transclude: any): void;
|
|
94
|
+
}))[];
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
export function $$AnimationProvider(): void;
|
|
2
2
|
export class $$AnimationProvider {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
| string
|
|
6
|
-
| ((
|
|
7
|
-
$rootScope: any,
|
|
8
|
-
$injector: any,
|
|
9
|
-
$$AnimateRunner: any,
|
|
10
|
-
$$rAFScheduler: any,
|
|
11
|
-
$$animateCache: any,
|
|
12
|
-
) => (element: any, event: any, options: any) => any)
|
|
13
|
-
)[];
|
|
3
|
+
drivers: any[];
|
|
4
|
+
$get: (string | (($rootScope: any, $injector: any, $$AnimateRunner: any, $$rAFScheduler: any, $$animateCache: any) => (element: any, event: any, options: any) => any))[];
|
|
14
5
|
}
|
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
export function assertArg(arg: any, name: any, reason: any): any;
|
|
2
2
|
export function mergeClasses(a: any, b: any): any;
|
|
3
3
|
export function packageStyles(options: any): {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
to: any;
|
|
5
|
+
from: any;
|
|
6
6
|
};
|
|
7
7
|
export function pendClasses(classes: any, fix: any, isPrefix: any): string;
|
|
8
8
|
export function removeFromArray(arr: any, val: any): void;
|
|
9
9
|
export function stripCommentsFromElement(element: any): any;
|
|
10
10
|
export function extractElementNode(element: any): any;
|
|
11
|
-
export function applyAnimationClassesFactory(): (
|
|
12
|
-
element: any,
|
|
13
|
-
options: any,
|
|
14
|
-
) => void;
|
|
11
|
+
export function applyAnimationClassesFactory(): (element: any, options: any) => void;
|
|
15
12
|
export function prepareAnimationOptions(options: any): any;
|
|
16
13
|
export function applyAnimationStyles(element: any, options: any): void;
|
|
17
14
|
export function applyAnimationFromStyles(element: any, options: any): void;
|
|
18
15
|
export function applyAnimationToStyles(element: any, options: any): void;
|
|
19
|
-
export function mergeAnimationDetails(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
): any;
|
|
24
|
-
export function resolveElementClasses(
|
|
25
|
-
existing: any,
|
|
26
|
-
toAdd: any,
|
|
27
|
-
toRemove: any,
|
|
28
|
-
): {
|
|
29
|
-
addClass: string;
|
|
30
|
-
removeClass: string;
|
|
16
|
+
export function mergeAnimationDetails(element: any, oldAnimation: any, newAnimation: any): any;
|
|
17
|
+
export function resolveElementClasses(existing: any, toAdd: any, toRemove: any): {
|
|
18
|
+
addClass: string;
|
|
19
|
+
removeClass: string;
|
|
31
20
|
};
|
|
32
21
|
export function getDomNode(element: any): any;
|
|
33
|
-
export function applyGeneratedPreparationClasses(
|
|
34
|
-
element: any,
|
|
35
|
-
event: any,
|
|
36
|
-
options: any,
|
|
37
|
-
): void;
|
|
22
|
+
export function applyGeneratedPreparationClasses(element: any, event: any, options: any): void;
|
|
38
23
|
export function clearGeneratedClasses(element: any, options: any): void;
|
|
39
24
|
export function blockKeyframeAnimations(node: any, applyBlock: any): string[];
|
|
40
25
|
export function applyInlineStyle(node: any, styleTuple: any): void;
|
|
@@ -12,14 +12,8 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export function CoreAnimateCssProvider(): void;
|
|
14
14
|
export class CoreAnimateCssProvider {
|
|
15
|
-
|
|
16
|
-
| string
|
|
17
|
-
| (($$AnimateRunner: any) => (
|
|
18
|
-
element: any,
|
|
19
|
-
initialOptions: any,
|
|
20
|
-
) => {
|
|
15
|
+
$get: (string | (($$AnimateRunner: any) => (element: any, initialOptions: any) => {
|
|
21
16
|
start: () => any;
|
|
22
17
|
end: () => any;
|
|
23
|
-
|
|
24
|
-
)[];
|
|
18
|
+
}))[];
|
|
25
19
|
}
|
|
@@ -17,9 +17,9 @@ export const EXPANDO: "ngId";
|
|
|
17
17
|
*/
|
|
18
18
|
export const CACHE: Map<number, ExpandoStore>;
|
|
19
19
|
export type ExpandoStore = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
data: {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
};
|
|
23
|
+
events: any;
|
|
24
|
+
handle: Function | null;
|
|
25
25
|
};
|