@salesforcedevs/sfdocs-e2e 1.0.2-footer → 1.0.2
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 +5 -2
- 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 +4 -1
package/bin/publish.sh
CHANGED
|
@@ -3,7 +3,6 @@ set -euo pipefail
|
|
|
3
3
|
|
|
4
4
|
VERSION="${1:?Usage: publish.sh <version> [--tag <tag>]}"
|
|
5
5
|
shift
|
|
6
|
-
TAG_ARGS=("$@")
|
|
7
6
|
|
|
8
7
|
cp package.json .package.json.bak
|
|
9
8
|
|
|
@@ -25,4 +24,8 @@ node -e "
|
|
|
25
24
|
require('fs').writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');
|
|
26
25
|
"
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
if [ "$#" -gt 0 ]; then
|
|
28
|
+
yarn publish --new-version "$VERSION" "$@"
|
|
29
|
+
else
|
|
30
|
+
yarn publish --new-version "$VERSION"
|
|
31
|
+
fi
|
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(18);
|
|
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(): Promise<WebdriverIO.Element> {
|
|
48
|
-
return await $(
|
|
47
|
+
async getHeader(headerTag = 'dx-global-header'): Promise<WebdriverIO.Element> {
|
|
48
|
+
return await $(headerTag);
|
|
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-header'): Promise<WebdriverIO.Element> {
|
|
55
|
+
async getGlobalSearchBox(headerTag = 'dx-global-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-header') {
|
|
10
|
+
export default function layoutTest(givenPage: Page, headerTag = 'dx-global-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-header') {
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
it('should display header', async () => {
|
|
18
|
-
const header = await $(
|
|
18
|
+
const header = await $(headerTag);
|
|
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);
|
|
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);
|
|
15
15
|
|
|
16
16
|
it('should have the right title', async () => {
|
|
17
17
|
expect(browser).toHaveTitle('TEST Commerce Cloud Orders APIs');
|
|
@@ -179,8 +179,10 @@ describe('Reference Versioning', () => {
|
|
|
179
179
|
|
|
180
180
|
await referencePage.waitForSpecBasedReferencePageLoad();
|
|
181
181
|
await referencePage.selectVersion();
|
|
182
|
+
await referencePage.waitForSpecBasedReferencePageLoad();
|
|
182
183
|
|
|
183
184
|
const container = await $('>>>div.title-area div');
|
|
185
|
+
await container.waitForDisplayed();
|
|
184
186
|
const apiTitle = await container.getText();
|
|
185
187
|
|
|
186
188
|
expect(apiTitle).toEqual('createBasket');
|
|
@@ -274,6 +276,7 @@ describe('Spec-Based Flexible References', () => {
|
|
|
274
276
|
await referencePage.waitForSpecBasedReferencePageLoad();
|
|
275
277
|
|
|
276
278
|
const container = await $('>>>div.title-area div');
|
|
279
|
+
await container.waitForDisplayed();
|
|
277
280
|
const apiTitle = await container.getText();
|
|
278
281
|
|
|
279
282
|
expect(apiTitle).toEqual('getBasket');
|