@salesforcedevs/sfdocs-e2e 1.0.7-liquid-alpha.1 → 1.0.7-liquid-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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/sfdocs-e2e",
3
- "version": "1.0.7-liquid-alpha.1",
3
+ "version": "1.0.7-liquid-alpha.2",
4
4
  "description": "E2E test suite for SFDocs static portal pages (SSG)",
5
5
  "license": "ISC",
6
6
  "bin": {
@@ -0,0 +1,71 @@
1
+ import GuidePage from '../pageobjects/guide.page';
2
+
3
+ let page: GuidePage;
4
+ let liquidEnabled = false;
5
+
6
+ describe('Liquid Template Rendering — Advanced', () => {
7
+ before(async () => {
8
+ try {
9
+ page = new GuidePage('/docs/liquid-project/guide/liquid-quickstart.html');
10
+ await browser.url(page.path);
11
+ await page.waitPageLoad();
12
+
13
+ const content = await $('>>>doc-content-layout');
14
+ const text = await content.getText();
15
+
16
+ liquidEnabled = text.includes('Hello from data.yaml');
17
+ } catch (e) {
18
+ liquidEnabled = false;
19
+ }
20
+ });
21
+
22
+ beforeEach(async () => {
23
+ if (liquidEnabled) {
24
+ page = new GuidePage('/docs/liquid-project/guide/liquid-quickstart.html');
25
+ await browser.url(page.path);
26
+ await page.waitPageLoad();
27
+ }
28
+ });
29
+
30
+ it('Should render repository-level variables from content-config.yml', async function () {
31
+ if (!liquidEnabled) {
32
+ this.skip();
33
+ }
34
+
35
+ const content = await $('>>>doc-content-layout');
36
+ const text = await content.getText();
37
+ const html = await content.getHTML();
38
+
39
+ expect(text.includes('Salesforce Platform')).toBeTruthy();
40
+ expect(text.includes('62.0')).toBeTruthy();
41
+ expect(text.includes('sf')).toBeTruthy();
42
+ expect(html.includes('{{ variables.platform')).toBeFalsy();
43
+ });
44
+
45
+ it('Should render future block content when previewFuture is enabled', async function () {
46
+ if (!liquidEnabled) {
47
+ this.skip();
48
+ }
49
+
50
+ const content = await $('>>>doc-content-layout');
51
+ const text = await content.getText();
52
+
53
+ expect(text.includes('Coming Soon')).toBeTruthy();
54
+ });
55
+
56
+ it('Should render the future topic page when previewFuture is enabled', async function () {
57
+ if (!liquidEnabled) {
58
+ this.skip();
59
+ }
60
+
61
+ const futurePage = new GuidePage('/docs/liquid-project/guide/future-topic.html');
62
+ await browser.url(futurePage.path);
63
+ await futurePage.waitPageLoad();
64
+
65
+ const content = await $('>>>doc-content-layout');
66
+ const text = await content.getText();
67
+
68
+ expect(text.includes('Future Feature')).toBeTruthy();
69
+ expect(text.includes('previewFuture')).toBeTruthy();
70
+ });
71
+ });
@@ -108,21 +108,6 @@ describe('Liquid Template Rendering', () => {
108
108
  expect(html.includes('{{ id2 }}')).toBeFalsy();
109
109
  });
110
110
 
111
- it('Should render repository-level variables from content-config.yml', async function () {
112
- if (!liquidEnabled) {
113
- this.skip();
114
- }
115
-
116
- const content = await $('>>>doc-content-layout');
117
- const text = await content.getText();
118
- const html = await content.getHTML();
119
-
120
- expect(text.includes('Salesforce Platform')).toBeTruthy();
121
- expect(text.includes('62.0')).toBeTruthy();
122
- expect(text.includes('sf')).toBeTruthy();
123
- expect(html.includes('{{ variables.platform')).toBeFalsy();
124
- });
125
-
126
111
  it('Should render englishonly block content in production', async function () {
127
112
  if (!liquidEnabled) {
128
113
  this.skip();
@@ -137,17 +122,6 @@ describe('Liquid Template Rendering', () => {
137
122
  expect(html.includes('{% endenglishonly')).toBeFalsy();
138
123
  });
139
124
 
140
- it('Should render future block content when previewFuture is enabled', async function () {
141
- if (!liquidEnabled) {
142
- this.skip();
143
- }
144
-
145
- const content = await $('>>>doc-content-layout');
146
- const text = await content.getText();
147
-
148
- expect(text.includes('Coming Soon')).toBeTruthy();
149
- });
150
-
151
125
  it('Should render liquid.data string format — single YAML file on root context', async function () {
152
126
  if (!liquidEnabled) {
153
127
  this.skip();
@@ -164,36 +138,19 @@ describe('Liquid Template Rendering', () => {
164
138
  this.skip();
165
139
  }
166
140
 
167
- const dataFormatsPage = new GuidePage('/docs/redirects-url/guide/orders-api-overview.html');
168
- await browser.url(dataFormatsPage.path);
169
- await dataFormatsPage.waitPageLoad();
141
+ const multiDataPage = new GuidePage('/docs/liquid-project/guide/multi-data.html');
142
+ await browser.url(multiDataPage.path);
143
+ await multiDataPage.waitPageLoad();
170
144
 
171
145
  const content = await $('>>>doc-content-layout');
172
146
  const text = await content.getText();
173
147
  const html = await content.getHTML();
174
148
 
175
149
  expect(text.includes('Sample data file to check the multi-include')).toBeTruthy();
176
- expect(text.includes('Represents a scheduled or completed visit')).toBeTruthy();
177
150
  expect(html.includes('{{ two.summary }}')).toBeFalsy();
178
151
  expect(html.includes('{{ data.one.summary }}')).toBeFalsy();
179
152
  });
180
153
 
181
- it('Should render the future topic page when previewFuture is enabled', async function () {
182
- if (!liquidEnabled) {
183
- this.skip();
184
- }
185
-
186
- const futurePage = new GuidePage('/docs/liquid-project/guide/future-topic.html');
187
- await browser.url(futurePage.path);
188
- await futurePage.waitPageLoad();
189
-
190
- const content = await $('>>>doc-content-layout');
191
- const text = await content.getText();
192
-
193
- expect(text.includes('Future Feature')).toBeTruthy();
194
- expect(text.includes('previewFuture')).toBeTruthy();
195
- });
196
-
197
154
  it('Should render the englishonly topic page', async function () {
198
155
  if (!liquidEnabled) {
199
156
  this.skip();
@@ -18,8 +18,8 @@ exports.config = {
18
18
 
19
19
  // Exclude tests that require dynamic server features or pages not in static build
20
20
  exclude: [
21
- // Liquid tests require previewFuture, variables, and redirects-url project — not in static build
22
- './src/shared/specs/liquid.test.ts',
21
+ // Advanced liquid tests require previewFuture, variables — not in static build
22
+ './src/shared/specs/liquid-advanced.test.ts',
23
23
  // /docs/apis landing page doesn't exist in static builds
24
24
  './src/portal/specs/docs.api.test.ts',
25
25
  // /docs landing page doesn't exist in static builds