From 4a6aa2cb94bfb4ceaf240f32888ceeeab616c5f9 Mon Sep 17 00:00:00 2001 From: mr25mr <100434800+mr25mr@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:40:12 +0100 Subject: [PATCH 1/8] fix: use logger instead of console.log --- packages/context/src/ui5-model.ts | 8 +++---- packages/context/src/utils/fileUtils.ts | 2 +- packages/context/test/unit/ui5-model.test.ts | 22 ------------------ packages/semantic-model/src/logger.ts | 24 ++++++++++++++++++++ packages/semantic-model/src/utils.ts | 3 ++- 5 files changed, 31 insertions(+), 28 deletions(-) create mode 100644 packages/semantic-model/src/logger.ts diff --git a/packages/context/src/ui5-model.ts b/packages/context/src/ui5-model.ts index be4d3391a..08da4dcec 100644 --- a/packages/context/src/ui5-model.ts +++ b/packages/context/src/ui5-model.ts @@ -134,10 +134,10 @@ async function createSemanticModelWithFetcher( apiJson = await response.json(); await writeToCache(cacheFilePath, apiJson); } else if (response.status === 404) { - getLogger().error("Could not find UI5 lib from", { url }); + getLogger().warn("Could not find UI5 lib from", { url }); await writeToCache(cacheFilePath, {}); // write dummy file! TODO: how to invalidate? } else { - getLogger().error("Could not read UI5 lib from", { url }); + getLogger().warn("Could not read UI5 lib from", { url }); } } else { getLogger().info("Reading Cache For UI5 Lib", { @@ -271,7 +271,7 @@ async function getVersionInfo( throw new Error(`Version info request has failed (${url})`); } } catch (e) { - getLogger().error("Could not read version information. " + e, { + getLogger().warn("Could not read version information. " + e, { url, }); } @@ -420,7 +420,7 @@ export async function negotiateVersionWithFetcher( >; } else { isFallback = true; - getLogger().error( + getLogger().warn( "Could not read version mapping, fallback to default version", { url, diff --git a/packages/context/src/utils/fileUtils.ts b/packages/context/src/utils/fileUtils.ts index a6823cec6..368358b71 100644 --- a/packages/context/src/utils/fileUtils.ts +++ b/packages/context/src/utils/fileUtils.ts @@ -39,7 +39,7 @@ export async function findAllFilesInWorkspace( // Windows paths are not supported by globby const pattern = toPosixPath(join(workspaceFolderPath, "**", fileName)); const result = globby(pattern).catch((reason) => { - getLogger().error( + getLogger().warn( `Failed to find all ${fileName} files in current workspace!`, { workspaceFolderPath, diff --git a/packages/context/test/unit/ui5-model.test.ts b/packages/context/test/unit/ui5-model.test.ts index 00bac8712..2927756aa 100644 --- a/packages/context/test/unit/ui5-model.test.ts +++ b/packages/context/test/unit/ui5-model.test.ts @@ -1,25 +1,3 @@ -jest.mock("@ui5-language-assistant/logic-utils", () => { - const actual = jest.requireActual("@ui5-language-assistant/logic-utils"); - - return { - ...actual, - getLogger: (name: string) => { - const logger = actual.getLogger(name); - return { - ...logger, - fatal: (m, ...args: unknown[]) => - console.log(`Fatal: ${m}, ${JSON.stringify(args)}`), - error: (m, ...args: unknown[]) => - console.log(`Error: ${m}, ${JSON.stringify(args)}`), - warn: (m, ...args: unknown[]) => - console.log(`Warning: ${m}, ${JSON.stringify(args)}`), - info: (m, ...args: unknown[]) => - console.log(`Info: ${m}, ${JSON.stringify(args)}}`), - }; - }, - }; -}); - import { dir as tempDir, file as tempFile } from "tmp-promise"; import { readdir, mkdirs, writeFile } from "fs-extra"; import { sync as rimrafSync } from "rimraf"; diff --git a/packages/semantic-model/src/logger.ts b/packages/semantic-model/src/logger.ts new file mode 100644 index 000000000..fadcdbf27 --- /dev/null +++ b/packages/semantic-model/src/logger.ts @@ -0,0 +1,24 @@ +import { + getLogger as logger, + ILogger, +} from "@ui5-language-assistant/logic-utils"; + +const getPackageName = (): string => { + let meta: { name: string }; + try { + meta = require("../package.json"); + } catch (e) { + meta = require("../../package.json"); + } + + if (!meta) { + return ""; + } + // eslint-disable-next-line @typescript-eslint/no-var-requires -- Using `require` for .json file as this gets bundled with webpack correctly. + return meta.name; +}; + +export const getLogger = (): ILogger => { + const name = getPackageName(); + return logger(name); +}; diff --git a/packages/semantic-model/src/utils.ts b/packages/semantic-model/src/utils.ts index f0043306a..f9ffde49a 100644 --- a/packages/semantic-model/src/utils.ts +++ b/packages/semantic-model/src/utils.ts @@ -3,6 +3,7 @@ import { BaseUI5Node, UI5SemanticModel, } from "@ui5-language-assistant/semantic-model-types"; +import { getLogger } from "./logger"; export function newMap(): Record { // Create an object without a prototype so it doesn't have built-in methods like toString @@ -20,7 +21,7 @@ export function error(message: string, throwError: boolean): void { if (throwError) { throw new Error(message); } else { - console.error(message); + getLogger().trace(message); } } From db383dd4c19992834d29b6dd86fb10f433b8957d Mon Sep 17 00:00:00 2001 From: mr25mr <100434800+mr25mr@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:43:15 +0100 Subject: [PATCH 2/8] fix: change set --- .changeset/odd-lies-grab.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/odd-lies-grab.md diff --git a/.changeset/odd-lies-grab.md b/.changeset/odd-lies-grab.md new file mode 100644 index 000000000..5e4b4bad6 --- /dev/null +++ b/.changeset/odd-lies-grab.md @@ -0,0 +1,8 @@ +--- +"@ui5-language-assistant/vscode-ui5-language-assistant-bas-ext": patch +"vscode-ui5-language-assistant": patch +"@ui5-language-assistant/semantic-model": patch +"@ui5-language-assistant/context": patch +--- + +Use logger instead of console.log From 593770a07f43c4bb3e9148e326e15cf6f93d5431 Mon Sep 17 00:00:00 2001 From: mr25mr <100434800+mr25mr@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:36:23 +0100 Subject: [PATCH 3/8] fix: add dependency --- packages/semantic-model/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/semantic-model/package.json b/packages/semantic-model/package.json index 6383ed43e..5485f27cc 100644 --- a/packages/semantic-model/package.json +++ b/packages/semantic-model/package.json @@ -18,6 +18,7 @@ "typings": "./api.d.ts", "dependencies": { "@ui5-language-assistant/semantic-model-types": "4.0.9", + "@ui5-language-assistant/logic-utils": "4.0.14", "ajv": "6.12.3", "deep-freeze-strict": "1.1.1", "fs-extra": "10.1.0", From b7a5f41818566fac9ac9ad15c7a312ab86b93edb Mon Sep 17 00:00:00 2001 From: mr25mr <100434800+mr25mr@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:36:01 +0100 Subject: [PATCH 4/8] fix: cyclic dependencies --- packages/binding/package.json | 1 + packages/binding/src/constant.ts | 1 + packages/binding/src/utils/logger.ts | 24 ++----------- packages/context/package.json | 1 + packages/context/src/constant.ts | 1 + packages/context/src/utils/logger.ts | 24 ++----------- packages/context/src/utils/project.ts | 2 +- packages/context/src/utils/ui5.ts | 2 +- packages/language-server/package.json | 1 + packages/language-server/src/constant.ts | 1 + packages/language-server/src/logger.ts | 20 +++-------- packages/logger/CONTRIBUTING.md | 4 +++ packages/logger/README.md | 32 +++++++++++++++++ packages/logger/api.d.ts | 7 ++++ packages/logger/jest.config.js | 15 ++++++++ packages/logger/package.json | 34 +++++++++++++++++++ .../src/utils/logger.ts => logger/src/api.ts} | 0 .../test/unit/api.test.ts} | 22 ++++++------ packages/logger/tsconfig-test.json | 4 +++ packages/logger/tsconfig.json | 9 +++++ packages/logic-utils/api.d.ts | 5 --- packages/logic-utils/package.json | 2 -- packages/logic-utils/src/api.ts | 8 ----- packages/semantic-model/package.json | 2 +- packages/semantic-model/src/constant.ts | 1 + packages/semantic-model/src/logger.ts | 24 ++----------- 26 files changed, 140 insertions(+), 107 deletions(-) create mode 100644 packages/context/src/constant.ts create mode 100644 packages/language-server/src/constant.ts create mode 100644 packages/logger/CONTRIBUTING.md create mode 100644 packages/logger/README.md create mode 100644 packages/logger/api.d.ts create mode 100644 packages/logger/jest.config.js create mode 100644 packages/logger/package.json rename packages/{logic-utils/src/utils/logger.ts => logger/src/api.ts} (100%) rename packages/{logic-utils/test/unit/logger.test.ts => logger/test/unit/api.test.ts} (69%) create mode 100644 packages/logger/tsconfig-test.json create mode 100644 packages/logger/tsconfig.json create mode 100644 packages/semantic-model/src/constant.ts diff --git a/packages/binding/package.json b/packages/binding/package.json index f557706aa..76b0be5d2 100644 --- a/packages/binding/package.json +++ b/packages/binding/package.json @@ -16,6 +16,7 @@ "license": "Apache-2.0", "dependencies": { "@ui5-language-assistant/binding-parser": "1.0.6", + "@ui5-language-assistant/logger": "0.0.1", "@ui5-language-assistant/context": "4.0.20", "@ui5-language-assistant/logic-utils": "4.0.14", "@ui5-language-assistant/xml-views-completion": "4.0.20", diff --git a/packages/binding/src/constant.ts b/packages/binding/src/constant.ts index 5ec7387d3..a74233314 100644 --- a/packages/binding/src/constant.ts +++ b/packages/binding/src/constant.ts @@ -6,3 +6,4 @@ export const AGGREGATION_BINDING_INFO = export const Binding_Mode = "sap.ui.model.BindingMode"; export const PARTS = "parts"; export const FILTER_OPERATOR = "FilterOperator"; +export const PACKAGE_NAME = "@ui5-language-assistant/binding"; diff --git a/packages/binding/src/utils/logger.ts b/packages/binding/src/utils/logger.ts index d7508e1a9..2d700809d 100644 --- a/packages/binding/src/utils/logger.ts +++ b/packages/binding/src/utils/logger.ts @@ -1,24 +1,6 @@ -import { - getLogger as logger, - ILogger, -} from "@ui5-language-assistant/logic-utils"; - -const getPackageName = (): string => { - let meta: { name: string }; - try { - meta = require("../../package.json"); - } catch (e) { - meta = require("../../../package.json"); - } - - if (!meta) { - return ""; - } - // eslint-disable-next-line @typescript-eslint/no-var-requires -- Using `require` for .json file as this gets bundled with webpack correctly. - return meta.name; -}; +import { getLogger as logger, ILogger } from "@ui5-language-assistant/logger"; +import { PACKAGE_NAME } from "../constant"; export const getLogger = (): ILogger => { - const name = getPackageName(); - return logger(name); + return logger(PACKAGE_NAME); }; diff --git a/packages/context/package.json b/packages/context/package.json index c7b775c31..1c72c7895 100644 --- a/packages/context/package.json +++ b/packages/context/package.json @@ -19,6 +19,7 @@ "@sap-ux/annotation-converter": "0.5.20", "@sap-ux/edmx-parser": "0.5.13", "@sap-ux/project-access": "1.9.1", + "@ui5-language-assistant/logger": "0.0.1", "@ui5-language-assistant/logic-utils": "4.0.14", "@ui5-language-assistant/settings": "4.0.9", "fs-extra": "10.1.0", diff --git a/packages/context/src/constant.ts b/packages/context/src/constant.ts new file mode 100644 index 000000000..a1895deab --- /dev/null +++ b/packages/context/src/constant.ts @@ -0,0 +1 @@ +export const PACKAGE_NAME = "@ui5-language-assistant/context"; diff --git a/packages/context/src/utils/logger.ts b/packages/context/src/utils/logger.ts index d7508e1a9..2d700809d 100644 --- a/packages/context/src/utils/logger.ts +++ b/packages/context/src/utils/logger.ts @@ -1,24 +1,6 @@ -import { - getLogger as logger, - ILogger, -} from "@ui5-language-assistant/logic-utils"; - -const getPackageName = (): string => { - let meta: { name: string }; - try { - meta = require("../../package.json"); - } catch (e) { - meta = require("../../../package.json"); - } - - if (!meta) { - return ""; - } - // eslint-disable-next-line @typescript-eslint/no-var-requires -- Using `require` for .json file as this gets bundled with webpack correctly. - return meta.name; -}; +import { getLogger as logger, ILogger } from "@ui5-language-assistant/logger"; +import { PACKAGE_NAME } from "../constant"; export const getLogger = (): ILogger => { - const name = getPackageName(); - return logger(name); + return logger(PACKAGE_NAME); }; diff --git a/packages/context/src/utils/project.ts b/packages/context/src/utils/project.ts index d0c4e7c1a..749e10090 100644 --- a/packages/context/src/utils/project.ts +++ b/packages/context/src/utils/project.ts @@ -17,7 +17,7 @@ import { ProjectType, UI5_PROJECT_TYPE, } from "../types"; -import { getLogger } from "./logger"; +import { getLogger } from "."; /** * Unify service path by adding forward slash to beginning and end of a service path diff --git a/packages/context/src/utils/ui5.ts b/packages/context/src/utils/ui5.ts index d2e67fa78..c877db944 100644 --- a/packages/context/src/utils/ui5.ts +++ b/packages/context/src/utils/ui5.ts @@ -1,6 +1,6 @@ import { UI5Framework } from "@ui5-language-assistant/semantic-model-types"; import { UI5_FRAMEWORK_CDN_BASE_URL } from "../types"; -import { getLogger } from "../utils"; +import { getLogger } from "."; import { tryFetch, getLocalUrl } from "@ui5-language-assistant/logic-utils"; /** diff --git a/packages/language-server/package.json b/packages/language-server/package.json index 40f10c858..4232dfa7b 100644 --- a/packages/language-server/package.json +++ b/packages/language-server/package.json @@ -28,6 +28,7 @@ "@ui5-language-assistant/binding": "1.0.20", "@sap/swa-for-sapbas-vsx": "1.1.9", "@ui5-language-assistant/context": "4.0.20", + "@ui5-language-assistant/logger": "0.0.1", "@ui5-language-assistant/logic-utils": "4.0.14", "@ui5-language-assistant/fe": "4.0.21", "@ui5-language-assistant/semantic-model": "4.0.13", diff --git a/packages/language-server/src/constant.ts b/packages/language-server/src/constant.ts new file mode 100644 index 000000000..6a4c18a89 --- /dev/null +++ b/packages/language-server/src/constant.ts @@ -0,0 +1 @@ +export const PACKAGE_NAME = "@ui5-language-assistant/language-server"; diff --git a/packages/language-server/src/logger.ts b/packages/language-server/src/logger.ts index 567b60e4e..e2ac3e9de 100644 --- a/packages/language-server/src/logger.ts +++ b/packages/language-server/src/logger.ts @@ -3,24 +3,12 @@ import { setLogLevel as setLogLevelSetter, LogLevel, ILogger, -} from "@ui5-language-assistant/logic-utils"; -import { join } from "path"; -import { readJsonSync } from "fs-extra"; -const getPackageName = (): string => { - let meta; - try { - // in production - ../extensions/saposs.vscode-ui5-language-assistant-4.0.6/node_modules/@ui5-language-assistant/language-server/dist - meta = readJsonSync(join(__dirname, "..", "package.json")); - } catch (error) { - meta = readJsonSync(join(__dirname, "..", "..", "package.json")); - } - return meta?.name; -}; +} from "@ui5-language-assistant/logger"; +import { PACKAGE_NAME } from "./constant"; -const name = getPackageName(); export const getLogger = (): ILogger => { - return logger(name); + return logger(PACKAGE_NAME); }; export const setLogLevel = (logLevel: LogLevel): void => - setLogLevelSetter(name, logLevel); + setLogLevelSetter(PACKAGE_NAME, logLevel); diff --git a/packages/logger/CONTRIBUTING.md b/packages/logger/CONTRIBUTING.md new file mode 100644 index 000000000..84eb94476 --- /dev/null +++ b/packages/logger/CONTRIBUTING.md @@ -0,0 +1,4 @@ +# Contribution Guide + +This package does not have any unique development flows. +Please see the top level [Contribution Guide](../../CONTRIBUTING.md). diff --git a/packages/logger/README.md b/packages/logger/README.md new file mode 100644 index 000000000..35bd221b8 --- /dev/null +++ b/packages/logger/README.md @@ -0,0 +1,32 @@ +[![npm (scoped)](https://img.shields.io/npm/v/@ui5-language-assistant/logger.svg)](https://www.npmjs.com/package/@ui5-language-assistant/logger) + +# @ui5-language-assistant/logger + +A logger package + +## Installation + +With npm: + +- `npm install @ui5-language-assistant/logger` + +With Yarn: + +- `yarn add @ui5-language-assistant/logger` + +## Usage + +This package only exposes programmatic APIs, import the package and use the exported APIs +defined in [api.d.ts](./api.d.ts). + +## Support + +Please open [issues](https://github.com/SAP/ui5-language-assistant/issues) on github. + +## Contributing + +See [CONTRIBUTING.md](./CONTRIBUTING.md). + +## Licensing + +Copyright 2022 SAP SE. Please see our [LICENSE](../../LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/ui5-language-assistant). diff --git a/packages/logger/api.d.ts b/packages/logger/api.d.ts new file mode 100644 index 000000000..ac55f3d54 --- /dev/null +++ b/packages/logger/api.d.ts @@ -0,0 +1,7 @@ +export { + ILogger, + getLogLevel, + getLogger, + setLogLevel, + LogLevel, +} from "./src/api"; diff --git a/packages/logger/jest.config.js b/packages/logger/jest.config.js new file mode 100644 index 000000000..406cef575 --- /dev/null +++ b/packages/logger/jest.config.js @@ -0,0 +1,15 @@ +const { join } = require("path"); +const defaultConfig = require("../../jest.config"); + +module.exports = { + ...defaultConfig, + globals: { + "ts-jest": { + tsconfig: join(__dirname, "tsconfig-test.json"), + diagnostics: { + // warnOnly: true, + exclude: /\.(spec|test)\.ts$/, + }, + }, + }, +}; diff --git a/packages/logger/package.json b/packages/logger/package.json new file mode 100644 index 000000000..ceff0a197 --- /dev/null +++ b/packages/logger/package.json @@ -0,0 +1,34 @@ +{ + "name": "@ui5-language-assistant/logger", + "version": "0.0.1", + "private": true, + "description": "A logger package", + "keywords": [], + "files": [ + ".reuse", + "LICENSES", + "lib/src", + "api.d.ts", + "src" + ], + "main": "lib/src/api.js", + "repository": "https://github.com/sap/ui5-language-assistant/", + "license": "Apache-2.0", + "typings": "./api.d.ts", + "dependencies": { + "@vscode-logging/logger": "1.2.2", + "@ui5-language-assistant/settings": "4.0.9" + }, + "devDependencies": { + "@vscode-logging/types": "0.1.4" + }, + "scripts": { + "ci": "npm-run-all clean compile lint coverage", + "clean": "rimraf ./lib ./coverage ./nyc_output", + "compile": "yarn run clean && tsc -p .", + "compile:watch": "tsc -p . --watch", + "lint": "eslint . --ext .ts --max-warnings=0 --ignore-path=../../.gitignore", + "test": "jest --ci --forceExit --detectOpenHandles --maxWorkers=1 --coverage=false", + "coverage": "jest --ci --forceExit --detectOpenHandles --maxWorkers=1 --coverage=true" + } +} diff --git a/packages/logic-utils/src/utils/logger.ts b/packages/logger/src/api.ts similarity index 100% rename from packages/logic-utils/src/utils/logger.ts rename to packages/logger/src/api.ts diff --git a/packages/logic-utils/test/unit/logger.test.ts b/packages/logger/test/unit/api.test.ts similarity index 69% rename from packages/logic-utils/test/unit/logger.test.ts rename to packages/logger/test/unit/api.test.ts index 4176a4ffd..b0db6c4ad 100644 --- a/packages/logic-utils/test/unit/logger.test.ts +++ b/packages/logger/test/unit/api.test.ts @@ -2,12 +2,12 @@ import { getLogger, getLogLevel, setLogLevel } from "../../src/api"; import { LogLevel } from "@vscode-logging/logger"; import { validLoggingLevelValues } from "@ui5-language-assistant/settings"; -describe("the Language Server Logger", () => { +describe("Logger", () => { let errorSpy; - const extName = "dummyExt"; - + const name = "dummyName"; beforeAll(() => { - errorSpy = jest.spyOn(console, "error"); + // mockReturnValue to avoid log miss in console + errorSpy = jest.spyOn(console, "error").mockReturnValue(); }); afterEach(() => { @@ -15,7 +15,7 @@ describe("the Language Server Logger", () => { }); it("supports structured JSON logging", async () => { - getLogger(extName).error("hello world", { a: 1, b: [1, 2, 3] }); + getLogger(name).error("hello world", { a: 1, b: [1, 2, 3] }); const logEntry = errorSpy.mock.calls[0]; const jsonLogEntry = JSON.parse(logEntry); expect(jsonLogEntry).toHaveProperty("a", 1); @@ -30,25 +30,27 @@ describe("the Language Server Logger", () => { }); it("supports changing the log level", async () => { - setLogLevel(extName, "fatal"); - getLogger(extName).error( + // mockReturnValue to avoid log miss in console + jest.spyOn(console, "error").mockReturnValue(); + setLogLevel(name, "fatal"); + getLogger(name).error( "`error` is lower than `fatal` so no logging should happen" ); expect(errorSpy).not.toHaveBeenCalled(); - getLogger(extName).fatal("`fatal` should cause logging to the console"); + getLogger(name).fatal("`fatal` should cause logging to the console"); expect(errorSpy).toHaveBeenCalled(); }); it("does not allow changing to an **unknown** logLevel", async () => { // "Verbose" is not a valid log level for the language server - setLogLevel(extName, "Verbose" as "trace"); + setLogLevel(name, "Verbose" as "trace"); const currentLogLevel = getLogLevel(); expect(currentLogLevel).not.toEqual("Verbose"); expect(validLoggingLevelValues[currentLogLevel]).toBeTrue(); }); afterEach(() => { - setLogLevel(extName, orgLevel); + setLogLevel(name, orgLevel); }); }); }); diff --git a/packages/logger/tsconfig-test.json b/packages/logger/tsconfig-test.json new file mode 100644 index 000000000..fb1f25450 --- /dev/null +++ b/packages/logger/tsconfig-test.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "include": ["src/**/*.ts", "test/**/*.ts"] +} diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json new file mode 100644 index 000000000..7ecd7b544 --- /dev/null +++ b/packages/logger/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "lib", + "baseUrl": "." + }, + "include": ["src/**/*", "test/**/*", "api.d.ts"] +} diff --git a/packages/logic-utils/api.d.ts b/packages/logic-utils/api.d.ts index ea338ad31..a1a375623 100644 --- a/packages/logic-utils/api.d.ts +++ b/packages/logic-utils/api.d.ts @@ -274,11 +274,6 @@ export function isSameXMLNSFromPrefix( ): boolean; export { - ILogger, - getLogLevel, - getLogger, - setLogLevel, - LogLevel, fetch, tryFetch, getLocalUrl, diff --git a/packages/logic-utils/package.json b/packages/logic-utils/package.json index bffb10afc..bbd866d7c 100644 --- a/packages/logic-utils/package.json +++ b/packages/logic-utils/package.json @@ -18,7 +18,6 @@ "dependencies": { "@ui5-language-assistant/semantic-model-types": "4.0.9", "@ui5-language-assistant/settings": "4.0.9", - "@vscode-logging/logger": "1.2.2", "@xml-tools/ast": "5.0.0", "lodash": "4.17.21", "node-fetch": "2.6.9", @@ -28,7 +27,6 @@ "devDependencies": { "@ui5-language-assistant/semantic-model": "4.0.13", "@ui5-language-assistant/test-utils": "4.0.9", - "@vscode-logging/types": "0.1.4", "@xml-tools/parser": "1.0.7" }, "scripts": { diff --git a/packages/logic-utils/src/api.ts b/packages/logic-utils/src/api.ts index daf3080be..15f17dc0b 100644 --- a/packages/logic-utils/src/api.ts +++ b/packages/logic-utils/src/api.ts @@ -38,14 +38,6 @@ export { isSameXMLNSFromPrefix, } from "./utils/xml-namespaces"; -export { - ILogger, - getLogLevel, - getLogger, - setLogLevel, - LogLevel, -} from "./utils/logger"; - export { fetch } from "./utils/fetch"; export { tryFetch, getLocalUrl } from "./utils/fetch-helper"; export { isXMLView } from "./utils/document"; diff --git a/packages/semantic-model/package.json b/packages/semantic-model/package.json index 5485f27cc..a8e592fdc 100644 --- a/packages/semantic-model/package.json +++ b/packages/semantic-model/package.json @@ -18,7 +18,7 @@ "typings": "./api.d.ts", "dependencies": { "@ui5-language-assistant/semantic-model-types": "4.0.9", - "@ui5-language-assistant/logic-utils": "4.0.14", + "@ui5-language-assistant/logger": "0.0.1", "ajv": "6.12.3", "deep-freeze-strict": "1.1.1", "fs-extra": "10.1.0", diff --git a/packages/semantic-model/src/constant.ts b/packages/semantic-model/src/constant.ts new file mode 100644 index 000000000..85c982f4a --- /dev/null +++ b/packages/semantic-model/src/constant.ts @@ -0,0 +1 @@ +export const PACKAGE_NAME = "@ui5-language-assistant/semantic-model"; diff --git a/packages/semantic-model/src/logger.ts b/packages/semantic-model/src/logger.ts index fadcdbf27..a856e3c17 100644 --- a/packages/semantic-model/src/logger.ts +++ b/packages/semantic-model/src/logger.ts @@ -1,24 +1,6 @@ -import { - getLogger as logger, - ILogger, -} from "@ui5-language-assistant/logic-utils"; - -const getPackageName = (): string => { - let meta: { name: string }; - try { - meta = require("../package.json"); - } catch (e) { - meta = require("../../package.json"); - } - - if (!meta) { - return ""; - } - // eslint-disable-next-line @typescript-eslint/no-var-requires -- Using `require` for .json file as this gets bundled with webpack correctly. - return meta.name; -}; +import { getLogger as logger, ILogger } from "@ui5-language-assistant/logger"; +import { PACKAGE_NAME } from "./constant"; export const getLogger = (): ILogger => { - const name = getPackageName(); - return logger(name); + return logger(PACKAGE_NAME); }; From d7f6e126acd30d95ab6baab589a96467525b382b Mon Sep 17 00:00:00 2001 From: mr25mr <100434800+mr25mr@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:40:56 +0100 Subject: [PATCH 5/8] fix: change set --- .changeset/odd-lies-grab.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.changeset/odd-lies-grab.md b/.changeset/odd-lies-grab.md index 5e4b4bad6..673adbdd3 100644 --- a/.changeset/odd-lies-grab.md +++ b/.changeset/odd-lies-grab.md @@ -1,7 +1,10 @@ --- "@ui5-language-assistant/vscode-ui5-language-assistant-bas-ext": patch "vscode-ui5-language-assistant": patch +"@ui5-language-assistant/language-server": patch "@ui5-language-assistant/semantic-model": patch +"@ui5-language-assistant/logic-utils": patch +"@ui5-language-assistant/binding": patch "@ui5-language-assistant/context": patch --- From 6d37f595d817a916fc67f7a1faa69f61ceebb620 Mon Sep 17 00:00:00 2001 From: mr25mr <100434800+mr25mr@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:36:48 +0100 Subject: [PATCH 6/8] fix: sonar --- jest.config.js | 2 -- sonar-project.properties | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jest.config.js b/jest.config.js index a8d7b330a..9dbb57f90 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,3 @@ -const { join } = require("path"); - module.exports = { preset: "ts-jest", testEnvironment: "node", diff --git a/sonar-project.properties b/sonar-project.properties index d95f1a076..4105808a8 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -9,6 +9,7 @@ sonar.test.inclusions=**/*.test.ts sonar.javascript.lcov.reportPaths=packages/binding/reports/test/unit/coverage/lcov.info, \ packages/binding-parser/reports/test/unit/coverage/lcov.info, \ packages/context/reports/test/unit/coverage/lcov.info, \ + packages/logger/reports/test/unit/coverage/lcov.info, \ packages/fe/reports/test/unit/coverage/lcov.info, \ packages/language-server/reports/test/unit/coverage/lcov.info, \ packages/logic-utils/reports/test/unit/coverage/lcov.info, \ @@ -24,6 +25,7 @@ sonar.javascript.lcov.reportPaths=packages/binding/reports/test/unit/coverage/lc sonar.testExecutionReportPaths=packages/binding/reports/test/unit/coverage/sonar-report.xml, \ packages/binding-parser/reports/test/unit/coverage/sonar-report.xml, \ packages/context/reports/test/unit/coverage/sonar-report.xml, \ + packages/logger/reports/test/unit/coverage/sonar-report.xml, \ packages/fe/reports/test/unit/coverage/sonar-report.xml, \ packages/language-server/reports/test/unit/coverage/sonar-report.xml, \ packages/logic-utils/reports/test/unit/coverage/sonar-report.xml, \ From 0d39e4198db8927f5aa70318cb11c11a10a67d1b Mon Sep 17 00:00:00 2001 From: mr25mr <100434800+mr25mr@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:48:04 +0100 Subject: [PATCH 7/8] fix: failing tests --- .changeset/odd-lies-grab.md | 8 +- jest.setup.js | 3 +- packages/binding/jest.config.js | 1 - packages/binding/jest.setup.js | 5 - .../__snapshots__/definition.test.ts.snap | 120 +-- .../aggregation-binding.test.ts.snap | 176 ++-- .../property-binding-info.test.ts.snap | 30 +- .../hover/__snapshots__/hover.test.ts.snap | 24 +- packages/context/test/unit/manifest.test.ts | 4 +- .../completion/providers/filter-bar.test.ts | 2 +- .../unit/completion-items-classes.test.ts | 2 +- .../unit/completion-items-literals.test.ts | 2 +- .../test/unit/completion-items.test.ts | 2 +- .../test/unit/documentation.test.ts | 2 +- .../language-server/test/unit/hover.test.ts | 2 +- .../test/unit/quick-fix.test.ts | 2 +- .../xml-view-diagnostics/snapshots-utils.ts | 2 +- .../test/unit/find-classes-matching.test.ts | 4 +- .../test/unit/get-super-class.test.ts | 2 +- .../test/unit/xml-node-to-ui5-node.test.ts | 12 +- packages/semantic-model/jest.config.js | 1 - packages/semantic-model/jest.setup.js | 5 - .../test/unit/api-negative.test.ts | 50 +- packages/semantic-model/test/unit/api.test.ts | 6 +- .../semantic-model/test/unit/unit.test.ts | 6 +- .../semantic-model/test/unit/utils.test.ts | 2 +- .../test/unit/api.test.ts | 2 +- .../providers/attributeName/namespace.test.ts | 2 +- .../attributeName/prop-event-assoc.test.ts | 2 +- .../attributeValue/boolean-literal.test.ts | 2 +- .../providers/attributeValue/enum.test.ts | 2 +- .../attributeValue/namespace.test.ts | 2 +- .../providers/elementName/aggregation.test.ts | 2 +- .../providers/elementName/classes.test.ts | 2 +- .../test/unit/tooltip.test.ts | 2 +- .../test/unit/api.test.ts | 2 +- .../xml-views-validation/test/unit/helper.ts | 45 + .../attributes/invalid-boolean-value.test.ts | 2 +- .../attributes/unknown-attribute-key.test.ts | 2 +- .../attributes/unknown-enum-value.test.ts | 2 +- .../unknown-xmlns-namespace.test.ts | 2 +- .../use-of-depracated-attribute.test.ts | 2 +- .../validators/document/non-unique-id.test.ts | 2 +- .../unknown-tag-name.test.ts.snap | 306 ++++++ .../cardinality-of-aggregation.test.ts | 2 +- .../validators/element/non-stable-id.test.ts | 2 +- .../element/type-of-aggregation.test.ts | 2 +- .../element/unknown-tag-name.test.ts | 915 ++++++++---------- .../use-of-deprecated-aggregation.test.ts | 2 +- .../element/use-of-deprecated-class.test.ts | 2 +- test-packages/framework/jest.config.js | 54 +- test-packages/framework/jest.setup.js | 5 - .../app/manage_travels/webapp/manifest.json | 2 +- .../projects/ts-free-style/src/manifest.json | 2 +- test-packages/test-utils/api.d.ts | 2 +- .../src/utils/download-ui5-resources.ts | 4 +- .../src/utils/semantic-model-provider.ts | 5 +- 57 files changed, 1008 insertions(+), 849 deletions(-) delete mode 100644 packages/binding/jest.setup.js delete mode 100644 packages/semantic-model/jest.setup.js create mode 100644 packages/xml-views-validation/test/unit/helper.ts create mode 100644 packages/xml-views-validation/test/unit/validators/element/__snapshots__/unknown-tag-name.test.ts.snap delete mode 100644 test-packages/framework/jest.setup.js diff --git a/.changeset/odd-lies-grab.md b/.changeset/odd-lies-grab.md index 673adbdd3..f29404e29 100644 --- a/.changeset/odd-lies-grab.md +++ b/.changeset/odd-lies-grab.md @@ -6,6 +6,12 @@ "@ui5-language-assistant/logic-utils": patch "@ui5-language-assistant/binding": patch "@ui5-language-assistant/context": patch +"@ui5-language-assistant/xml-views-completion": patch +"@ui5-language-assistant/xml-views-validation": patch +"@ui5-language-assistant/xml-views-tooltip": patch +"@ui5-language-assistant/fe": patch +"@ui5-language-assistant/test-utils": patch +"@ui5-language-assistant/test-framework": patch --- -Use logger instead of console.log +Add logger package diff --git a/jest.setup.js b/jest.setup.js index bf6ed0d5c..9410c3a68 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -1,5 +1,4 @@ -jest.setTimeout(120000); // 2 min - +jest.setTimeout(420000); // 7 min // add all jest-extended matchers const matchers = require("jest-extended"); expect.extend(matchers); diff --git a/packages/binding/jest.config.js b/packages/binding/jest.config.js index eed72053f..406cef575 100644 --- a/packages/binding/jest.config.js +++ b/packages/binding/jest.config.js @@ -3,7 +3,6 @@ const defaultConfig = require("../../jest.config"); module.exports = { ...defaultConfig, - setupFilesAfterEnv: ["./jest.setup.js"], globals: { "ts-jest": { tsconfig: join(__dirname, "tsconfig-test.json"), diff --git a/packages/binding/jest.setup.js b/packages/binding/jest.setup.js deleted file mode 100644 index 02cb14f42..000000000 --- a/packages/binding/jest.setup.js +++ /dev/null @@ -1,5 +0,0 @@ -jest.setTimeout(420000); // 7 min - -// add all jest-extended matchers -const matchers = require("jest-extended"); -expect.extend(matchers); diff --git a/packages/binding/test/unit/definition/__snapshots__/definition.test.ts.snap b/packages/binding/test/unit/definition/__snapshots__/definition.test.ts.snap index b0977ad98..e6a5e0480 100644 --- a/packages/binding/test/unit/definition/__snapshots__/definition.test.ts.snap +++ b/packages/binding/test/unit/definition/__snapshots__/definition.test.ts.snap @@ -997,7 +997,7 @@ Array [ **Optional:** false -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "path", "required": true, @@ -1028,7 +1028,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "model", "type": Array [ @@ -1058,7 +1058,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "template", "type": Array [ @@ -1616,6 +1616,7 @@ Array [ "sap.me.ProgressIndicator", "sap.me.TabContainer", "sap.ndc.BarcodeScannerButton", + "sap.ovp.app.Component", "sap.rules.ui.DecisionTableConfiguration", "sap.rules.ui.RuleBuilder", "sap.rules.ui.services.AstExpressionLanguage", @@ -1744,6 +1745,7 @@ Array [ "sap.suite.ui.commons.UnifiedThingInspector", "sap.suite.ui.commons.VerticalNavigationBar", "sap.suite.ui.commons.ViewRepeater", + "sap.suite.ui.generic.template.lib.AppComponent", "sap.suite.ui.microchart.AreaMicroChart", "sap.suite.ui.microchart.AreaMicroChartItem", "sap.suite.ui.microchart.AreaMicroChartLabel", @@ -2712,7 +2714,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "templateShareable", "type": Array [ @@ -2742,7 +2744,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "factory", "type": Array [ @@ -2772,7 +2774,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "suspended", "type": Array [ @@ -2802,7 +2804,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "startIndex", "type": Array [ @@ -2832,7 +2834,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "length", "type": Array [ @@ -2862,7 +2864,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "sorter", "type": Array [ @@ -2885,7 +2887,7 @@ Array [ **Optional:** false -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "name": "path", "required": true, @@ -2916,7 +2918,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "name": "descending", "required": false, @@ -2947,7 +2949,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "name": "group", "required": false, @@ -2989,7 +2991,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "name": "comparator", "required": false, @@ -3033,7 +3035,7 @@ Array [ **Optional:** false -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "name": "path", "required": true, @@ -3064,7 +3066,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "name": "descending", "required": false, @@ -3095,7 +3097,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "name": "group", "required": false, @@ -3137,7 +3139,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "name": "comparator", "required": false, @@ -3177,7 +3179,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "filters", "type": Array [ @@ -3200,7 +3202,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "path", "required": false, @@ -3231,7 +3233,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "test", "required": false, @@ -3262,7 +3264,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "comparator", "required": false, @@ -3293,7 +3295,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "operator", "required": false, @@ -3341,7 +3343,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "value1", "required": false, @@ -3368,7 +3370,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "value2", "required": false, @@ -3395,7 +3397,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "variable", "required": false, @@ -3426,7 +3428,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "condition", "required": false, @@ -3458,7 +3460,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "filters", "required": false, @@ -3490,7 +3492,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "and", "required": false, @@ -3521,7 +3523,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "caseSensitive", "required": false, @@ -3565,7 +3567,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "path", "required": false, @@ -3596,7 +3598,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "test", "required": false, @@ -3627,7 +3629,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "comparator", "required": false, @@ -3658,7 +3660,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "operator", "required": false, @@ -3706,7 +3708,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "value1", "required": false, @@ -3733,7 +3735,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "value2", "required": false, @@ -3760,7 +3762,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "variable", "required": false, @@ -3791,7 +3793,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "condition", "required": false, @@ -3823,7 +3825,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "filters", "required": false, @@ -3855,7 +3857,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "and", "required": false, @@ -3886,7 +3888,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "name": "caseSensitive", "required": false, @@ -3926,7 +3928,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "key", "type": Array [ @@ -3967,7 +3969,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "parameters", "type": Array [ @@ -3997,7 +3999,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "groupHeaderFactory", "type": Array [ @@ -4027,7 +4029,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "name": "events", "type": Array [ @@ -4062,7 +4064,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "path", "type": Array [ @@ -4095,7 +4097,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "value", "type": Array [ @@ -4128,7 +4130,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "model", "type": Array [ @@ -4158,7 +4160,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "suspended", "type": Array [ @@ -4191,7 +4193,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "formatter", "type": Array [ @@ -4223,7 +4225,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "useRawValues", "type": Array [ @@ -4258,7 +4260,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "useInternalValues", "type": Array [ @@ -4291,7 +4293,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "type", "type": Array [ @@ -4371,7 +4373,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "targetType", "type": Array [ @@ -4401,7 +4403,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "formatOptions", "type": Array [ @@ -4442,7 +4444,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "constraints", "type": Array [ @@ -4483,7 +4485,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "mode", "type": Array [ @@ -4518,7 +4520,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "parameters", "type": Array [ @@ -4548,7 +4550,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "events", "type": Array [ @@ -4582,7 +4584,7 @@ If a part is not specified as a binding info object but as a simple string, a bi **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, "name": "parts", "type": Array [ diff --git a/packages/binding/test/unit/services/completion/__snapshots__/aggregation-binding.test.ts.snap b/packages/binding/test/unit/services/completion/__snapshots__/aggregation-binding.test.ts.snap index 7f3b83c0c..f1dbd27d4 100644 --- a/packages/binding/test/unit/services/completion/__snapshots__/aggregation-binding.test.ts.snap +++ b/packages/binding/test/unit/services/completion/__snapshots__/aggregation-binding.test.ts.snap @@ -15,7 +15,7 @@ Array [ **Optional:** false -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -35,7 +35,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "model: '$0'", "insertTextFormat": 2, @@ -55,7 +55,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "template: '$0'", "insertTextFormat": 2, @@ -75,7 +75,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "templateShareable: $0", "insertTextFormat": 2, @@ -95,7 +95,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "factory: '$0'", "insertTextFormat": 2, @@ -115,7 +115,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "suspended: $0", "insertTextFormat": 2, @@ -135,7 +135,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "startIndex: $0", "insertTextFormat": 2, @@ -155,7 +155,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "length: $0", "insertTextFormat": 2, @@ -175,7 +175,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "sorter: $0", "insertTextFormat": 2, @@ -195,7 +195,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "filters: $0", "insertTextFormat": 2, @@ -215,7 +215,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "key: $0", "insertTextFormat": 2, @@ -235,7 +235,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "parameters: {$0}", "insertTextFormat": 2, @@ -255,7 +255,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "groupHeaderFactory: '$0'", "insertTextFormat": 2, @@ -275,7 +275,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.AggregationBindingInfo)", }, "insertText": "events: {$0}", "insertTextFormat": 2, @@ -300,7 +300,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -320,7 +320,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "test: '$0'", "insertTextFormat": 2, @@ -340,7 +340,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "comparator: '$0'", "insertTextFormat": 2, @@ -360,7 +360,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "operator: '$0'", "insertTextFormat": 2, @@ -380,7 +380,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value1: $0", "insertTextFormat": 2, @@ -400,7 +400,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value2: $0", "insertTextFormat": 2, @@ -420,7 +420,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "variable: '$0'", "insertTextFormat": 2, @@ -440,7 +440,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "condition: {$0}", "insertTextFormat": 2, @@ -460,7 +460,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "filters: [{$0}]", "insertTextFormat": 2, @@ -480,7 +480,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "and: $0", "insertTextFormat": 2, @@ -500,7 +500,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "caseSensitive: $0", "insertTextFormat": 2, @@ -525,7 +525,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -545,7 +545,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "test: '$0'", "insertTextFormat": 2, @@ -565,7 +565,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "comparator: '$0'", "insertTextFormat": 2, @@ -585,7 +585,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "operator: '$0'", "insertTextFormat": 2, @@ -605,7 +605,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value1: $0", "insertTextFormat": 2, @@ -625,7 +625,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value2: $0", "insertTextFormat": 2, @@ -645,7 +645,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "variable: '$0'", "insertTextFormat": 2, @@ -665,7 +665,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "condition: {$0}", "insertTextFormat": 2, @@ -685,7 +685,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "filters: [{$0}]", "insertTextFormat": 2, @@ -705,7 +705,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "and: $0", "insertTextFormat": 2, @@ -725,7 +725,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "caseSensitive: $0", "insertTextFormat": 2, @@ -750,7 +750,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -770,7 +770,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "test: '$0'", "insertTextFormat": 2, @@ -790,7 +790,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "comparator: '$0'", "insertTextFormat": 2, @@ -810,7 +810,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "operator: '$0'", "insertTextFormat": 2, @@ -830,7 +830,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value1: $0", "insertTextFormat": 2, @@ -850,7 +850,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value2: $0", "insertTextFormat": 2, @@ -870,7 +870,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "variable: '$0'", "insertTextFormat": 2, @@ -890,7 +890,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "condition: {$0}", "insertTextFormat": 2, @@ -910,7 +910,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "filters: [{$0}]", "insertTextFormat": 2, @@ -930,7 +930,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "and: $0", "insertTextFormat": 2, @@ -950,7 +950,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "caseSensitive: $0", "insertTextFormat": 2, @@ -975,7 +975,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -995,7 +995,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "test: '$0'", "insertTextFormat": 2, @@ -1015,7 +1015,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "comparator: '$0'", "insertTextFormat": 2, @@ -1035,7 +1035,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "operator: '$0'", "insertTextFormat": 2, @@ -1055,7 +1055,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value1: $0", "insertTextFormat": 2, @@ -1075,7 +1075,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value2: $0", "insertTextFormat": 2, @@ -1095,7 +1095,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "variable: '$0'", "insertTextFormat": 2, @@ -1115,7 +1115,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "condition: {$0}", "insertTextFormat": 2, @@ -1135,7 +1135,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "filters: [{$0}]", "insertTextFormat": 2, @@ -1155,7 +1155,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "and: $0", "insertTextFormat": 2, @@ -1175,7 +1175,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "caseSensitive: $0", "insertTextFormat": 2, @@ -1509,7 +1509,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -1529,7 +1529,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "test: '$0'", "insertTextFormat": 2, @@ -1549,7 +1549,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "comparator: '$0'", "insertTextFormat": 2, @@ -1569,7 +1569,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "operator: '$0'", "insertTextFormat": 2, @@ -1589,7 +1589,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value1: $0", "insertTextFormat": 2, @@ -1609,7 +1609,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value2: $0", "insertTextFormat": 2, @@ -1629,7 +1629,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "variable: '$0'", "insertTextFormat": 2, @@ -1649,7 +1649,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "condition: {$0}", "insertTextFormat": 2, @@ -1669,7 +1669,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "filters: [{$0}]", "insertTextFormat": 2, @@ -1689,7 +1689,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "and: $0", "insertTextFormat": 2, @@ -1709,7 +1709,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "caseSensitive: $0", "insertTextFormat": 2, @@ -1734,7 +1734,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -1754,7 +1754,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "test: '$0'", "insertTextFormat": 2, @@ -1774,7 +1774,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "comparator: '$0'", "insertTextFormat": 2, @@ -1794,7 +1794,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "operator: '$0'", "insertTextFormat": 2, @@ -1814,7 +1814,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value1: $0", "insertTextFormat": 2, @@ -1834,7 +1834,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "value2: $0", "insertTextFormat": 2, @@ -1854,7 +1854,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "variable: '$0'", "insertTextFormat": 2, @@ -1874,7 +1874,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "condition: {$0}", "insertTextFormat": 2, @@ -1894,7 +1894,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "filters: [{$0}]", "insertTextFormat": 2, @@ -1914,7 +1914,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "and: $0", "insertTextFormat": 2, @@ -1934,7 +1934,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, "insertText": "caseSensitive: $0", "insertTextFormat": 2, @@ -1959,7 +1959,7 @@ Array [ **Optional:** false -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -1979,7 +1979,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "insertText": "descending: $0", "insertTextFormat": 2, @@ -1999,7 +1999,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "insertText": "group: $0", "insertTextFormat": 2, @@ -2019,7 +2019,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "insertText": "comparator: '$0'", "insertTextFormat": 2, @@ -2044,7 +2044,7 @@ Array [ **Optional:** false -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "insertText": "path: '$0'", "insertTextFormat": 2, @@ -2064,7 +2064,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "insertText": "descending: $0", "insertTextFormat": 2, @@ -2084,7 +2084,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "insertText": "group: $0", "insertTextFormat": 2, @@ -2104,7 +2104,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Sorter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Sorter)", }, "insertText": "comparator: '$0'", "insertTextFormat": 2, diff --git a/packages/binding/test/unit/services/completion/__snapshots__/property-binding-info.test.ts.snap b/packages/binding/test/unit/services/completion/__snapshots__/property-binding-info.test.ts.snap index 1780db09f..16e757ad3 100644 --- a/packages/binding/test/unit/services/completion/__snapshots__/property-binding-info.test.ts.snap +++ b/packages/binding/test/unit/services/completion/__snapshots__/property-binding-info.test.ts.snap @@ -36,7 +36,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: value; text: value: '$0'; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -47,7 +47,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: model; text: model: '$0'; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -58,7 +58,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: suspended; text: suspended: $0; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -69,7 +69,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: formatter; text: formatter: '$0'; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -80,7 +80,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: useRawValues; text: useRawValues: $0; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -93,7 +93,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: useInternalValues; text: useInternalValues: $0; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -106,7 +106,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: type; text: type: '$0'; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -117,7 +117,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: targetType; text: targetType: '$0'; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -128,7 +128,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: formatOptions; text: formatOptions: {$0}; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -139,7 +139,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: constraints; text: constraints: {$0}; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -150,7 +150,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: mode; text: mode: '$0'; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -161,7 +161,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: parameters; text: parameters: {$0}; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -172,7 +172,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: events; text: events: {$0}; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -183,7 +183,7 @@ Array [ **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", "label: parts; text: parts: $0; kind:15; commit:undefined; sort:; documentation: kind:markdown,value:\`(typedef) sap.ui.base.ManagedObject.PropertyBindingInfo\` @@ -198,7 +198,7 @@ If a part is not specified as a binding info object but as a simple string, a bi **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", ] `; diff --git a/packages/binding/test/unit/services/hover/__snapshots__/hover.test.ts.snap b/packages/binding/test/unit/services/hover/__snapshots__/hover.test.ts.snap index 00818e99f..db5a246f3 100644 --- a/packages/binding/test/unit/services/hover/__snapshots__/hover.test.ts.snap +++ b/packages/binding/test/unit/services/hover/__snapshots__/hover.test.ts.snap @@ -14,7 +14,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, } `; @@ -33,7 +33,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, } `; @@ -52,7 +52,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, } `; @@ -71,7 +71,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, } `; @@ -90,7 +90,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, } `; @@ -109,7 +109,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.model.Filter)", }, } `; @@ -132,7 +132,7 @@ If a part is not specified as a binding info object but as a simple string, a bi **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, } `; @@ -151,7 +151,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, } `; @@ -170,7 +170,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, } `; @@ -189,7 +189,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, } `; @@ -208,7 +208,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, } `; @@ -227,7 +227,7 @@ Object { **Optional:** true -[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", +[More information](https://ui5.sap.com/1.108.26/#/api/sap.ui.base.ManagedObject.PropertyBindingInfo)", }, } `; diff --git a/packages/context/test/unit/manifest.test.ts b/packages/context/test/unit/manifest.test.ts index d352b19ad..b7f6247ae 100644 --- a/packages/context/test/unit/manifest.test.ts +++ b/packages/context/test/unit/manifest.test.ts @@ -96,7 +96,7 @@ describe("manifest", () => { }, mainServicePath: "/processor/", flexEnabled: true, - minUI5Version: "1.108.1", + minUI5Version: "1.108.26", }); }); @@ -255,7 +255,7 @@ describe("manifest", () => { }, mainServicePath: "/processor/", flexEnabled: true, - minUI5Version: "1.108.1", + minUI5Version: "1.108.26", }); } finally { mock.restore(); diff --git a/packages/fe/test/unit/services/completion/providers/filter-bar.test.ts b/packages/fe/test/unit/services/completion/providers/filter-bar.test.ts index c00af84f7..6db56b194 100644 --- a/packages/fe/test/unit/services/completion/providers/filter-bar.test.ts +++ b/packages/fe/test/unit/services/completion/providers/filter-bar.test.ts @@ -87,7 +87,7 @@ describe("filterBar id attribute value completion", () => { uri, settings ); - }, 5 * 60000); + }); describe("filterBar attribute completion", () => { it("id value completion", async function () { diff --git a/packages/language-server/test/unit/completion-items-classes.test.ts b/packages/language-server/test/unit/completion-items-classes.test.ts index 3d4f10de1..52c0281ee 100644 --- a/packages/language-server/test/unit/completion-items-classes.test.ts +++ b/packages/language-server/test/unit/completion-items-classes.test.ts @@ -26,7 +26,7 @@ describe("the UI5 language assistant Code Completion Services - classes", () => beforeAll(async function () { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/language-server/test/unit/completion-items-literals.test.ts b/packages/language-server/test/unit/completion-items-literals.test.ts index e8e5cbede..5cd9b9512 100644 --- a/packages/language-server/test/unit/completion-items-literals.test.ts +++ b/packages/language-server/test/unit/completion-items-literals.test.ts @@ -17,7 +17,7 @@ describe("the UI5 language assistant Code Completion Services", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/language-server/test/unit/completion-items.test.ts b/packages/language-server/test/unit/completion-items.test.ts index f1939ed7b..44c0ba215 100644 --- a/packages/language-server/test/unit/completion-items.test.ts +++ b/packages/language-server/test/unit/completion-items.test.ts @@ -30,7 +30,7 @@ describe("the UI5 language assistant Code Completion Services", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/language-server/test/unit/documentation.test.ts b/packages/language-server/test/unit/documentation.test.ts index 270817fec..2a2b372f0 100644 --- a/packages/language-server/test/unit/documentation.test.ts +++ b/packages/language-server/test/unit/documentation.test.ts @@ -11,7 +11,7 @@ describe("The @ui5-language-assistant/language-server fun beforeAll(async function () { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); diff --git a/packages/language-server/test/unit/hover.test.ts b/packages/language-server/test/unit/hover.test.ts index 89c15c319..c911e5dcc 100644 --- a/packages/language-server/test/unit/hover.test.ts +++ b/packages/language-server/test/unit/hover.test.ts @@ -23,7 +23,7 @@ describe("the UI5 language assistant Hover Tooltip Service", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/language-server/test/unit/quick-fix.test.ts b/packages/language-server/test/unit/quick-fix.test.ts index 86274df32..4983d9f0b 100644 --- a/packages/language-server/test/unit/quick-fix.test.ts +++ b/packages/language-server/test/unit/quick-fix.test.ts @@ -20,7 +20,7 @@ describe("The @ui5-language-assistant/language-server diagnostics quick fix func beforeAll(async function () { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/language-server/test/unit/snapshots/xml-view-diagnostics/snapshots-utils.ts b/packages/language-server/test/unit/snapshots/xml-view-diagnostics/snapshots-utils.ts index 200b6d4f8..b84e5e207 100644 --- a/packages/language-server/test/unit/snapshots/xml-view-diagnostics/snapshots-utils.ts +++ b/packages/language-server/test/unit/snapshots/xml-view-diagnostics/snapshots-utils.ts @@ -96,7 +96,7 @@ export function readSnapshotDiagnosticsLSPResponse( const ui5ModelPromise = generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); let ui5Model: UI5SemanticModel | undefined = undefined; diff --git a/packages/logic-utils/test/unit/find-classes-matching.test.ts b/packages/logic-utils/test/unit/find-classes-matching.test.ts index b7d9cc600..3a32b6b29 100644 --- a/packages/logic-utils/test/unit/find-classes-matching.test.ts +++ b/packages/logic-utils/test/unit/find-classes-matching.test.ts @@ -14,7 +14,7 @@ describe("The @ui5-language-assistant/logic-utils func beforeAll(async () => { ui5Model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); @@ -73,7 +73,7 @@ describe("The @ui5-language-assistant/logic-utils function", () let ui5Model: UI5SemanticModel; const beforeAllPromise = generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); diff --git a/packages/logic-utils/test/unit/get-super-class.test.ts b/packages/logic-utils/test/unit/get-super-class.test.ts index 137f8c32f..86f0e7652 100644 --- a/packages/logic-utils/test/unit/get-super-class.test.ts +++ b/packages/logic-utils/test/unit/get-super-class.test.ts @@ -36,7 +36,7 @@ describe("The @ui5-language-assistant/logic-utils function", ( const ui5Model = cloneDeep( await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }) ); diff --git a/packages/logic-utils/test/unit/xml-node-to-ui5-node.test.ts b/packages/logic-utils/test/unit/xml-node-to-ui5-node.test.ts index 99fd11eca..79918c114 100644 --- a/packages/logic-utils/test/unit/xml-node-to-ui5-node.test.ts +++ b/packages/logic-utils/test/unit/xml-node-to-ui5-node.test.ts @@ -22,7 +22,7 @@ describe("The @ui5-language-assistant/logic-utils func beforeAll(async () => { ui5Model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); @@ -105,7 +105,7 @@ describe("The @ui5-language-assistant/logic-utils { ui5Model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); @@ -187,7 +187,7 @@ describe("The @ui5-language-assistant/logic-utils { ui5Model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); @@ -337,7 +337,7 @@ describe("The @ui5-language-assistant/logic-utils fun beforeAll(async () => { ui5Model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); @@ -432,7 +432,7 @@ describe("The @ui5-language-assistant/logic-utils { ui5Model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); @@ -496,7 +496,7 @@ describe("The @ui5-language-assistant/logic-utils { ui5Model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); diff --git a/packages/semantic-model/jest.config.js b/packages/semantic-model/jest.config.js index eed72053f..406cef575 100644 --- a/packages/semantic-model/jest.config.js +++ b/packages/semantic-model/jest.config.js @@ -3,7 +3,6 @@ const defaultConfig = require("../../jest.config"); module.exports = { ...defaultConfig, - setupFilesAfterEnv: ["./jest.setup.js"], globals: { "ts-jest": { tsconfig: join(__dirname, "tsconfig-test.json"), diff --git a/packages/semantic-model/jest.setup.js b/packages/semantic-model/jest.setup.js deleted file mode 100644 index 522286048..000000000 --- a/packages/semantic-model/jest.setup.js +++ /dev/null @@ -1,5 +0,0 @@ -jest.setTimeout(300000); // 5 min - -// add all jest-extended matchers -const matchers = require("jest-extended"); -expect.extend(matchers); diff --git a/packages/semantic-model/test/unit/api-negative.test.ts b/packages/semantic-model/test/unit/api-negative.test.ts index ee77f16ad..243ff251c 100644 --- a/packages/semantic-model/test/unit/api-negative.test.ts +++ b/packages/semantic-model/test/unit/api-negative.test.ts @@ -17,12 +17,12 @@ describe("The ui5-language-assistant semantic model package API negative tests", ): () => UI5SemanticModel { const generateCall = (): UI5SemanticModel => { return generate({ - version: "1.71.49", + version: "1.71.60", libraries: { validLib: { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "validLib", symbols: [ { @@ -78,7 +78,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const validLibNamespaces = ["sap.valid", "sap"]; const invalidLibValidNamespaces = ["sap.validNS"]; expect(model).not.toBeUndefined(); - expect(model.version).toEqual("1.71.49"); + expect(model.version).toEqual("1.71.60"); expect(keys(model.namespaces)).toIncludeAllMembers(validLibNamespaces); if (onlyValidLibSymbols) { @@ -109,7 +109,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", describe("$schema-ref is not a string", () => { const fileContent = { "$schema-ref": 123, - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [validSymbolFromInvalidLib], }; @@ -145,7 +145,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", describe("library is not a string or undefined", () => { const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: 123, symbols: [validSymbolFromInvalidLib], }; @@ -163,7 +163,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", describe("symbols is not an array", () => { const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: 123, }; @@ -181,7 +181,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", describe("symbol with unknown kind exists", () => { const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -217,7 +217,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -248,7 +248,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -281,7 +281,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -314,7 +314,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -345,7 +345,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -378,7 +378,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -415,7 +415,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -446,7 +446,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -479,7 +479,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -514,7 +514,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -545,7 +545,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -578,7 +578,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -616,7 +616,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -660,7 +660,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -708,7 +708,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", describe("invalid extends for class", () => { const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -752,7 +752,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", describe("invalid implements for class", () => { const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -796,7 +796,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", describe("invalid defaultAggregation for class", () => { const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, @@ -837,7 +837,7 @@ describe("The ui5-language-assistant semantic model package API negative tests", describe("invalid type for class property", () => { const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "invalidLib", symbols: [ validSymbolFromInvalidLib, diff --git a/packages/semantic-model/test/unit/api.test.ts b/packages/semantic-model/test/unit/api.test.ts index 03a835387..b1889ce0b 100644 --- a/packages/semantic-model/test/unit/api.test.ts +++ b/packages/semantic-model/test/unit/api.test.ts @@ -308,7 +308,7 @@ describe("The ui5-language-assistant semantic model package API", () => { // TODO: old patches may be removed, should be updated continuously const versions: TestModelVersion[] = [ "1.60.44", - "1.71.49", + "1.71.60", "1.84.27", "1.96.11", // "1.105.0", @@ -325,7 +325,7 @@ describe("The ui5-language-assistant semantic model package API", () => { beforeAll(async () => { model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); @@ -394,7 +394,7 @@ describe("The ui5-language-assistant semantic model package API", () => { beforeAll(async () => { model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); diff --git a/packages/semantic-model/test/unit/unit.test.ts b/packages/semantic-model/test/unit/unit.test.ts index 322c342aa..10334ed6e 100644 --- a/packages/semantic-model/test/unit/unit.test.ts +++ b/packages/semantic-model/test/unit/unit.test.ts @@ -70,7 +70,7 @@ describe("The ui5-language-assistant semantic model package unit tests", () => { describe("generate", () => { function generateSymbol(symbol: SymbolBase): UI5SemanticModel { return generate({ - version: "1.71.49", + version: "1.71.60", strict: true, typeNameFix: {}, libraries: { @@ -210,7 +210,7 @@ describe("The ui5-language-assistant semantic model package unit tests", () => { describe("symbols is undefined", () => { const fileContent = { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", - version: "1.71.49", + version: "1.71.60", library: "testLib", }; @@ -241,7 +241,7 @@ describe("The ui5-language-assistant semantic model package unit tests", () => { libraries: Record ): UI5SemanticModel { const result = generate({ - version: "1.71.49", + version: "1.71.60", strict: false, typeNameFix: {}, libraries: libraries, diff --git a/packages/semantic-model/test/unit/utils.test.ts b/packages/semantic-model/test/unit/utils.test.ts index 7d208c1d4..15c93b34c 100644 --- a/packages/semantic-model/test/unit/utils.test.ts +++ b/packages/semantic-model/test/unit/utils.test.ts @@ -12,7 +12,7 @@ describe("The semantic model utils", () => { beforeAll(async () => { model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); }); diff --git a/packages/xml-views-completion/test/unit/api.test.ts b/packages/xml-views-completion/test/unit/api.test.ts index 9f268526a..0c4ca2b49 100644 --- a/packages/xml-views-completion/test/unit/api.test.ts +++ b/packages/xml-views-completion/test/unit/api.test.ts @@ -23,7 +23,7 @@ describe("The `getXMLViewCompletions()` api", () => { beforeAll(async function () { REAL_UI5_MODEL = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(REAL_UI5_MODEL); diff --git a/packages/xml-views-completion/test/unit/providers/attributeName/namespace.test.ts b/packages/xml-views-completion/test/unit/providers/attributeName/namespace.test.ts index b04b089c2..38186a759 100644 --- a/packages/xml-views-completion/test/unit/providers/attributeName/namespace.test.ts +++ b/packages/xml-views-completion/test/unit/providers/attributeName/namespace.test.ts @@ -154,7 +154,7 @@ describe("The ui5-language-assistant xml-views-completion", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-completion/test/unit/providers/attributeName/prop-event-assoc.test.ts b/packages/xml-views-completion/test/unit/providers/attributeName/prop-event-assoc.test.ts index 8b5bd7f31..49c3380d7 100644 --- a/packages/xml-views-completion/test/unit/providers/attributeName/prop-event-assoc.test.ts +++ b/packages/xml-views-completion/test/unit/providers/attributeName/prop-event-assoc.test.ts @@ -62,7 +62,7 @@ describe("The ui5-language-assistant xml-views-completion", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-completion/test/unit/providers/attributeValue/boolean-literal.test.ts b/packages/xml-views-completion/test/unit/providers/attributeValue/boolean-literal.test.ts index 23f213407..a00ed2bff 100644 --- a/packages/xml-views-completion/test/unit/providers/attributeValue/boolean-literal.test.ts +++ b/packages/xml-views-completion/test/unit/providers/attributeValue/boolean-literal.test.ts @@ -17,7 +17,7 @@ describe("The ui5-language-assistant xml-views-completion", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-completion/test/unit/providers/attributeValue/enum.test.ts b/packages/xml-views-completion/test/unit/providers/attributeValue/enum.test.ts index 9f38bb3b7..0d134dd1d 100644 --- a/packages/xml-views-completion/test/unit/providers/attributeValue/enum.test.ts +++ b/packages/xml-views-completion/test/unit/providers/attributeValue/enum.test.ts @@ -14,7 +14,7 @@ describe("The ui5-language-assistant xml-views-completion", () => { beforeAll(async function () { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-completion/test/unit/providers/attributeValue/namespace.test.ts b/packages/xml-views-completion/test/unit/providers/attributeValue/namespace.test.ts index 08154d9eb..dffb61927 100644 --- a/packages/xml-views-completion/test/unit/providers/attributeValue/namespace.test.ts +++ b/packages/xml-views-completion/test/unit/providers/attributeValue/namespace.test.ts @@ -31,7 +31,7 @@ describe("The ui5-editor-tools xml-views-completion", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-completion/test/unit/providers/elementName/aggregation.test.ts b/packages/xml-views-completion/test/unit/providers/elementName/aggregation.test.ts index b33d19d69..3aa3b458e 100644 --- a/packages/xml-views-completion/test/unit/providers/elementName/aggregation.test.ts +++ b/packages/xml-views-completion/test/unit/providers/elementName/aggregation.test.ts @@ -17,7 +17,7 @@ describe("The ui5-language-assistant xml-views-completion", () => { beforeAll(async () => { REAL_UI5_MODEL = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(REAL_UI5_MODEL); diff --git a/packages/xml-views-completion/test/unit/providers/elementName/classes.test.ts b/packages/xml-views-completion/test/unit/providers/elementName/classes.test.ts index 09fdc1bbb..543b344a6 100644 --- a/packages/xml-views-completion/test/unit/providers/elementName/classes.test.ts +++ b/packages/xml-views-completion/test/unit/providers/elementName/classes.test.ts @@ -25,7 +25,7 @@ describe("The ui5-language-assistant xml-views-completion", () => { beforeAll(async function () { ui5Model = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5Model); diff --git a/packages/xml-views-tooltip/test/unit/tooltip.test.ts b/packages/xml-views-tooltip/test/unit/tooltip.test.ts index 9dc728914..0567f96ff 100644 --- a/packages/xml-views-tooltip/test/unit/tooltip.test.ts +++ b/packages/xml-views-tooltip/test/unit/tooltip.test.ts @@ -21,7 +21,7 @@ describe("the UI5 language assistant Hover Tooltip Service", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/api.test.ts b/packages/xml-views-validation/test/unit/api.test.ts index 3fd1e34e7..daf1e6216 100644 --- a/packages/xml-views-validation/test/unit/api.test.ts +++ b/packages/xml-views-validation/test/unit/api.test.ts @@ -17,7 +17,7 @@ describe("the ui5 xml views validations API", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/helper.ts b/packages/xml-views-validation/test/unit/helper.ts new file mode 100644 index 000000000..48f4d03bc --- /dev/null +++ b/packages/xml-views-validation/test/unit/helper.ts @@ -0,0 +1,45 @@ +import { join } from "path"; +import type { UI5ValidatorsConfig, UI5XMLViewIssue } from "../../api"; +import { TestFramework } from "@ui5-language-assistant/test-framework"; +import { getContext } from "@ui5-language-assistant/context"; +import type { Context } from "@ui5-language-assistant/context"; +import { validateXMLView } from "@ui5-language-assistant/xml-views-validation"; + +export const getContent = (snippet: string): string => { + return ` + + ${snippet} + + + + `; +}; + +export const issueToSnapshot = (item: UI5XMLViewIssue): string => + `kind: ${item.kind}; text: ${item.message}; severity:${item.severity}; offsetRange:${item.offsetRange.start}-${item.offsetRange.end}`; + +export type GetViewValidator = (snippet: string) => Promise; +export const getViewValidator = + ( + framework: TestFramework, + viewFilePathSegments: string[], + validators: UI5ValidatorsConfig + ): GetViewValidator => + async (snippet: string): Promise => { + await framework.updateFile(viewFilePathSegments, snippet); + const root = framework.getProjectRoot(); + const documentPath = join(root, ...viewFilePathSegments); + const { ast } = await framework.readFile(viewFilePathSegments); + const context = (await getContext(documentPath)) as Context; + return validateXMLView({ + validators, + context: context, + xmlView: ast, + }); + }; diff --git a/packages/xml-views-validation/test/unit/validators/attributes/invalid-boolean-value.test.ts b/packages/xml-views-validation/test/unit/validators/attributes/invalid-boolean-value.test.ts index bf23c1e2e..a73b609bf 100644 --- a/packages/xml-views-validation/test/unit/validators/attributes/invalid-boolean-value.test.ts +++ b/packages/xml-views-validation/test/unit/validators/attributes/invalid-boolean-value.test.ts @@ -15,7 +15,7 @@ describe("the invalid boolean value validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/attributes/unknown-attribute-key.test.ts b/packages/xml-views-validation/test/unit/validators/attributes/unknown-attribute-key.test.ts index 008375ff2..f530df603 100644 --- a/packages/xml-views-validation/test/unit/validators/attributes/unknown-attribute-key.test.ts +++ b/packages/xml-views-validation/test/unit/validators/attributes/unknown-attribute-key.test.ts @@ -21,7 +21,7 @@ describe("the unknown attribute name validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/attributes/unknown-enum-value.test.ts b/packages/xml-views-validation/test/unit/validators/attributes/unknown-enum-value.test.ts index d6496ed3b..3c9b0f2e4 100644 --- a/packages/xml-views-validation/test/unit/validators/attributes/unknown-enum-value.test.ts +++ b/packages/xml-views-validation/test/unit/validators/attributes/unknown-enum-value.test.ts @@ -15,7 +15,7 @@ describe("the unknown enum value validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/attributes/unknown-xmlns-namespace.test.ts b/packages/xml-views-validation/test/unit/validators/attributes/unknown-xmlns-namespace.test.ts index 57de2c498..148673ba6 100644 --- a/packages/xml-views-validation/test/unit/validators/attributes/unknown-xmlns-namespace.test.ts +++ b/packages/xml-views-validation/test/unit/validators/attributes/unknown-xmlns-namespace.test.ts @@ -15,7 +15,7 @@ describe("the unknown namespace in xmlns attribute value validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/attributes/use-of-depracated-attribute.test.ts b/packages/xml-views-validation/test/unit/validators/attributes/use-of-depracated-attribute.test.ts index 840a4e1fc..0e1dd32f2 100644 --- a/packages/xml-views-validation/test/unit/validators/attributes/use-of-depracated-attribute.test.ts +++ b/packages/xml-views-validation/test/unit/validators/attributes/use-of-depracated-attribute.test.ts @@ -25,7 +25,7 @@ describe("the use of deprecated attribute validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/document/non-unique-id.test.ts b/packages/xml-views-validation/test/unit/validators/document/non-unique-id.test.ts index bd54d4faf..010fe94c6 100644 --- a/packages/xml-views-validation/test/unit/validators/document/non-unique-id.test.ts +++ b/packages/xml-views-validation/test/unit/validators/document/non-unique-id.test.ts @@ -27,7 +27,7 @@ describe("the use of non unique id validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/element/__snapshots__/unknown-tag-name.test.ts.snap b/packages/xml-views-validation/test/unit/validators/element/__snapshots__/unknown-tag-name.test.ts.snap new file mode 100644 index 000000000..3f34474fb --- /dev/null +++ b/packages/xml-views-validation/test/unit/validators/element/__snapshots__/unknown-tag-name.test.ts.snap @@ -0,0 +1,306 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`the unknown tag name validation negative edge cases tag with namespace ui5 namespace will detect an issue for sap.ui.core.ExtensionPoint in the root tag 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"ExtensionPoint\\" class doesn't exist. Enter a namespace.", + "offsetRange": Object { + "end": 16, + "start": 3, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag with namespace will detect an invalid aggregation name under known class tag without default aggregation 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"content_TYPO\\" name is neither a class name in the \\"sap.m\\" namespace nor an aggregation of the \\"sap.m.SplitApp\\" class.", + "offsetRange": Object { + "end": 176, + "start": 163, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag with namespace will detect an invalid aggregation when it's in the wrong namespace 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"content\\" class doesn't exist in the \\"sap.m\\" namespace.", + "offsetRange": Object { + "end": 138, + "start": 130, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag with namespace will detect an invalid class name in root tag 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"View_TYPO\\" class doesn't exist in the \\"sap.ui.core.mvc\\" namespace.", + "offsetRange": Object { + "end": 22, + "start": 10, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag with namespace will detect an invalid class name under aggregation 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"Button_TYPO\\" class doesn't exist in the \\"sap.m\\" namespace.", + "offsetRange": Object { + "end": 176, + "start": 164, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag with namespace will detect an invalid class name under aggregation in the same namespace 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"Button_TYPO\\" class doesn't exist in the \\"sap.ui.core.mvc\\" namespace.", + "offsetRange": Object { + "end": 111, + "start": 97, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag with namespace will detect an invalid class name under class that doesn't have a default aggregation 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"Button_TYPO\\" name is neither a class name in the \\"sap.m\\" namespace nor an aggregation of the \\"sap.m.SplitApp\\" class.", + "offsetRange": Object { + "end": 163, + "start": 151, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag with namespace will detect an invalid class name under class that has default aggregation 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"Button_TYPO\\" class doesn't exist in the \\"sap.m\\" namespace.", + "offsetRange": Object { + "end": 132, + "start": 120, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag with namespace will detect an issue for unknown name under unknown class in a known namespace 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"SplitApp_TYPO\\" class doesn't exist in the \\"sap.m\\" namespace.", + "offsetRange": Object { + "end": 134, + "start": 120, + }, + "severity": "error", + }, + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"Button_TYPO\\" name is neither a class name in the \\"sap.m\\" namespace nor an aggregation of its parent tag.", + "offsetRange": Object { + "end": 168, + "start": 156, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag without namespace when default namespace is a ui5 namespace will detect an issue for unknown name under unknown class in the default namespace 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"SplitApp_TYPO\\" name is neither a class name in the \\"sap.m\\" namespace nor an aggregation of the \\"sap.ui.core.mvc.View\\" class.", + "offsetRange": Object { + "end": 140, + "start": 128, + }, + "severity": "error", + }, + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"Button_TYPO\\" name is neither a class name in the \\"sap.m\\" namespace nor an aggregation of its parent tag.", + "offsetRange": Object { + "end": 174, + "start": 164, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag without namespace when default namespace is not defined will detect an invalid aggregation namespace under known class tag without default aggregation 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"content\\" aggregation must have the same namespace as the \\"sap.m.SplitApp\\" class.", + "offsetRange": Object { + "end": 169, + "start": 163, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag without namespace when default namespace is not defined will detect an invalid class name in root tag 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"View\\" class doesn't exist. Enter a namespace.", + "offsetRange": Object { + "end": 17, + "start": 14, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag without namespace when default namespace is not defined will detect an invalid class name under known aggregation tag 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"List\\" class doesn't exist. Enter a namespace.", + "offsetRange": Object { + "end": 106, + "start": 103, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag without namespace when default namespace is not defined will detect an invalid class or aggregation name under known class tag with default aggregation 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"List\\" name is neither a class name nor an aggregation of the \\"sap.ui.core.mvc.View\\" class.", + "offsetRange": Object { + "end": 72, + "start": 69, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios tag without namespace when default namespace is not defined will detect an issue for unknown name under unknown class in non-default non-ui5 namespace when name starts with uppercase 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"Button_TYPO\\" name is neither a class name nor an aggregation of its parent tag. Enter a namespace.", + "offsetRange": Object { + "end": 184, + "start": 174, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios when default namespace is a ui5 namespace will detect an invalid aggregation name under known class tag without default aggregation 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"content_TYPO\\" aggregation doesn't exist in the \\"sap.m.SplitApp\\" class.", + "offsetRange": Object { + "end": 160, + "start": 149, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios when default namespace is a ui5 namespace will detect an invalid class name in root tag 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"View_TYPO\\" class doesn't exist in the \\"sap.ui.core.mvc\\" namespace.", + "offsetRange": Object { + "end": 9, + "start": 1, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios when default namespace is a ui5 namespace will detect an invalid class name under known aggregation tag 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"List_TYPO\\" class doesn't exist in the \\"sap.ui.core.mvc\\" namespace.", + "offsetRange": Object { + "end": 111, + "start": 103, + }, + "severity": "error", + }, +] +`; + +exports[`the unknown tag name validation true positive scenarios when default namespace is a ui5 namespace will detect an invalid class or aggregation name under known class tag with default aggregation 1`] = ` +Array [ + Object { + "issueType": "base", + "kind": "UnknownTagName", + "message": "The \\"List_TYPO\\" name is neither a class name in the \\"sap.ui.core.mvc\\" namespace nor an aggregation of the \\"sap.ui.core.mvc.View\\" class.", + "offsetRange": Object { + "end": 69, + "start": 61, + }, + "severity": "error", + }, +] +`; diff --git a/packages/xml-views-validation/test/unit/validators/element/cardinality-of-aggregation.test.ts b/packages/xml-views-validation/test/unit/validators/element/cardinality-of-aggregation.test.ts index 1950e8726..0d5f87dfd 100644 --- a/packages/xml-views-validation/test/unit/validators/element/cardinality-of-aggregation.test.ts +++ b/packages/xml-views-validation/test/unit/validators/element/cardinality-of-aggregation.test.ts @@ -22,7 +22,7 @@ describe("the cardinality aggregation validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/element/non-stable-id.test.ts b/packages/xml-views-validation/test/unit/validators/element/non-stable-id.test.ts index 1ed80b5e4..7d99d72ba 100644 --- a/packages/xml-views-validation/test/unit/validators/element/non-stable-id.test.ts +++ b/packages/xml-views-validation/test/unit/validators/element/non-stable-id.test.ts @@ -22,7 +22,7 @@ describe("the use of non stable id validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/element/type-of-aggregation.test.ts b/packages/xml-views-validation/test/unit/validators/element/type-of-aggregation.test.ts index 5eba4e513..25b0ba14d 100644 --- a/packages/xml-views-validation/test/unit/validators/element/type-of-aggregation.test.ts +++ b/packages/xml-views-validation/test/unit/validators/element/type-of-aggregation.test.ts @@ -25,7 +25,7 @@ describe("the type aggregation validation", () => { beforeAll(async () => { ui5SemanticModel = await generateModel({ framework: "SAPUI5", - version: "1.71.49", + version: "1.71.60", modelGenerator: generate, }); appContext = getDefaultContext(ui5SemanticModel); diff --git a/packages/xml-views-validation/test/unit/validators/element/unknown-tag-name.test.ts b/packages/xml-views-validation/test/unit/validators/element/unknown-tag-name.test.ts index d1bded07d..271297b1a 100644 --- a/packages/xml-views-validation/test/unit/validators/element/unknown-tag-name.test.ts +++ b/packages/xml-views-validation/test/unit/validators/element/unknown-tag-name.test.ts @@ -1,41 +1,15 @@ -import { join } from "path"; -import { partial } from "lodash"; -import { - validations, - buildMessage, -} from "@ui5-language-assistant/user-facing-text"; import { validators } from "../../../../src/api"; -import { - assertNoIssues as assertNoIssuesBase, - assertSingleIssue as assertSingleIssueBase, - testValidationsScenario, - computeExpectedRanges, -} from "../../test-utils"; -import { - Context as AppContext, - getContext, -} from "@ui5-language-assistant/context"; import { Config, ProjectName, ProjectType, TestFramework, } from "@ui5-language-assistant/test-framework"; - -const { - UNKNOWN_CLASS_IN_NS, - UNKNOWN_CLASS_WITHOUT_NS, - UNKNOWN_AGGREGATION_IN_CLASS, - UNKNOWN_AGGREGATION_IN_CLASS_DIFF_NAMESPACE, - UNKNOWN_TAG_NAME_IN_CLASS, - UNKNOWN_TAG_NAME_IN_NS_UNDER_CLASS, - UNKNOWN_TAG_NAME_IN_NS, - UNKNOWN_TAG_NAME_NO_NS, -} = validations; +import { GetViewValidator, getViewValidator } from "../../helper"; describe("the unknown tag name validation", () => { - let appContext: AppContext; let framework: TestFramework; + let validateView: GetViewValidator; const viewFilePathSegments = [ "app", "manage_travels", @@ -54,470 +28,363 @@ describe("the unknown tag name validation", () => { }, }; framework = new TestFramework(config); - appContext = (await getContext( - join(framework.getProjectRoot(), ...viewFilePathSegments) - )) as AppContext; + validateView = getViewValidator(framework, viewFilePathSegments, { + attribute: [], + document: [], + element: [validators.validateUnknownTagName], + }); }); describe("true positive scenarios", () => { - let assertSingleIssue: (xmlSnippet: string, message: string) => void; - beforeAll(() => { - assertSingleIssue = partial( - assertSingleIssueBase, - appContext, - { - element: [validators.validateUnknownTagName], - }, - "UnknownTagName", - "error" - ); - }); - describe("tag with namespace", () => { - it("will detect an invalid class name in root tag", () => { - assertSingleIssue( - `<🢂mvc:View_TYPO🢀 - xmlns:mvc="sap.ui.core.mvc" - xmlns="sap.m"> - `, - buildMessage(UNKNOWN_CLASS_IN_NS.msg, "View_TYPO", "sap.ui.core.mvc") - ); + it("will detect an invalid class name in root tag", async () => { + const snippet = ` + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid class name under class that has default aggregation", () => { - assertSingleIssue( - ` - <🢂m:Button_TYPO🢀> - - `, - buildMessage(UNKNOWN_CLASS_IN_NS.msg, "Button_TYPO", "sap.m") - ); + it("will detect an invalid class name under class that has default aggregation", async () => { + const snippet = ` + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid class name under class that doesn't have a default aggregation", () => { - assertSingleIssue( - ` - - <🢂m:Button_TYPO🢀> - - - `, - buildMessage( - UNKNOWN_TAG_NAME_IN_NS_UNDER_CLASS.msg, - "Button_TYPO", - "sap.m", - "sap.m.SplitApp" - ) - ); + it("will detect an invalid class name under class that doesn't have a default aggregation", async () => { + const snippet = ` + + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid class name under aggregation", () => { - assertSingleIssue( - ` - - <🢂m:Button_TYPO🢀> - - - `, - buildMessage(UNKNOWN_CLASS_IN_NS.msg, "Button_TYPO", "sap.m") - ); + it("will detect an invalid class name under aggregation", async () => { + const snippet = ` + + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid aggregation when it's in the wrong namespace", () => { - assertSingleIssue( - ` - <🢂m:content🢀> - - `, - buildMessage(UNKNOWN_CLASS_IN_NS.msg, "content", "sap.m") - ); + it("will detect an invalid aggregation when it's in the wrong namespace", async () => { + const snippet = ` + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid class name under aggregation in the same namespace", () => { - assertSingleIssue( - ` - - <🢂mvc:Button_TYPO🢀> - - - `, - buildMessage( - UNKNOWN_CLASS_IN_NS.msg, - "Button_TYPO", - "sap.ui.core.mvc" - ) - ); + it("will detect an invalid class name under aggregation in the same namespace", async () => { + const snippet = ` + + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid aggregation name under known class tag without default aggregation", () => { - assertSingleIssue( - ` - - <🢂m:content_TYPO🢀> - - - `, - buildMessage( - UNKNOWN_TAG_NAME_IN_NS_UNDER_CLASS.msg, - "content_TYPO", - "sap.m", - "sap.m.SplitApp" - ) - ); + it("will detect an invalid aggregation name under known class tag without default aggregation", async () => { + const snippet = ` + + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an issue for unknown name under unknown class in a known namespace", () => { - const xmlSnippet = ` + it("will detect an issue for unknown name under unknown class in a known namespace", async () => { + const snippet = ` - <🢂m:SplitApp_TYPO🢀> - <🢂m:Button_TYPO🢀> - - - `; - const expectedRanges = computeExpectedRanges(xmlSnippet); - - testValidationsScenario({ - context: appContext, - xmlText: xmlSnippet, - validators: { element: [validators.validateUnknownTagName] }, - assertion: (issues) => { - expect(issues).toIncludeSameMembers([ - { - issueType: "base", - kind: "UnknownTagName", - message: buildMessage( - UNKNOWN_CLASS_IN_NS.msg, - "SplitApp_TYPO", - "sap.m" - ), - offsetRange: expectedRanges[0], - severity: "error", - }, - { - issueType: "base", - kind: "UnknownTagName", - message: buildMessage( - UNKNOWN_TAG_NAME_IN_NS.msg, - "Button_TYPO", - "sap.m" - ), - offsetRange: expectedRanges[1], - severity: "error", - }, - ]); - }, - }); + xmlns:mvc="sap.ui.core.mvc" + xmlns:m="sap.m" + > + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); }); describe("tag without namespace", () => { describe("when default namespace is not defined", () => { - it("will detect an invalid class name in root tag", () => { - assertSingleIssue( - `<🢂View🢀> - `, - buildMessage(UNKNOWN_CLASS_WITHOUT_NS.msg, "View") - ); - }); - - it("will detect an invalid class name under known aggregation tag", () => { - assertSingleIssue( - ` - - <🢂List🢀> - - `, - buildMessage(UNKNOWN_CLASS_WITHOUT_NS.msg, "List") - ); - }); - - it("will detect an invalid class or aggregation name under known class tag with default aggregation", () => { - assertSingleIssue( - ` - <🢂List🢀> - `, - buildMessage( - UNKNOWN_TAG_NAME_IN_CLASS.msg, - "List", - "sap.ui.core.mvc.View" - ) - ); - }); - - it("will detect an invalid aggregation namespace under known class tag without default aggregation", () => { - assertSingleIssue( - ` - - <🢂content🢀> - - - `, - buildMessage( - UNKNOWN_AGGREGATION_IN_CLASS_DIFF_NAMESPACE.msg, - "content", - "sap.m.SplitApp" - ) - ); - }); - - it("will detect an issue for unknown name under unknown class in non-default non-ui5 namespace when name starts with uppercase", () => { - assertSingleIssue( - ` - - <🢂Button_TYPO🢀> - - - `, - buildMessage(UNKNOWN_TAG_NAME_NO_NS.msg, "Button_TYPO") - ); + it("will detect an invalid class name in root tag", async () => { + const snippet = ` + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); + }); + + it("will detect an invalid class name under known aggregation tag", async () => { + const snippet = ` + + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); + }); + + it("will detect an invalid class or aggregation name under known class tag with default aggregation", async () => { + const snippet = ` + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); + }); + + it("will detect an invalid aggregation namespace under known class tag without default aggregation", async () => { + const snippet = ` + + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); + }); + + it("will detect an issue for unknown name under unknown class in non-default non-ui5 namespace when name starts with uppercase", async () => { + const snippet = ` + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); }); describe("when default namespace is a ui5 namespace", () => { - it("will detect an issue for unknown name under unknown class in the default namespace", () => { - const xmlSnippet = ` + it("will detect an issue for unknown name under unknown class in the default namespace", async () => { + const snippet = ` - <🢂SplitApp_TYPO🢀> - <🢂Button_TYPO🢀> - - - `; - const expectedRanges = computeExpectedRanges(xmlSnippet); - - testValidationsScenario({ - context: appContext, - xmlText: xmlSnippet, - validators: { element: [validators.validateUnknownTagName] }, - assertion: (issues) => { - expect(issues).toIncludeSameMembers([ - { - issueType: "base", - kind: "UnknownTagName", - message: buildMessage( - UNKNOWN_TAG_NAME_IN_NS_UNDER_CLASS.msg, - "SplitApp_TYPO", - "sap.m", - "sap.ui.core.mvc.View" - ), - offsetRange: expectedRanges[0], - severity: "error", - }, - { - issueType: "base", - kind: "UnknownTagName", - message: buildMessage( - UNKNOWN_TAG_NAME_IN_NS.msg, - "Button_TYPO", - "sap.m" - ), - offsetRange: expectedRanges[1], - severity: "error", - }, - ]); - }, - }); + xmlns:mvc="sap.ui.core.mvc" + xmlns="sap.m" + > + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); }); }); describe("when default namespace is a ui5 namespace", () => { - it("will detect an invalid class name in root tag", () => { - assertSingleIssue( - `<🢂View_TYPO🢀 - xmlns="sap.ui.core.mvc"> - `, - buildMessage(UNKNOWN_CLASS_IN_NS.msg, "View_TYPO", "sap.ui.core.mvc") - ); + it("will detect an invalid class name in root tag", async () => { + const snippet = ``; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid class name under known aggregation tag", () => { - assertSingleIssue( - ` - - <🢂List_TYPO🢀> - - `, - buildMessage(UNKNOWN_CLASS_IN_NS.msg, "List_TYPO", "sap.ui.core.mvc") - ); + it("will detect an invalid class name under known aggregation tag", async () => { + const snippet = ` + + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid class or aggregation name under known class tag with default aggregation", () => { - assertSingleIssue( - ` - <🢂List_TYPO🢀> - `, - buildMessage( - UNKNOWN_TAG_NAME_IN_NS_UNDER_CLASS.msg, - "List_TYPO", - "sap.ui.core.mvc", - "sap.ui.core.mvc.View" - ) - ); + it("will detect an invalid class or aggregation name under known class tag with default aggregation", async () => { + const snippet = ` + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); - it("will detect an invalid aggregation name under known class tag without default aggregation", () => { - assertSingleIssue( - ` - - <🢂content_TYPO🢀> - - - `, - buildMessage( - UNKNOWN_AGGREGATION_IN_CLASS.msg, - "content_TYPO", - "sap.m.SplitApp" - ) - ); + it("will detect an invalid aggregation name under known class tag without default aggregation", async () => { + const snippet = ` + + + + + `; + const result = await validateView(snippet); + expect(result).toMatchSnapshot(); }); }); }); describe("negative edge cases", () => { - let assertNoIssues: (xmlSnippet: string) => void; - beforeAll(() => { - assertNoIssues = partial(assertNoIssuesBase, appContext, { - element: [validators.validateUnknownTagName], - }); - }); - describe("tag with namespace", () => { describe("non-ui5 namespace", () => { - it("will not detect an issue when namespace is unknown", () => { - assertNoIssues( - ` - ` - ); - }); - - it("will not detect an issue when namespace is xhtml", () => { - assertNoIssues( - ` { + const snippet = ` + `; + const result = await validateView(snippet); + expect(result).toStrictEqual([]); + }); + + it("will not detect an issue when namespace is xhtml", async () => { + const snippet = ` + - ` - ); + + `; + const result = await validateView(snippet); + expect(result).toStrictEqual([]); }); - it("will not detect an issue when namespace is not defined in xmlns attribute", () => { - assertNoIssues( - ` - ` - ); + it("will not detect an issue when namespace is not defined in xmlns attribute", async () => { + const snippet = ` + + + `; + const result = await validateView(snippet); + expect(result).toStrictEqual([]); }); }); describe("ui5 namespace", () => { - let assertSingleIssue: (xmlSnippet: string, message: string) => void; - beforeAll(() => { - assertSingleIssue = partial( - assertSingleIssueBase, - appContext, - { - element: [validators.validateUnknownTagName], - }, - "UnknownTagName", - "error" - ); - }); - it("will not detect an issue for known class in the root tag", () => { - assertNoIssues( - ` { + const snippet = ` + - ` - ); + + `; + const result = await validateView(snippet); + expect(result).toStrictEqual([]); }); - it("will not detect an issue for sap.ui.core.FragmentDefinition in the root tag", () => { - assertNoIssues( - ` -