mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 13:43:09 +00:00
[Templates] Update mct-container spec
...to reflect change to template over templateUrl
This commit is contained in:
parent
164c2faf07
commit
9b21b0b7f2
@ -30,12 +30,12 @@ define(
|
||||
var testContainers = [
|
||||
{
|
||||
bundle: { path: "a", resources: "b" },
|
||||
templateUrl: "c/template.html",
|
||||
template: "<div>foo</div>",
|
||||
key: "abc"
|
||||
},
|
||||
{
|
||||
bundle: { path: "x", resources: "y" },
|
||||
templateUrl: "z/template.html",
|
||||
template: "<span>bar</span>",
|
||||
key: "xyz",
|
||||
attributes: [ "someAttr", "someOtherAttr" ]
|
||||
}
|
||||
@ -55,15 +55,15 @@ define(
|
||||
});
|
||||
|
||||
it("chooses a template based on key", function () {
|
||||
expect(mctContainer.templateUrl(
|
||||
expect(mctContainer.template(
|
||||
undefined,
|
||||
{ key: "abc" }
|
||||
)).toEqual("a/b/c/template.html");
|
||||
)).toEqual(testContainers[0].template);
|
||||
|
||||
expect(mctContainer.templateUrl(
|
||||
expect(mctContainer.template(
|
||||
undefined,
|
||||
{ key: "xyz" }
|
||||
)).toEqual("x/y/z/template.html");
|
||||
)).toEqual(testContainers[1].template);
|
||||
});
|
||||
|
||||
it("copies attributes needed by the container", function () {
|
||||
|
Loading…
Reference in New Issue
Block a user