@salesforcedevs/sfdocs-e2e 1.0.12-e2e-topic-version-2 → 1.0.12-e2e-topic-version-4

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.12-e2e-topic-version-2",
3
+ "version": "1.0.12-e2e-topic-version-4",
4
4
  "description": "E2E test suite for SFDocs static portal pages (SSG)",
5
5
  "license": "ISC",
6
6
  "bin": {
@@ -106,7 +106,7 @@ describe('Reference Versioning', () => {
106
106
  const versionBtn = await $('>>>.version-picker-button');
107
107
  await versionBtn.waitForDisplayed();
108
108
  await versionBtn.click();
109
- const versionOptions = await referencePage.getVersionOptions();
109
+ const versionOptions = await $$('>>>doc-version-picker dx-dropdown-option');
110
110
 
111
111
  expect(versionOptions.length).toEqual(2);
112
112
  expect(await (await versionOptions[0].shadow$('div>div')).getText()).toEqual('0.1.3');
@@ -131,14 +131,21 @@ describe('Reference Versioning', () => {
131
131
  await versionBtn.waitForDisplayed();
132
132
  await versionBtn.click();
133
133
 
134
- const versionOptions = await referencePage.getVersionOptions();
134
+ const versionOptions = await $$('>>>doc-version-picker dx-dropdown-option');
135
135
 
136
136
  await versionOptions[1].waitForClickable();
137
137
  await versionOptions[1].click();
138
138
  await referencePage.waitForSpecBasedReferencePageLoad();
139
139
 
140
- const apiTitle = await (await $('>>>div.api-title span')).getText();
141
- const apiVersion = await (await $('>>>p.version span')).getText();
140
+ // The outer container can display before Redoc finishes populating its content, so wait
141
+ // for each element directly rather than reading them immediately.
142
+ const apiTitleElement = await $('>>>div.api-title span');
143
+ await apiTitleElement.waitForDisplayed();
144
+ const apiVersionElement = await $('>>>p.version span');
145
+ await apiVersionElement.waitForDisplayed();
146
+
147
+ const apiTitle = await apiTitleElement.getText();
148
+ const apiVersion = await apiVersionElement.getText();
142
149
 
143
150
  expect(apiTitle).toEqual('Salesforce Connect API');
144
151
  expect(apiVersion).toEqual('53.0');
@@ -150,7 +157,7 @@ describe('Reference Versioning', () => {
150
157
  await versionPicker.waitForDisplayed();
151
158
  await versionPicker.click();
152
159
 
153
- const versionOptions = await referencePage.getVersionOptions();
160
+ const versionOptions = await $$('>>>doc-version-picker dx-dropdown-option');
154
161
  const selectedVersionText = await (await versionOptions[1].shadow$('div>div')).getText();
155
162
 
156
163
  await versionOptions[1].click();