mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
Merge branch 'main' into mbtools/alav-ddic
This commit is contained in:
commit
5361625424
15
.github/workflows/test-pr.yml
vendored
15
.github/workflows/test-pr.yml
vendored
|
@ -31,12 +31,9 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: npm install
|
||||
run: npm install
|
||||
- name: npm run unit
|
||||
run: npm run unit
|
||||
- name: npm run coverage
|
||||
run: npm run coverage
|
||||
- run: npm install
|
||||
- run: npm run unit
|
||||
- run: npm run coverage
|
||||
|
||||
integration:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -45,10 +42,8 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: npm install
|
||||
run: npm install
|
||||
- run: npm install
|
||||
- name: start gitea
|
||||
working-directory: test/gitea/
|
||||
run: npm install && npm run gitea
|
||||
- name: npm run integration
|
||||
run: npm run integration
|
||||
- run: npm run integration
|
||||
|
|
12
package.json
12
package.json
|
@ -5,10 +5,10 @@
|
|||
"test": "npm run eslint && npm run abaplint",
|
||||
"merge": "abapmerge -f src/zabapgit.prog.abap -c zabapgit_standalone -o zabapgit.abap",
|
||||
"merge.ci": "cp zabapgit.abap ci/zabapgit_standalone.prog.abap && cd ci && abaplint --format codeframe && cd ..",
|
||||
"build": "rm -rf output && abap_transpile test/abap_transpile.json",
|
||||
"unit": "npm run build && echo RUNNING && node output/index.mjs",
|
||||
"coverage": "npm run unit && c8 node output/index.mjs && c8 report --reporter=html",
|
||||
"integration": "rm -rf output && cp test/abap_transpile.json test/abap_transpile_int.json && sed -i 's/src,deps/test\\/src,src,deps/g' test/abap_transpile_int.json && abap_transpile test/abap_transpile_int.json && cp -f src/ui/zabapgit_icon_font.w3mi.data.woff output/ && echo RUNNING && node output/index.mjs",
|
||||
"build": "rm -rf output && abap_transpile test/abap_transpile.json && cp -f src/ui/zabapgit_icon_font.w3mi.data.woff output/",
|
||||
"unit": "npm run build && echo RUNNING && node output/index.mjs --skip-critical",
|
||||
"coverage": "npm run unit && c8 node output/index.mjs --skip-critical && c8 report --reporter=html",
|
||||
"integration": "npm run build && echo RUNNING && node output/index.mjs --only-critical",
|
||||
"abaplint": "abaplint --format codeframe",
|
||||
"eslint": "eslint src"
|
||||
},
|
||||
|
@ -25,9 +25,9 @@
|
|||
"devDependencies": {
|
||||
"@abaplint/cli": "^2.113.108",
|
||||
"@abaplint/database-sqlite": "^2.10.24",
|
||||
"@abaplint/runtime": "^2.10.38",
|
||||
"@abaplint/runtime": "^2.10.42",
|
||||
"express": "^4.21.2",
|
||||
"@abaplint/transpiler-cli": "^2.10.38",
|
||||
"@abaplint/transpiler-cli": "^2.10.42",
|
||||
"globals": "^16.0.0",
|
||||
"abapmerge": "^0.16.6",
|
||||
"c8": "^10.1.3",
|
||||
|
|
17
src/env/zcl_abapgit_user_record.clas.abap
vendored
17
src/env/zcl_abapgit_user_record.clas.abap
vendored
|
@ -60,19 +60,30 @@ CLASS zcl_abapgit_user_record IMPLEMENTATION.
|
|||
|
||||
METHOD get_title.
|
||||
* the queried username might not exist, so this method is static
|
||||
* refactored for open-abap compatibility
|
||||
|
||||
DATA ls_user_address TYPE addr3_val.
|
||||
DATA lr_addr3 TYPE REF TO data.
|
||||
FIELD-SYMBOLS <ls_addr3> TYPE any.
|
||||
FIELD-SYMBOLS <lv_simple> TYPE simple.
|
||||
|
||||
TRY.
|
||||
CREATE DATA lr_addr3 TYPE ('ADDR3_VAL').
|
||||
CATCH cx_sy_create_data_error.
|
||||
RETURN.
|
||||
ENDTRY.
|
||||
ASSIGN lr_addr3->* TO <ls_addr3>.
|
||||
|
||||
CALL FUNCTION 'SUSR_USER_ADDRESS_READ'
|
||||
EXPORTING
|
||||
user_name = iv_username
|
||||
IMPORTING
|
||||
user_address = ls_user_address
|
||||
user_address = <ls_addr3>
|
||||
EXCEPTIONS
|
||||
user_address_not_found = 1
|
||||
OTHERS = 2.
|
||||
IF sy-subrc = 0.
|
||||
rv_title = ls_user_address-name_text.
|
||||
ASSIGN COMPONENT 'NAME_TEXT' OF STRUCTURE <ls_addr3> TO <lv_simple>.
|
||||
rv_title = <lv_simple>.
|
||||
ENDIF.
|
||||
|
||||
ENDMETHOD.
|
||||
|
|
|
@ -991,6 +991,9 @@ CLASS zcl_abapgit_objects IMPLEMENTATION.
|
|||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
" We want the object list of a repository to show unsupported object (without serializing them)
|
||||
" This is why the follow check and the caught exception return true.
|
||||
|
||||
" For unsupported objects, assume object exists
|
||||
IF is_type_supported( is_item-obj_type ) = abap_false.
|
||||
rv_bool = abap_true.
|
||||
|
|
1
test/.gitignore
vendored
1
test/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
abap_transpile_int.json
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"input_folder": "{src,deps}",
|
||||
"input_folder": "{src,deps,test/src}",
|
||||
"input_filter": [
|
||||
"\\.w3mi.",
|
||||
"deps/",
|
||||
|
|
|
@ -1,14 +1,34 @@
|
|||
CLASS ltcl_test DEFINITION FOR TESTING DURATION SHORT RISK LEVEL CRITICAL FINAL.
|
||||
|
||||
PRIVATE SECTION.
|
||||
INTERFACES if_ftd_invocation_answer.
|
||||
METHODS setup.
|
||||
METHODS teardown.
|
||||
METHODS list_branches FOR TESTING RAISING cx_static_check.
|
||||
METHODS list_no_blobs FOR TESTING RAISING cx_static_check.
|
||||
METHODS commits_last_year FOR TESTING RAISING cx_static_check.
|
||||
|
||||
DATA mi_env TYPE REF TO if_function_test_environment.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS ltcl_test IMPLEMENTATION.
|
||||
METHOD setup.
|
||||
DATA lt_deps TYPE if_function_test_environment=>tt_function_dependencies.
|
||||
|
||||
INSERT 'SAPGUI_PROGRESS_INDICATOR' INTO TABLE lt_deps.
|
||||
mi_env = cl_function_test_environment=>create( lt_deps ).
|
||||
|
||||
mi_env->get_double( 'SAPGUI_PROGRESS_INDICATOR' )->configure_call( )->ignore_all_parameters( )->then_answer( me ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD teardown.
|
||||
mi_env->clear_doubles( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD if_ftd_invocation_answer~answer.
|
||||
RETURN.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD list_branches.
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ CLASS ltcl_test IMPLEMENTATION.
|
|||
DATA lt_deps TYPE if_function_test_environment=>tt_function_dependencies.
|
||||
DATA lo_initial TYPE REF TO zif_abapgit_repo_srv.
|
||||
DATA lo_tr_object_table TYPE REF TO lcl_tr_object_table.
|
||||
DATA lo_environment TYPE REF TO zcl_abapgit_web_environment.
|
||||
|
||||
zcl_abapgit_repo_srv=>inject_instance( lo_initial ).
|
||||
|
||||
|
@ -52,19 +53,29 @@ CLASS ltcl_test IMPLEMENTATION.
|
|||
INSERT 'ENQUEUE_EZABAPGIT' INTO TABLE lt_deps.
|
||||
INSERT 'DEQUEUE_EZABAPGIT' INTO TABLE lt_deps.
|
||||
INSERT 'TR_OBJECT_TABLE' INTO TABLE lt_deps.
|
||||
INSERT 'SAPGUI_PROGRESS_INDICATOR' INTO TABLE lt_deps.
|
||||
|
||||
mi_env = cl_function_test_environment=>create( lt_deps ).
|
||||
mi_env->get_double( 'ENQUEUE_EZABAPGIT' )->configure_call( )->ignore_all_parameters(
|
||||
)->then_answer( me ).
|
||||
mi_env->get_double( 'DEQUEUE_EZABAPGIT' )->configure_call( )->ignore_all_parameters(
|
||||
)->then_answer( me ).
|
||||
mi_env->get_double( 'SAPGUI_PROGRESS_INDICATOR' )->configure_call( )->ignore_all_parameters(
|
||||
)->then_answer( me ).
|
||||
mi_env->get_double( 'TR_OBJECT_TABLE' )->configure_call( )->ignore_all_parameters(
|
||||
)->then_answer( lo_tr_object_table ).
|
||||
|
||||
CREATE OBJECT lo_environment.
|
||||
zcl_abapgit_injector=>set_environment( lo_environment ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD teardown.
|
||||
DATA li_environment TYPE REF TO zif_abapgit_environment.
|
||||
|
||||
mi_env->clear_doubles( ).
|
||||
|
||||
zcl_abapgit_injector=>set_environment( li_environment ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD if_ftd_invocation_answer~answer.
|
||||
|
|
Loading…
Reference in New Issue
Block a user