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

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-4",
3
+ "version": "1.0.12-e2e-topic-version-6",
4
4
  "description": "E2E test suite for SFDocs static portal pages (SSG)",
5
5
  "license": "ISC",
6
6
  "bin": {
@@ -28,6 +28,7 @@ export class ReferencePage extends Page {
28
28
  const versionPicker = await this.getVersionPickerBtn();
29
29
  await versionPicker.click();
30
30
  const versionOptions = await $$('>>>doc-version-picker dx-dropdown-option');
31
+ await versionOptions[1].waitForClickable();
31
32
  await versionOptions[1].click();
32
33
  }
33
34
 
@@ -109,6 +109,8 @@ describe('Reference Versioning', () => {
109
109
  const versionOptions = await $$('>>>doc-version-picker dx-dropdown-option');
110
110
 
111
111
  expect(versionOptions.length).toEqual(2);
112
+ await versionOptions[0].waitForClickable();
113
+ await versionOptions[1].waitForClickable();
112
114
  expect(await (await versionOptions[0].shadow$('div>div')).getText()).toEqual('0.1.3');
113
115
  expect(await (await versionOptions[1].shadow$('div>div')).getText()).toEqual('0.1.2');
114
116
  });
@@ -118,13 +120,17 @@ describe('Reference Versioning', () => {
118
120
  const searchBox = await dxInput.shadow$('input');
119
121
 
120
122
  await searchBox.click();
121
- await browser.keys('/cart-coupons');
123
+ await browser.keys('coupon');
122
124
 
125
+ // Search filters asynchronously — wait for the tree to actually narrow down instead of
126
+ // querying immediately, which would still catch the pre-filter (full) tree.
127
+ await browser.waitUntil(
128
+ async () => (await $$('>>>dx-tree-item')).length === 2,
129
+ { timeoutMsg: 'expected search for "coupon" to narrow the tree to 2 results' },
130
+ );
123
131
  const dxTreeItems = await $$('>>>dx-tree-item');
124
132
 
125
- expect(dxTreeItems.length > 2).toBeTruthy();
126
-
127
- await (await dxTreeItems[2]).click();
133
+ await (await dxTreeItems[0]).click();
128
134
 
129
135
  const versionBtn = await $('>>>.version-picker-button');
130
136
 
@@ -158,6 +164,8 @@ describe('Reference Versioning', () => {
158
164
  await versionPicker.click();
159
165
 
160
166
  const versionOptions = await $$('>>>doc-version-picker dx-dropdown-option');
167
+
168
+ await versionOptions[1].waitForClickable();
161
169
  const selectedVersionText = await (await versionOptions[1].shadow$('div>div')).getText();
162
170
 
163
171
  await versionOptions[1].click();