@salesforcedevs/sfdocs-e2e 1.0.12-e2e-topic-version-7 → 1.0.12-e2e-topic-version
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
|
@@ -39,7 +39,10 @@ describe('Topic-level versioning > versioned markdown topic', () => {
|
|
|
39
39
|
await page.waitForMarkdownTopicLoad();
|
|
40
40
|
|
|
41
41
|
expect(await (await $('>>>h1')).getText()).toEqual('OAuth 1.0');
|
|
42
|
-
|
|
42
|
+
await browser.waitUntil(
|
|
43
|
+
async () => (await browser.getUrl()).includes(`${BASE}/v1/oauth.html`),
|
|
44
|
+
{ timeout: 15000, timeoutMsg: 'expected URL to contain /v1/oauth.html' },
|
|
45
|
+
);
|
|
43
46
|
});
|
|
44
47
|
|
|
45
48
|
it('should return to the canonical URL when the latest version is reselected', async () => {
|
|
@@ -51,6 +54,10 @@ describe('Topic-level versioning > versioned markdown topic', () => {
|
|
|
51
54
|
await page.selectVersionByLabel(picker!, "WI'26");
|
|
52
55
|
await page.waitForMarkdownTopicLoad();
|
|
53
56
|
|
|
57
|
+
await browser.waitUntil(
|
|
58
|
+
async () => (await browser.getUrl()).endsWith(`${BASE}/oauth.html`),
|
|
59
|
+
{ timeout: 15000, timeoutMsg: 'expected URL to end with /oauth.html' },
|
|
60
|
+
);
|
|
54
61
|
const url = await browser.getUrl();
|
|
55
62
|
expect(url.endsWith(`${BASE}/oauth.html`)).toBeTruthy();
|
|
56
63
|
expect(url).not.toContain('/v2/');
|
|
@@ -91,7 +98,10 @@ describe('Topic-level versioning > versioned parent with versioned child subtree
|
|
|
91
98
|
await page.selectVersionByLabel(picker!, "SU'26");
|
|
92
99
|
await page.waitForMarkdownTopicLoad();
|
|
93
100
|
|
|
94
|
-
|
|
101
|
+
await browser.waitUntil(
|
|
102
|
+
async () => (await browser.getUrl()).includes(`${BASE}/v1/android.html`),
|
|
103
|
+
{ timeout: 15000, timeoutMsg: 'expected URL to contain /v1/android.html' },
|
|
104
|
+
);
|
|
95
105
|
expect(await (await $('>>>h1')).getText()).toEqual('Android SDK v1');
|
|
96
106
|
|
|
97
107
|
// Sibling child (iOS SDK) should also have moved to the v1 URL, not just this one.
|
|
@@ -145,7 +155,13 @@ describe('Topic-level versioning > versioned parent with own content, subtopics
|
|
|
145
155
|
await page.waitForMarkdownTopicLoad();
|
|
146
156
|
|
|
147
157
|
expect(await (await $('>>>h1')).getText()).toEqual('Errors and Rate Limits (v1)');
|
|
148
|
-
|
|
158
|
+
await browser.waitUntil(
|
|
159
|
+
async () => (await browser.getUrl()).includes(`${BASE}/v1/errors-and-rate-limits.html`),
|
|
160
|
+
{
|
|
161
|
+
timeout: 15000,
|
|
162
|
+
timeoutMsg: 'expected URL to contain /v1/errors-and-rate-limits.html',
|
|
163
|
+
},
|
|
164
|
+
);
|
|
149
165
|
});
|
|
150
166
|
|
|
151
167
|
it('should switch the markdown subtopics when the version changes', async () => {
|
|
@@ -158,7 +174,10 @@ describe('Topic-level versioning > versioned parent with own content, subtopics
|
|
|
158
174
|
await page.waitForMarkdownTopicLoad();
|
|
159
175
|
|
|
160
176
|
expect(await (await $('>>>h1')).getText()).toEqual('Common Error Codes (v1)');
|
|
161
|
-
|
|
177
|
+
await browser.waitUntil(
|
|
178
|
+
async () => (await browser.getUrl()).includes(`${BASE}/v1/extra-child-a.html`),
|
|
179
|
+
{ timeout: 15000, timeoutMsg: 'expected URL to contain /v1/extra-child-a.html' },
|
|
180
|
+
);
|
|
162
181
|
});
|
|
163
182
|
|
|
164
183
|
it('should switch the spec (Redoc) subtopic to the matching version when the version changes', async () => {
|
|
@@ -171,7 +190,10 @@ describe('Topic-level versioning > versioned parent with own content, subtopics
|
|
|
171
190
|
await child.click();
|
|
172
191
|
await page.waitForRedocTopicLoad();
|
|
173
192
|
|
|
174
|
-
|
|
193
|
+
await browser.waitUntil(
|
|
194
|
+
async () => (await browser.getUrl()).includes(`${BASE}/v1/new-sample-api`),
|
|
195
|
+
{ timeout: 15000, timeoutMsg: 'expected URL to contain /v1/new-sample-api' },
|
|
196
|
+
);
|
|
175
197
|
// v1's spec lacks the `GET /errors/{code}` operation that only v2 has — its absence
|
|
176
198
|
// confirms the v1 spec asset loaded, since both versions share the same spec title.
|
|
177
199
|
const getErrorCodeOperation = await $('a[href*="operation/getErrorCode"]');
|
|
@@ -218,7 +240,10 @@ describe('Topic-level versioning > standalone Redoc reference', () => {
|
|
|
218
240
|
await page.selectVersionByLabel(picker!, "SP'26");
|
|
219
241
|
await page.waitForRedocTopicLoad();
|
|
220
242
|
|
|
221
|
-
|
|
243
|
+
await browser.waitUntil(
|
|
244
|
+
async () => (await browser.getUrl()).includes(`${BASE}/v1/widgets-api-reference`),
|
|
245
|
+
{ timeout: 15000, timeoutMsg: 'expected URL to contain /v1/widgets-api-reference' },
|
|
246
|
+
);
|
|
222
247
|
const apiInfo = await $('>>>div.api-info');
|
|
223
248
|
expect(await apiInfo.getText()).toContain('1.0.0');
|
|
224
249
|
});
|
|
@@ -365,7 +390,10 @@ describe('Topic-level versioning > topics without a version picker', () => {
|
|
|
365
390
|
await getStarted.click();
|
|
366
391
|
await page.waitForMarkdownTopicLoad();
|
|
367
392
|
|
|
368
|
-
|
|
393
|
+
await browser.waitUntil(
|
|
394
|
+
async () => (await browser.getUrl()).includes(`${BASE}/get-started.html`),
|
|
395
|
+
{ timeout: 15000, timeoutMsg: 'expected URL to contain /get-started.html' },
|
|
396
|
+
);
|
|
369
397
|
expect(await browser.getUrl()).not.toContain('/v1/');
|
|
370
398
|
});
|
|
371
399
|
});
|