@salesforcedevs/sfdocs-e2e 1.0.0-alpha.20 → 1.0.0-link-alpha
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/bin/publish.sh +2 -5
- package/package.json +1 -1
- package/src/content-repo/specs/homepage.test.ts +1 -1
- package/src/shared/pageobjects/page.ts +3 -3
- package/src/shared/specs/guides.test.ts +1 -1
- package/src/shared/specs/layout-tests.ts +2 -2
- package/src/shared/specs/overview.test.ts +1 -1
- package/src/shared/specs/reference.test.ts +1 -4
- package/static-portal-wdio.conf.js +7 -0
package/bin/publish.sh
CHANGED
|
@@ -3,6 +3,7 @@ set -euo pipefail
|
|
|
3
3
|
|
|
4
4
|
VERSION="${1:?Usage: publish.sh <version> [--tag <tag>]}"
|
|
5
5
|
shift
|
|
6
|
+
TAG_ARGS=("$@")
|
|
6
7
|
|
|
7
8
|
cp package.json .package.json.bak
|
|
8
9
|
|
|
@@ -24,8 +25,4 @@ node -e "
|
|
|
24
25
|
require('fs').writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');
|
|
25
26
|
"
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
yarn publish --new-version "$VERSION" "$@"
|
|
29
|
-
else
|
|
30
|
-
yarn publish --new-version "$VERSION"
|
|
31
|
-
fi
|
|
28
|
+
yarn publish --new-version "$VERSION" "${TAG_ARGS[@]}"
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ describe('Homepage', () => {
|
|
|
13
13
|
it('should show the expected number of projects', async () => {
|
|
14
14
|
const projectCards = await HomePage.projectCards;
|
|
15
15
|
|
|
16
|
-
expect(projectCards.length).toEqual(
|
|
16
|
+
expect(projectCards.length).toEqual(17);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
// it('is accessible', () => {
|
|
@@ -44,15 +44,15 @@ export default class Page {
|
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
async getHeader(
|
|
48
|
-
return await $(
|
|
47
|
+
async getHeader(): Promise<WebdriverIO.Element> {
|
|
48
|
+
return await $('hgf-c360contextnav');
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
async getHeaderTitle(): Promise<WebdriverIO.Element> {
|
|
52
52
|
return (await $('>>>header')).$('h4');
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
async getGlobalSearchBox(headerTag = 'dx-
|
|
55
|
+
async getGlobalSearchBox(headerTag = 'dx-header'): Promise<WebdriverIO.Element> {
|
|
56
56
|
return (await $(headerTag)).shadow$('dx-header-search');
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -7,7 +7,7 @@ import Page from '../pageobjects/page';
|
|
|
7
7
|
* @param givenPage : This is the current page for which we need to test chrome.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
export default function layoutTest(givenPage: Page, headerTag = 'dx-
|
|
10
|
+
export default function layoutTest(givenPage: Page, headerTag = 'dx-header') {
|
|
11
11
|
let page: Page;
|
|
12
12
|
describe('Basic layout testing > ', () => {
|
|
13
13
|
beforeEach(async () => {
|
|
@@ -15,7 +15,7 @@ export default function layoutTest(givenPage: Page, headerTag = 'dx-global-heade
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
it('should display header', async () => {
|
|
18
|
-
const header = await $(
|
|
18
|
+
const header = await $('hgf-c360contextnav');
|
|
19
19
|
await header.waitForDisplayed();
|
|
20
20
|
expect(await header.isDisplayed()).toBeTruthy();
|
|
21
21
|
expect(await header.getText()).toContain('Developers');
|
|
@@ -11,7 +11,7 @@ describe('/docs/api overview page > ', () => {
|
|
|
11
11
|
(await $('dx-section')).waitForDisplayed();
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
layoutTest(page);
|
|
14
|
+
layoutTest(page, 'doc-header');
|
|
15
15
|
|
|
16
16
|
it('should show Overview, Guides and Reference tabs and have Overview as active', async () => {
|
|
17
17
|
const overviewPageSection = await $('>>>.content-type-overview');
|
|
@@ -11,7 +11,7 @@ describe('API Pages', () => {
|
|
|
11
11
|
referencePage.open();
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
layoutTest(referencePage);
|
|
14
|
+
layoutTest(referencePage, 'doc-header');
|
|
15
15
|
|
|
16
16
|
it('should have the right title', async () => {
|
|
17
17
|
expect(browser).toHaveTitle('TEST Commerce Cloud Orders APIs');
|
|
@@ -179,10 +179,8 @@ describe('Reference Versioning', () => {
|
|
|
179
179
|
|
|
180
180
|
await referencePage.waitForSpecBasedReferencePageLoad();
|
|
181
181
|
await referencePage.selectVersion();
|
|
182
|
-
await referencePage.waitForSpecBasedReferencePageLoad();
|
|
183
182
|
|
|
184
183
|
const container = await $('>>>div.title-area div');
|
|
185
|
-
await container.waitForDisplayed();
|
|
186
184
|
const apiTitle = await container.getText();
|
|
187
185
|
|
|
188
186
|
expect(apiTitle).toEqual('createBasket');
|
|
@@ -276,7 +274,6 @@ describe('Spec-Based Flexible References', () => {
|
|
|
276
274
|
await referencePage.waitForSpecBasedReferencePageLoad();
|
|
277
275
|
|
|
278
276
|
const container = await $('>>>div.title-area div');
|
|
279
|
-
await container.waitForDisplayed();
|
|
280
277
|
const apiTitle = await container.getText();
|
|
281
278
|
|
|
282
279
|
expect(apiTitle).toEqual('getBasket');
|
|
@@ -24,6 +24,13 @@ exports.config = {
|
|
|
24
24
|
'./src/portal/specs/docs.test.ts',
|
|
25
25
|
],
|
|
26
26
|
|
|
27
|
+
// Skip footer tests - footer is not available in static builds
|
|
28
|
+
mochaOpts: {
|
|
29
|
+
...BASE_CONFIG.config.mochaOpts,
|
|
30
|
+
grep: 'should display footer',
|
|
31
|
+
invert: true,
|
|
32
|
+
},
|
|
33
|
+
|
|
27
34
|
// Output directory for static test results
|
|
28
35
|
outputDir: './_results_/static-portal',
|
|
29
36
|
|