@salesforcedevs/docs-components 0.22.0 → 0.26.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -6
- package/src/modules/doc/header/header.css +5 -2
- package/src/modules/doc/header/header.html +1 -0
- package/src/modules/doc/header/header.ts +1 -1
- package/LICENSE +0 -12
- package/src/modules/doc/content/__tests__/content.test.ts +0 -312
- package/src/modules/doc/content/__tests__/mockDocContent.ts +0 -348
- package/src/modules/doc/content/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/content/__tests__/mockSidebar.ts +0 -81
- package/src/modules/doc/content/content.stories.ts +0 -148
- package/src/modules/doc/contentCallout/__tests__/contentCallout.test.ts +0 -80
- package/src/modules/doc/contentCallout/__tests__/mockProps.ts +0 -14
- package/src/modules/doc/contentCallout/contentCallout.stories.ts +0 -29
- package/src/modules/doc/contentMedia/__tests__/contentMedia.test.ts +0 -93
- package/src/modules/doc/contentMedia/contentMedia.stories.ts +0 -113
- package/src/modules/doc/header/__tests__/coveoConfig.ts +0 -6
- package/src/modules/doc/header/__tests__/header.test.ts +0 -437
- package/src/modules/doc/header/__tests__/mockNavDevelopers.ts +0 -427
- package/src/modules/doc/header/__tests__/mockNavs.ts +0 -115
- package/src/modules/doc/header/__tests__/mockProps.ts +0 -152
- package/src/modules/doc/header/header.stories.ts +0 -190
- package/src/modules/doc/headingAnchor/__tests__/headingAnchor.test.ts +0 -110
- package/src/modules/doc/headingAnchor/headingAnchor.stories.ts +0 -33
- package/src/modules/doc/nav/__tests__/mockAvailableLanguages.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockAvailableVersions.ts +0 -122
- package/src/modules/doc/nav/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockPdfUrl.ts +0 -1
- package/src/modules/doc/nav/__tests__/mockSelectedLanguage.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockSelectedVersion.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockToc.ts +0 -146
- package/src/modules/doc/nav/__tests__/nav.test.ts +0 -58
- package/src/modules/doc/phase/__tests__/mockProps.ts +0 -13
- package/src/modules/doc/phase/__tests__/phase.test.ts +0 -60
- package/src/modules/doc/phase/phase.stories.ts +0 -12
- package/src/modules/doc/toc/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/toc/__tests__/mockToc.ts +0 -146
- package/src/modules/doc/toc/__tests__/toc.test.ts +0 -29
- package/src/modules/doc/toolbar/__tests__/mockAvailableLanguages.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/mockAvailableVersions.ts +0 -122
- package/src/modules/doc/toolbar/__tests__/mockPdfUrl.ts +0 -1
- package/src/modules/doc/toolbar/__tests__/mockSelectedLanguage.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/mockSelectedVersion.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/toolbar.test.ts +0 -44
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import Nav from "doc/nav";
|
|
2
|
-
import mockAvailableLanguages from "./mockAvailableLanguages";
|
|
3
|
-
import mockAvailableVersions from "./mockAvailableVersions";
|
|
4
|
-
import mockSelectedLanguage from "./mockSelectedLanguage";
|
|
5
|
-
import mockSelectedVersion from "./mockSelectedVersion";
|
|
6
|
-
import mockPdfUrl from "./mockPdfUrl";
|
|
7
|
-
import mockToc from "./mockToc";
|
|
8
|
-
import mockPageReference from "./mockPageReference";
|
|
9
|
-
import { createRenderComponent } from "utils/tests";
|
|
10
|
-
|
|
11
|
-
const MOCK_PARAMETERS = {
|
|
12
|
-
selectedLanguage: mockSelectedLanguage,
|
|
13
|
-
selectedVersion: mockSelectedVersion,
|
|
14
|
-
availableLanguages: mockAvailableLanguages,
|
|
15
|
-
availableVersions: mockAvailableVersions,
|
|
16
|
-
pdfUrl: mockPdfUrl,
|
|
17
|
-
toc: mockToc,
|
|
18
|
-
pageReference: mockPageReference
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const TAG = "doc-nav";
|
|
22
|
-
const render = createRenderComponent(TAG, Nav);
|
|
23
|
-
|
|
24
|
-
describe("doc-nav", () => {
|
|
25
|
-
it("renders the content", () => {
|
|
26
|
-
const component = render(MOCK_PARAMETERS);
|
|
27
|
-
|
|
28
|
-
const tocEl = component.shadowRoot.querySelector("dx-sidebar");
|
|
29
|
-
expect(tocEl).not.toBeNull();
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("fires the event", () => {
|
|
33
|
-
const component = render(MOCK_PARAMETERS);
|
|
34
|
-
|
|
35
|
-
const tocEl: HTMLElement = component.shadowRoot.querySelector(
|
|
36
|
-
"dx-sidebar"
|
|
37
|
-
);
|
|
38
|
-
const mockNavClick = jest.fn();
|
|
39
|
-
component.addEventListener("navclick", mockNavClick);
|
|
40
|
-
tocEl.dispatchEvent(
|
|
41
|
-
new CustomEvent("select", {
|
|
42
|
-
detail: {
|
|
43
|
-
name: "apex_dev_guide-hashtest"
|
|
44
|
-
},
|
|
45
|
-
bubbles: true,
|
|
46
|
-
composed: true
|
|
47
|
-
})
|
|
48
|
-
);
|
|
49
|
-
expect(mockNavClick).toHaveBeenCalledTimes(1);
|
|
50
|
-
expect(mockNavClick.mock.calls[0][0].detail).toEqual({
|
|
51
|
-
pageReference: {
|
|
52
|
-
...mockPageReference,
|
|
53
|
-
contentDocumentId: "apex_dev_guide.htm",
|
|
54
|
-
hash: "hashtest"
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
phase: "dev-preview",
|
|
3
|
-
title: "Developer Preview",
|
|
4
|
-
body: `This feature is not generally available and is being piloted with
|
|
5
|
-
certain Customers subject to additional terms and conditions. It
|
|
6
|
-
is not part of your purchased Services. This feature is subject to
|
|
7
|
-
change, may be discontinued with no notice at any time in SFDC’s
|
|
8
|
-
available. Make your purchase decisions only on the basis of
|
|
9
|
-
generally available products and features. This feature is made
|
|
10
|
-
available on an AS IS basis and use of this feature is at your
|
|
11
|
-
sole risk. Check <a href="https://developer.salesforce.com/">
|
|
12
|
-
Developers Website</a> for more information.`
|
|
13
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import DocPhase from "doc/phase";
|
|
2
|
-
import { createRenderComponent } from "utils/tests";
|
|
3
|
-
import mockProps from "./mockProps";
|
|
4
|
-
|
|
5
|
-
const TAG = "doc-phase";
|
|
6
|
-
const render = createRenderComponent(TAG, DocPhase);
|
|
7
|
-
|
|
8
|
-
describe(TAG, () => {
|
|
9
|
-
let element: any;
|
|
10
|
-
|
|
11
|
-
beforeEach(() => {
|
|
12
|
-
element = render({
|
|
13
|
-
docPhaseInfo: mockProps
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("renders the icon, title & body with the default phase", async () => {
|
|
18
|
-
const els = [
|
|
19
|
-
".doc-phase-container",
|
|
20
|
-
".doc-phase-icon",
|
|
21
|
-
".doc-phase-title",
|
|
22
|
-
".doc-phase-body"
|
|
23
|
-
].map((query) => element.shadowRoot.querySelector(query));
|
|
24
|
-
|
|
25
|
-
expect(els).not.toContain(null);
|
|
26
|
-
|
|
27
|
-
await expect(element).toBeAccessible();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it("hides the body when clicking button on expand state", async () => {
|
|
31
|
-
|
|
32
|
-
const showOrHideButton = element.shadowRoot.querySelector("dx-button");
|
|
33
|
-
|
|
34
|
-
const docPhaseBody: HTMLSpanElement =
|
|
35
|
-
element.shadowRoot.querySelector(".doc-phase-body");
|
|
36
|
-
|
|
37
|
-
showOrHideButton.click();
|
|
38
|
-
|
|
39
|
-
return Promise.resolve().then(() => {
|
|
40
|
-
expect(docPhaseBody.classList).toContain("doc-phase-body-hidden");
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it("shows the body when clicking button on collapse state", async () => {
|
|
45
|
-
|
|
46
|
-
const showOrHideButton = element.shadowRoot.querySelector("dx-button");
|
|
47
|
-
|
|
48
|
-
const docPhaseBody: HTMLSpanElement =
|
|
49
|
-
element.shadowRoot.querySelector(".doc-phase-body");
|
|
50
|
-
|
|
51
|
-
showOrHideButton.click();
|
|
52
|
-
showOrHideButton.click();
|
|
53
|
-
|
|
54
|
-
return Promise.resolve().then(() => {
|
|
55
|
-
expect(docPhaseBody.classList).not.toContain(
|
|
56
|
-
"doc-phase-body-hidden"
|
|
57
|
-
);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import mockProps from "./__tests__/mockProps";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "docs/doc-phase",
|
|
5
|
-
component: "doc-phase"
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const docPhaseInfo = JSON.stringify(mockProps);
|
|
9
|
-
|
|
10
|
-
export const Default = () => `
|
|
11
|
-
<doc-phase doc-phase-info='${docPhaseInfo}'></doc-phase>
|
|
12
|
-
`;
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
{
|
|
3
|
-
children: [
|
|
4
|
-
{
|
|
5
|
-
text: "Overview",
|
|
6
|
-
a_attr: {
|
|
7
|
-
href: "actions_intro_overview.htm"
|
|
8
|
-
},
|
|
9
|
-
id: "actions_intro_overview"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
text: "Invoking Actions",
|
|
13
|
-
a_attr: {
|
|
14
|
-
href: "actions_intro_invoking.htm"
|
|
15
|
-
},
|
|
16
|
-
id: "actions_intro_invoking"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
text: "Available Actions",
|
|
20
|
-
a_attr: {
|
|
21
|
-
href: "actions_intro_list.htm"
|
|
22
|
-
},
|
|
23
|
-
id: "actions_intro_list"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
text: "Introducing Actions",
|
|
27
|
-
a_attr: {
|
|
28
|
-
href: "actions_intro.htm"
|
|
29
|
-
},
|
|
30
|
-
id: "actions_intro"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
children: [
|
|
34
|
-
{
|
|
35
|
-
text: "Apex Actions",
|
|
36
|
-
a_attr: {
|
|
37
|
-
href: "actions_obj_apex.htm"
|
|
38
|
-
},
|
|
39
|
-
id: "actions_obj_apex"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
text: "Create Service Report Actions",
|
|
43
|
-
a_attr: {
|
|
44
|
-
href: "actions_obj_create_service_report.htm"
|
|
45
|
-
},
|
|
46
|
-
id: "actions_obj_create_service_report"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
text: "Custom Notification Actions",
|
|
50
|
-
a_attr: {
|
|
51
|
-
href: "actions_obj_custom_notification.htm"
|
|
52
|
-
},
|
|
53
|
-
id: "actions_obj_custom_notification"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
text: "Email Alert Actions",
|
|
57
|
-
a_attr: {
|
|
58
|
-
href: "actions_obj_email_alert.htm"
|
|
59
|
-
},
|
|
60
|
-
id: "actions_obj_email_alert"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
text: "Flow Actions",
|
|
64
|
-
a_attr: {
|
|
65
|
-
href: "actions_obj_flow.htm"
|
|
66
|
-
},
|
|
67
|
-
id: "actions_obj_flow"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
text: "Generate Work Orders Actions",
|
|
71
|
-
a_attr: {
|
|
72
|
-
href: "actions_obj_generate_work_orders.htm"
|
|
73
|
-
},
|
|
74
|
-
id: "actions_obj_generate_work_orders"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
text: "Knowledge Actions",
|
|
78
|
-
a_attr: {
|
|
79
|
-
href: "actions_obj_knowledge.htm"
|
|
80
|
-
},
|
|
81
|
-
id: "actions_obj_knowledge"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
text: "Omni-Channel Action",
|
|
85
|
-
a_attr: {
|
|
86
|
-
href: "actions_obj_omni_channel.htm"
|
|
87
|
-
},
|
|
88
|
-
id: "actions_obj_omni_channel"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
text: "PlatformAction",
|
|
92
|
-
a_attr: {
|
|
93
|
-
href: "sforce_api_objects_platformaction.htm"
|
|
94
|
-
},
|
|
95
|
-
id: "sforce_api_objects_platformaction"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
text: "Post to Chatter Actions",
|
|
99
|
-
a_attr: {
|
|
100
|
-
href: "actions_obj_post_to_chatter.htm"
|
|
101
|
-
},
|
|
102
|
-
id: "actions_obj_post_to_chatter"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
text: "Quick Actions",
|
|
106
|
-
a_attr: {
|
|
107
|
-
href: "actions_obj_quick_action.htm"
|
|
108
|
-
},
|
|
109
|
-
id: "actions_obj_quick_action"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
text: "Refresh Metric Actions",
|
|
113
|
-
a_attr: {
|
|
114
|
-
href: "actions_obj_refresh_metric.htm"
|
|
115
|
-
},
|
|
116
|
-
id: "actions_obj_refresh_metric"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
text: "Salesforce Order Management Actions",
|
|
120
|
-
a_attr: {
|
|
121
|
-
href: "actions_obj_order_management.htm"
|
|
122
|
-
},
|
|
123
|
-
id: "actions_obj_order_management"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
text: "Simple Email Actions",
|
|
127
|
-
a_attr: {
|
|
128
|
-
href: "actions_obj_email_simple.htm"
|
|
129
|
-
},
|
|
130
|
-
id: "actions_obj_email_simple"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
text: "Submit for Approval Actions",
|
|
134
|
-
a_attr: {
|
|
135
|
-
href: "actions_obj_submit_for_approval.htm"
|
|
136
|
-
},
|
|
137
|
-
id: "actions_obj_submit_for_approval"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
text: "Action Objects",
|
|
141
|
-
a_attr: {
|
|
142
|
-
href: "actions_obj.htm"
|
|
143
|
-
},
|
|
144
|
-
id: "actions_obj"
|
|
145
|
-
}
|
|
146
|
-
];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { createElement } from "lwc";
|
|
2
|
-
import Toc from "../toc";
|
|
3
|
-
import mockToc from "./mockToc";
|
|
4
|
-
import mockPageReference from "./mockPageReference";
|
|
5
|
-
|
|
6
|
-
const create = (props?: object) => {
|
|
7
|
-
const component = createElement("doc-toc", {
|
|
8
|
-
is: Toc
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
Object.assign(component, {
|
|
12
|
-
toc: mockToc,
|
|
13
|
-
pageReference: mockPageReference,
|
|
14
|
-
...(props || {})
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
return component;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
describe("doc-toc", () => {
|
|
21
|
-
it("renders the navigation", () => {
|
|
22
|
-
const component = create();
|
|
23
|
-
document.body.appendChild(component);
|
|
24
|
-
const containerEl = component.shadowRoot.querySelector(
|
|
25
|
-
".doc-toc-container"
|
|
26
|
-
);
|
|
27
|
-
expect(containerEl).not.toBeNull();
|
|
28
|
-
});
|
|
29
|
-
});
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
{
|
|
3
|
-
version_text: "Winter '21 (API version 50.0)",
|
|
4
|
-
release_version: "50.0",
|
|
5
|
-
doc_version: "228.0",
|
|
6
|
-
version_url: "atlas.en-us.apexcode.meta"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
version_text: "Summer '20 (API version 49.0)",
|
|
10
|
-
release_version: "49.0",
|
|
11
|
-
doc_version: "226.0",
|
|
12
|
-
version_url: "atlas.en-us.226.0.apexcode.meta"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
version_text: "Spring '20 (API version 48.0)",
|
|
16
|
-
release_version: "48.0",
|
|
17
|
-
doc_version: "224.0",
|
|
18
|
-
version_url: "atlas.en-us.224.0.apexcode.meta"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
version_text: "Winter '20 (API version 47.0)",
|
|
22
|
-
release_version: "47.0",
|
|
23
|
-
doc_version: "222.0",
|
|
24
|
-
version_url: "atlas.en-us.222.0.apexcode.meta"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
version_text: "Summer '19 (API version 46.0)",
|
|
28
|
-
release_version: "46.0",
|
|
29
|
-
doc_version: "220.0",
|
|
30
|
-
version_url: "atlas.en-us.220.0.apexcode.meta"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
version_text: "Spring '19 (API version 45.0)",
|
|
34
|
-
release_version: "45.0",
|
|
35
|
-
doc_version: "218.0",
|
|
36
|
-
version_url: "atlas.en-us.218.0.apexcode.meta"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
version_text: "Winter '19 (API version 44.0)",
|
|
40
|
-
release_version: "44.0",
|
|
41
|
-
doc_version: "216.0",
|
|
42
|
-
version_url: "atlas.en-us.216.0.apexcode.meta"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
version_text: "Summer '18 (API version 43.0)",
|
|
46
|
-
release_version: "43.0",
|
|
47
|
-
doc_version: "214.0",
|
|
48
|
-
version_url: "atlas.en-us.214.0.apexcode.meta"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
version_text: "Spring '18 (API version 42.0)",
|
|
52
|
-
release_version: "42.0",
|
|
53
|
-
doc_version: "212.0",
|
|
54
|
-
version_url: "atlas.en-us.212.0.apexcode.meta"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
version_text: "Winter '18 (API version 41.0)",
|
|
58
|
-
release_version: "41.0",
|
|
59
|
-
doc_version: "210.0",
|
|
60
|
-
version_url: "atlas.en-us.210.0.apexcode.meta"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
version_text: "Summer '17 (API version 40.0)",
|
|
64
|
-
release_version: "40.0",
|
|
65
|
-
doc_version: "208.0",
|
|
66
|
-
version_url: "atlas.en-us.208.0.apexcode.meta"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
version_text: "Spring '17 (API version 39.0)",
|
|
70
|
-
release_version: "39.0",
|
|
71
|
-
doc_version: "206.0",
|
|
72
|
-
version_url: "atlas.en-us.206.0.apexcode.meta"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
version_text: "Winter '17 (API version 38.0)",
|
|
76
|
-
release_version: "38.0",
|
|
77
|
-
doc_version: "204.0",
|
|
78
|
-
version_url: "atlas.en-us.204.0.apexcode.meta"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
version_text: "Summer '16 (API version 37.0)",
|
|
82
|
-
release_version: "37.0",
|
|
83
|
-
doc_version: "202.0",
|
|
84
|
-
version_url: "atlas.en-us.202.0.apexcode.meta"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
version_text: "Spring '16 (API version 36.0)",
|
|
88
|
-
release_version: "36.0",
|
|
89
|
-
doc_version: "200.0",
|
|
90
|
-
version_url: "atlas.en-us.200.0.apexcode.meta"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
version_text: "Winter '16 (API version 35.0)",
|
|
94
|
-
release_version: "35.0",
|
|
95
|
-
doc_version: "198.0",
|
|
96
|
-
version_url: "atlas.en-us.198.0.apexcode.meta"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
version_text: "Summer '15 (API version 34.0)",
|
|
100
|
-
release_version: "34.0",
|
|
101
|
-
doc_version: "196.0",
|
|
102
|
-
version_url: "atlas.en-us.196.0.apexcode.meta"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
version_text: "Spring '15 (API version 33.0)",
|
|
106
|
-
release_version: "33.0",
|
|
107
|
-
doc_version: "194.0",
|
|
108
|
-
version_url: "atlas.en-us.194.0.apexcode.meta"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
version_text: "Winter '15 (API version 32.0)",
|
|
112
|
-
release_version: "32.0",
|
|
113
|
-
doc_version: "192.0",
|
|
114
|
-
version_url: "atlas.en-us.192.0.apexcode.meta"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
version_text: "Spring '14 (API version 30.0)",
|
|
118
|
-
release_version: "30.0",
|
|
119
|
-
doc_version: "188.0",
|
|
120
|
-
version_url: "atlas.en-us.188.0.apexcode.meta"
|
|
121
|
-
}
|
|
122
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default "https://resources.docs.salesforce.com/228/latest/en-us/sfdc/pdf/salesforce_apex_language_reference.pdf";
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { createElement } from "lwc";
|
|
2
|
-
import Toolbar from "../toolbar";
|
|
3
|
-
import mockAvailableLanguages from "./mockAvailableLanguages";
|
|
4
|
-
import mockAvailableVersions from "./mockAvailableVersions";
|
|
5
|
-
import mockSelectedLanguage from "./mockSelectedLanguage";
|
|
6
|
-
import mockSelectedVersion from "./mockSelectedVersion";
|
|
7
|
-
import mockPdfUrl from "./mockPdfUrl";
|
|
8
|
-
|
|
9
|
-
const create = (props?: object) => {
|
|
10
|
-
const component = createElement("doc-toolbar", {
|
|
11
|
-
is: Toolbar
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
Object.assign(component, {
|
|
15
|
-
selectedLanguage: mockSelectedLanguage,
|
|
16
|
-
selectedVersion: mockSelectedVersion,
|
|
17
|
-
availableLanguages: mockAvailableLanguages,
|
|
18
|
-
availableVersions: mockAvailableVersions,
|
|
19
|
-
pdfUrl: mockPdfUrl,
|
|
20
|
-
...(props || {})
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
return component;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
describe("doc-toolbar", () => {
|
|
27
|
-
it("renders the container div when created", () => {
|
|
28
|
-
const component = create();
|
|
29
|
-
document.body.appendChild(component);
|
|
30
|
-
const containerEl = component.shadowRoot.querySelector(
|
|
31
|
-
".doc-toolbar-container"
|
|
32
|
-
);
|
|
33
|
-
expect(containerEl).not.toBeNull();
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("renders all selects", () => {
|
|
37
|
-
const component = create();
|
|
38
|
-
document.body.appendChild(component);
|
|
39
|
-
const selectEls = component.shadowRoot.querySelectorAll(
|
|
40
|
-
".doc-toolbar-item"
|
|
41
|
-
);
|
|
42
|
-
expect(selectEls.length).toEqual(2);
|
|
43
|
-
});
|
|
44
|
-
});
|