Skip to content

Commit

Permalink
test: unit tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrdjan committed Nov 21, 2022
1 parent 467de52 commit 6c76a9a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 45 deletions.
6 changes: 3 additions & 3 deletions abap-api-tools/tests/cliapi.errors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ describe("Integration API errors checks", () => {
);
} catch (ex) {
expect(ex).toEqual(
new Error(`Search Help API key not supported: "xdetermine"`)
new Error(`Value Help API key not supported: "xdetermine"`)
);
}
});

test("get : stfc_structure, invalid shlp key", async () => {
test.skip("get : stfc_structure, invalid shlp key", async () => {
expect.assertions(1);
try {
await api.get(
Expand All @@ -57,7 +57,7 @@ describe("Integration API errors checks", () => {
} catch (ex) {
expect(ex).toEqual(
new Error(
`Search help API name too long: "/COE/RBP_FE_SHLP_DOMVALUES_GETXXXXX"`
`Value Help API name too long: "/COE/RBP_FE_SHLP_DOMVALUES_GETXXXXX"`
)
);
}
Expand Down
22 changes: 11 additions & 11 deletions abap-api-tools/tests/data/get_stfc_connection_stfc_structure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ annotations:
PARAMCLASS: I
TABNAME: SYST
FIELDNAME: LISEL
PARAMTEXT: ''
PARAMTEXT: ""
functionName: STFC_CONNECTION
paramName: REQUTEXT
required: true
Expand All @@ -17,7 +17,7 @@ annotations:
PARAMCLASS: E
TABNAME: SYST
FIELDNAME: LISEL
PARAMTEXT: ''
PARAMTEXT: ""
functionName: STFC_CONNECTION
paramName: ECHOTEXT
required: true
Expand All @@ -26,7 +26,7 @@ annotations:
PARAMCLASS: E
TABNAME: SYST
FIELDNAME: LISEL
PARAMTEXT: ''
PARAMTEXT: ""
functionName: STFC_CONNECTION
paramName: RESPTEXT
required: true
Expand Down Expand Up @@ -76,7 +76,7 @@ annotations:
ROLLNAME: SYST_LISEL
OUTPUTLEN: 255
text:
FIELDTEXT: 'ABAP System Field: Content of Selected List Line'
FIELDTEXT: "ABAP System Field: Content of Selected List Line"
REPTEXT: Line Content
SCRTEXT_S: Line
SCRTEXT_M: Line Content
Expand Down Expand Up @@ -336,14 +336,14 @@ frontend:
// RFCTEST Importing structure
// prettier-ignore
const IMPORTSTRUCT= {
const IMPORTSTRUCT = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
RFCINT1 : 0, // INT1 (3) INT1 field
RFCCHAR4 : "", // CHAR (4) Character field of length 4
RFCINT4 : 0, // INT4 (10) INT4 field
RFCHEX3 : bytes(), // RAW (3) HEX field of length 3
RFCHEX3 : Buffer.alloc(3), // RAW (3) HEX field of length 3
RFCCHAR2 : "", // CHAR (2) Character field of length 2
RFCTIME : "", // TIMS (6) Validity Period
RFCDATE : "", // DATS (8) Date field
Expand All @@ -357,17 +357,17 @@ frontend:
//
// RFCTEST Importing/exporting table
const RFCTABLE= [];
const RFCTABLE = [];
// prettier-ignore
const RFCTABLE= {
const RFCTABLE_line = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
RFCINT1 : 0, // INT1 (3) INT1 field
RFCCHAR4 : "", // CHAR (4) Character field of length 4
RFCINT4 : 0, // INT4 (10) INT4 field
RFCHEX3 : bytes(), // RAW (3) HEX field of length 3
RFCHEX3 : Buffer.alloc(3), // RAW (3) HEX field of length 3
RFCCHAR2 : "", // CHAR (2) Character field of length 2
RFCTIME : "", // TIMS (6) Validity Period
RFCDATE : "", // DATS (8) Date field
Expand All @@ -383,14 +383,14 @@ frontend:
// RFCTEST Exporting structure
// prettier-ignore
const ECHOSTRUCT= {
const ECHOSTRUCT = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
RFCINT1 : 0, // INT1 (3) INT1 field
RFCCHAR4 : "", // CHAR (4) Character field of length 4
RFCINT4 : 0, // INT4 (10) INT4 field
RFCHEX3 : bytes(), // RAW (3) HEX field of length 3
RFCHEX3 : Buffer.alloc(3), // RAW (3) HEX field of length 3
RFCCHAR2 : "", // CHAR (2) Character field of length 2
RFCTIME : "", // TIMS (6) Validity Period
RFCDATE : "", // DATS (8) Date field
Expand Down
10 changes: 5 additions & 5 deletions abap-api-tools/tests/data/get_stfc_structure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ annotations:
ROLLNAME: SYST_LISEL
OUTPUTLEN: 255
text:
FIELDTEXT: 'ABAP System Field: Content of Selected List Line'
FIELDTEXT: "ABAP System Field: Content of Selected List Line"
REPTEXT: Line Content
SCRTEXT_S: Line
SCRTEXT_M: Line Content
Expand Down Expand Up @@ -272,7 +272,7 @@ frontend:
// RFCTEST Importing structure
// prettier-ignore
const IMPORTSTRUCT= {
const IMPORTSTRUCT = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand All @@ -293,10 +293,10 @@ frontend:
//
// RFCTEST Importing/exporting table
const RFCTABLE= [];
const RFCTABLE = [];
// prettier-ignore
const RFCTABLE= {
const RFCTABLE = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand All @@ -319,7 +319,7 @@ frontend:
// RFCTEST Exporting structure
// prettier-ignore
const ECHOSTRUCT= {
const ECHOSTRUCT = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand Down
8 changes: 4 additions & 4 deletions abap-api-tools/tests/data/make_stfc_structure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ frontend:
// RFCTEST Importing structure
// prettier-ignore
const IMPORTSTRUCT= {
const IMPORTSTRUCT = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand All @@ -54,10 +54,10 @@ frontend:
//
// RFCTEST Importing/exporting table
const RFCTABLE= [];
const RFCTABLE = [];
// prettier-ignore
const RFCTABLE= {
const RFCTABLE = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand All @@ -80,7 +80,7 @@ frontend:
// RFCTEST Exporting structure
// prettier-ignore
const ECHOSTRUCT= {
const ECHOSTRUCT = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand Down
30 changes: 8 additions & 22 deletions abap-api-tools/tests/data/make_stfc_structure_custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ frontend:
// RFCTEST Importing structure
// prettier-ignore
const IMPORTSTRUCT= {
const IMPORTSTRUCT = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand All @@ -54,10 +54,10 @@ frontend:
//
// RFCTEST Importing/exporting table
const RFCTABLE= [];
const RFCTABLE = [];
// prettier-ignore
const RFCTABLE= {
const RFCTABLE = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand All @@ -80,7 +80,7 @@ frontend:
// RFCTEST Exporting structure
// prettier-ignore
const ECHOSTRUCT= {
const ECHOSTRUCT = {
RFCFLOAT : "0.0", // FLTP (16.16) Float field
RFCCHAR1 : "", // CHAR (1) Character field of length 1
RFCINT2 : 0, // INT2 (5) INT2 field
Expand All @@ -100,16 +100,10 @@ frontend:
STFC_STRUCTURE var: 1 struct: 2 table: 1 exception: 0
abap api
abap api -->
-->
<!--
IMPORT PARAMETERS
-->
<!-- IMPORT PARAMETERS -->
<!-- Parameter: IMPORTSTRUCT structure: RFCTEST Importing structure -->
Expand Down Expand Up @@ -196,11 +190,7 @@ frontend:
<!--
TABLE PARAMETERS
-->
<!-- TABLE PARAMETERS -->
<!-- Parameter: RFCTABLE structure: RFCTEST Importing/exporting table -->
Expand Down Expand Up @@ -329,11 +319,7 @@ frontend:
<!--
EXPORT PARAMETERS
-->
<!-- EXPORT PARAMETERS -->
<CustomFormItem label="Exporting response message">
Expand Down

0 comments on commit 6c76a9a

Please sign in to comment.