@salesforcedevs/sfdocs-e2e 1.0.6-toolbaralpha2 → 1.0.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.6-toolbaralpha2",
3
+ "version": "1.0.6",
4
4
  "description": "E2E test suite for SFDocs static portal pages (SSG)",
5
5
  "license": "ISC",
6
6
  "bin": {
@@ -38,14 +38,5 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/mocha": "^10.0.1"
41
- },
42
- "engines": {
43
- "node": "22.x",
44
- "yarn": ">=1.22.22 <2.0.0"
45
- },
46
- "packageManager": "yarn@1.22.22",
47
- "volta": {
48
- "node": "22.19.0",
49
- "yarn": "1.22.22"
50
41
  }
51
42
  }
@@ -4,5 +4,4 @@ exports.config = {
4
4
  ...BASE_CONFIG.config,
5
5
  baseUrl: process.env.E2E_BASE_URL || 'http://localhost:3001',
6
6
  specs: ['./src/portal/specs/**/*.test.ts', './src/shared/specs/*.test.ts'],
7
- exclude: ['./src/shared/specs/contentActionToolbar.test.ts'],
8
7
  };
package/wdio.conf.js CHANGED
@@ -3,5 +3,4 @@ const BASE_CONFIG = require('./common-wdio.conf');
3
3
  exports.config = {
4
4
  ...BASE_CONFIG.config,
5
5
  specs: ['./src/content-repo/specs/**/*.test.ts', './src/shared/specs/*.test.ts'],
6
- exclude: ['./src/shared/specs/contentActionToolbar.test.ts'],
7
6
  };
@@ -1,59 +0,0 @@
1
- import GuidePage from '../pageobjects/guide.page';
2
- import { ReferencePage } from '../pageobjects/reference.page';
3
-
4
- const EN_US_GUIDE_PATH = '/docs/service/vscode-maintainer/guide/vscode-overview.html';
5
- const EN_US_MARKDOWN_REFERENCE_PATH =
6
- '/docs/commerce/flexible-references/references/shopper-manual-ref/quick-start.html';
7
- const NON_MARKDOWN_REFERENCE_PATH = '/docs/test-metamind-oas-api/references/1mkfx9?meta=Summary';
8
- const NON_EN_US_MARKDOWN_REFERENCE_PATH =
9
- '/docs/commerce/ja-jp/flex-references-loc/references/manual-ref/commerce-cloud-api-overview.html';
10
-
11
- async function expectToolbarButtons(toolbar: WebdriverIO.Element): Promise<void> {
12
- const toolbarButtons = await toolbar.shadow$$('dx-button.toolbar-button');
13
- expect(toolbarButtons.length).toBe(3);
14
-
15
- const labels = await Promise.all(
16
- toolbarButtons.map(async (button) => (await button.getText()).trim()),
17
- );
18
- expect(labels).toEqual(
19
- expect.arrayContaining(['Copy as Markdown', 'View as Markdown', 'Copy URL to Markdown']),
20
- );
21
- }
22
-
23
- describe('Content action toolbar scenarios', () => {
24
- it('Markdown guide should have the toolbar', async () => {
25
- const page = new GuidePage(EN_US_GUIDE_PATH);
26
- page.open();
27
- await page.waitPageLoad();
28
-
29
- const toolbar = await $('>>>doc-content-action-toolbar');
30
- await toolbar.waitForDisplayed();
31
- await expectToolbarButtons(toolbar);
32
- });
33
-
34
- it('Markdown reference should have the toolbar', async () => {
35
- const referencePage = new ReferencePage(EN_US_MARKDOWN_REFERENCE_PATH);
36
- referencePage.open();
37
- await referencePage.waitForMarkdownBasedReferencePageLoad();
38
-
39
- const toolbar = await $('>>>doc-content-action-toolbar');
40
- await toolbar.waitForDisplayed();
41
- await expectToolbarButtons(toolbar);
42
- });
43
-
44
- it("Non-markdown reference shouldn't have toolbar", async () => {
45
- const referencePage = new ReferencePage(NON_MARKDOWN_REFERENCE_PATH);
46
- referencePage.open();
47
- await referencePage.waitForSpecBasedReferencePageLoad();
48
-
49
- const toolbar = await $('>>>doc-content-action-toolbar');
50
- expect(await toolbar.isExisting()).toBeFalsy();
51
- });
52
-
53
- it("Non en-us locale page shouldn't have toolbar", async () => {
54
- const nonEnUsReferencePage = new ReferencePage(NON_EN_US_MARKDOWN_REFERENCE_PATH);
55
- nonEnUsReferencePage.open();
56
- await nonEnUsReferencePage.waitForMarkdownBasedReferencePageLoad();
57
- expect(await (await $('>>>doc-content-action-toolbar')).isExisting()).toBeFalsy();
58
- });
59
- });