-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/ai-contirbution
- Loading branch information
Showing
67 changed files
with
1,100 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import findUp from "find-up"; | ||
import { FileName } from "@sap-ux/project-access"; | ||
/** | ||
* Get path of a manifest.appdescr_variant file for adaption project. | ||
* @param documentPath path to a file e.g. absolute/path/webapp/ext/main/Main.view.xml | ||
*/ | ||
export async function finAdpdManifestPath( | ||
documentPath: string | ||
): Promise<string | undefined> { | ||
return findUp(FileName.ManifestAppDescrVar, { cwd: documentPath }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { join } from "path"; | ||
import { | ||
Config, | ||
ProjectName, | ||
ProjectType, | ||
TestFramework, | ||
} from "@ui5-language-assistant/test-framework"; | ||
import { finAdpdManifestPath } from "../../src/adp-manifest"; | ||
|
||
describe("adp-manifest", () => { | ||
let framework: TestFramework; | ||
beforeAll(function () { | ||
const useConfig: Config = { | ||
projectInfo: { | ||
name: ProjectName.cap, | ||
type: ProjectType.CAP, | ||
npmInstall: true, | ||
}, | ||
}; | ||
framework = new TestFramework(useConfig); | ||
}); | ||
|
||
afterEach(() => { | ||
jest.restoreAllMocks(); | ||
}); | ||
describe("finAdpdManifestPath", () => { | ||
beforeAll(function () { | ||
const useConfig: Config = { | ||
projectInfo: { | ||
name: ProjectName.adp, | ||
type: ProjectType.ADP, | ||
npmInstall: false, | ||
}, | ||
}; | ||
framework = new TestFramework(useConfig); | ||
}); | ||
it("undefined", async () => { | ||
const root = framework.getProjectRoot(); | ||
const result = await finAdpdManifestPath(root); | ||
expect(result).toBeUndefined(); | ||
}); | ||
it("path to manifest.appdescr_variant file", async () => { | ||
const root = framework.getProjectRoot(); | ||
const pathSegments = [ | ||
"webapp", | ||
"changes", | ||
"fragments", | ||
"actionToolbar.fragment.xml", | ||
]; | ||
const docPath = join(root, ...pathSegments); | ||
const result = await finAdpdManifestPath(docPath); | ||
expect(result).toEqual(join(root, "webapp", "manifest.appdescr_variant")); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.