0.7.2 • Published 5 months ago

@sap-ux/ui5-test-writer v0.7.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

@sap-ux/ui5-test-writer

OPA files writer for use within Yeoman generator and other prompting libraries.

Installation

Npm npm install --save @sap-ux/ui5-test-writer

Yarn yarn add @sap-ux/ui5-test-writer

Pnpm pnpm add @sap-ux/ui5-test-writer

Usage

2 public methods are available: one to generate all OPA test files for a Fiori elements for OData V4 application, another one to generate an additional page object file for a Fiori elements for OData V4 application.

Generate all OPA test files for a Fiori elements for OData V4 application

Calling the generateOPAFiles function

import { generateOPAFiles } from '@sap-ux/ui5-test-writer'

const exampleWriter = async () => {
    const myProjectPath = 'path/to/my/project'; // Path to the root of the Fiori app
    const fs = await generateOPAFiles(myProjectPath, { scriptName: 'myOpaTest' });
    return new Promise((resolve) => {
        fs.commit(resolve); // When using with Yeoman it handle the fs commit.
    });
}

// Calling the function
await exampleWriter();

Generate an additional page object file

Calling the generatePageObjectFile function

import { generatePageObjectFile } from '@sap-ux/ui5-test-writer'

const exampleWriter = async () => {
    const myProjectPath = 'path/to/my/project'; // Path to the root of the Fiori app
    const targetKey = 'MyNewPage';  // Key of the target in the app descriptor (in sap.ui5/routing/targets)
    const fs = await generatePageObjectFile(myProjectPath, { targetKey });
    return new Promise((resolve) => {
        fs.commit(resolve); // When using with Yeoman it handle the fs commit.
    });
}

// Calling the function
await exampleWriter();

Keywords

SAP Fiori Elements

0.6.7

6 months ago

0.6.6

6 months ago

0.7.2

5 months ago

0.6.3

8 months ago

0.7.1

6 months ago

0.6.2

8 months ago

0.6.5

6 months ago

0.6.4

6 months ago

0.5.0

8 months ago

0.7.0

6 months ago

0.6.1

8 months ago

0.5.2

8 months ago

0.6.0

8 months ago

0.5.1

8 months ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.3

1 year ago

0.3.2

2 years ago

0.1.11

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.3.1

2 years ago

0.1.10

2 years ago

0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago