Skip to content

Commit

Permalink
AYS-464 | Framework Refactoring (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
cagla88 authored Sep 26, 2024
1 parent 9fa0c68 commit ecb6762
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 768 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/application-health-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ jobs:
- name: Replace ui.url in configuration.properties # Step to replace the placeholder api.url in configuration.properties
run: sed 's|'{UI_URL}'|'${{ secrets.AYS_UI_URL }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace institution_one.admin_user_one.username in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.username in configuration.properties
run: sed 's|'{INSTITUTION_ONE_ADMIN_USER_ONE_USERNAME}'|'${{ secrets.AYS_INSTITUTION_ONE_ADMIN_USER_ONE_USERNAME }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties
- name: Replace volunteer_foundation.admin.emailAddress in configuration.properties # Step to replace the placeholder volunteer_foundation.admin.email_address in configuration.properties
run: sed 's|'{VOLUNTEER_FOUNDATION_ADMIN_EMAIL_ADDRESS}'|'${{ secrets.AYS_VOLUNTEER_FOUNDATION_ADMIN_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace institution_one.admin_user_one.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties
run: sed 's|'{INSTITUTION_ONE_ADMIN_USER_ONE_PASSWORD}'|'${{ secrets.AYS_INSTITUTION_ONE_ADMIN_USER_ONE_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties
- name: Replace volunteer_foundation.admin.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties
run: sed 's|'{VOLUNTEER_FOUNDATION_ADMIN_PASSWORD}'|'${{ secrets.AYS_VOLUNTEER_FOUNDATION_ADMIN_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace institution.super_admin_user_one.username in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.username in configuration.properties
run: sed 's|'{INSTITUTION_SUPER_ADMIN_USER_ONE_USERNAME}'|'${{ secrets.AYS_INSTITUTION_SUPER_ADMIN_USER_ONE_USERNAME }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties
- name: Replace test_foundation.admin.email_address in configuration.properties # Step to replace the placeholder test_foundation.admin.email_address in configuration.properties
run: sed 's|'{TEST_FOUNDATION_ADMIN_EMAIL_ADDRESS}'|'${{ secrets.AYS_TEST_FOUNDATION_ADMIN_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace institution.super_admin_user_one.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties
run: sed 's|'{INSTITUTION_SUPER_ADMIN_USER_ONE_PASSWORD}'|'${{ secrets.AYS_INSTITUTION_SUPER_ADMIN_USER_ONE_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties
- name: Replace test_foundation.admin.password in configuration.properties # Step to replace the placeholder test_foundation.admin.password in configuration.properties
run: sed 's|'{TEST_FOUNDATION_ADMIN_PASSWORD}'|'${{ secrets.AYS_TEST_FOUNDATION_ADMIN_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Build with Maven # Step to build the project with Maven
run: mvn clean test -P weekly
18 changes: 9 additions & 9 deletions .github/workflows/pull-request-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ jobs:
- name: Replace ui.url in configuration.properties # Step to replace the placeholder api.url in configuration.properties
run: sed 's|'{UI_URL}'|'${{ secrets.AYS_UI_URL }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace institution_one.admin_user_one.username in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.username in configuration.properties
run: sed 's|'{INSTITUTION_ONE_ADMIN_USER_ONE_USERNAME}'|'${{ secrets.AYS_INSTITUTION_ONE_ADMIN_USER_ONE_USERNAME }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties
- name: Replace volunteer_foundation.admin.emailAddress in configuration.properties # Step to replace the placeholder volunteer_foundation.admin.email_address in configuration.properties
run: sed 's|'{VOLUNTEER_FOUNDATION_ADMIN_EMAIL_ADDRESS}'|'${{ secrets.AYS_VOLUNTEER_FOUNDATION_ADMIN_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace institution_one.admin_user_one.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties
run: sed 's|'{INSTITUTION_ONE_ADMIN_USER_ONE_PASSWORD}'|'${{ secrets.AYS_INSTITUTION_ONE_ADMIN_USER_ONE_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties
- name: Replace volunteer_foundation.admin.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties
run: sed 's|'{VOLUNTEER_FOUNDATION_ADMIN_PASSWORD}'|'${{ secrets.AYS_VOLUNTEER_FOUNDATION_ADMIN_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace institution.super_admin_user_one.username in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.username in configuration.properties
run: sed 's|'{INSTITUTION_SUPER_ADMIN_USER_ONE_USERNAME}'|'${{ secrets.AYS_INSTITUTION_SUPER_ADMIN_USER_ONE_USERNAME }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties
- name: Replace test_foundation.admin.email_address in configuration.properties # Step to replace the placeholder test_foundation.admin.email_address in configuration.properties
run: sed 's|'{TEST_FOUNDATION_ADMIN_EMAIL_ADDRESS}'|'${{ secrets.AYS_TEST_FOUNDATION_ADMIN_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace test_foundation.admin.password in configuration.properties # Step to replace the placeholder test_foundation.admin.password in configuration.properties
run: sed 's|'{TEST_FOUNDATION_ADMIN_PASSWORD}'|'${{ secrets.AYS_TEST_FOUNDATION_ADMIN_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Replace institution.super_admin_user_one.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties
run: sed 's|'{INSTITUTION_SUPER_ADMIN_USER_ONE_PASSWORD}'|'${{ secrets.AYS_INSTITUTION_SUPER_ADMIN_USER_ONE_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties

- name: Build with Maven # Step to build the project with Maven
run: mvn clean test -P weekly

8 changes: 4 additions & 4 deletions sample_configuration.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ui.url={UI_URL}
institution_one.admin_user_one.username={INSTITUTION_ONE_ADMIN_USER_ONE_USERNAME}
institution_one.admin_user_one.password={INSTITUTION_ONE_ADMIN_USER_ONE_PASSWORD}
institution.super_admin_user_one.username={INSTITUTION_SUPER_ADMIN_USER_ONE_USERNAME}
institution.super_admin_user_one.password={INSTITUTION_SUPER_ADMIN_USER_ONE_PASSWORD}
volunteer_foundation.admin.email_address={VOLUNTEER_FOUNDATION_ADMIN_EMAIL_ADDRESS}
volunteer_foundation.admin.password={VOLUNTEER_FOUNDATION_ADMIN_PASSWORD}
test_foundation.admin.email_address={TEST_FOUNDATION_ADMIN_EMAIL_ADDRESS}
test_foundation.admin.password={TEST_FOUNDATION_ADMIN_PASSWORD}
24 changes: 17 additions & 7 deletions src/test/java/org/ays/configuration/AysConfigurationProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,27 @@ public static class Ui {
public static final String URL = PROPERTIES.getProperty("ui.url");
}

public static class InstitutionOne {
public static class AdminUserOne {
public static final String USERNAME = PROPERTIES.getProperty("institution_one.admin_user_one.username");
public static final String PASSWORD = PROPERTIES.getProperty("institution_one.admin_user_one.password");
public static class VolunteerFoundation {

public static class Admin {
public static final String EMAIL_ADDRESS = PROPERTIES.getProperty("volunteer_foundation.admin.email_address");
public static final String PASSWORD = PROPERTIES.getProperty("volunteer_foundation.admin.password");

}
public static class SuperAdminUserOne {
public static final String USERNAME = PROPERTIES.getProperty("institution.super_admin_user_one.username");
public static final String PASSWORD = PROPERTIES.getProperty("institution.super_admin_user_one.password");

}

public static class TestFoundation {

public static class Admin {
public static final String EMAIL_ADDRESS = PROPERTIES.getProperty("test_foundation.admin.email_address");
public static final String PASSWORD = PROPERTIES.getProperty("test_foundation.admin.password");

}

}


private static class AysConfigurationException extends RuntimeException {

@Serial
Expand Down

This file was deleted.

14 changes: 0 additions & 14 deletions src/test/java/org/ays/feature/SuperAdminRegistrationFilter.feature

This file was deleted.

40 changes: 0 additions & 40 deletions src/test/java/org/ays/feature/UsersCreate.feature

This file was deleted.

32 changes: 0 additions & 32 deletions src/test/java/org/ays/feature/UsersDelete.feature

This file was deleted.

14 changes: 0 additions & 14 deletions src/test/java/org/ays/feature/UsersEdit.feature

This file was deleted.

12 changes: 0 additions & 12 deletions src/test/java/org/ays/feature/UsersShow.feature

This file was deleted.

45 changes: 0 additions & 45 deletions src/test/java/org/ays/pages/RegistrationApplicationsPOM.java

This file was deleted.

39 changes: 0 additions & 39 deletions src/test/java/org/ays/pages/SuperAdminPOM.java

This file was deleted.

Loading

0 comments on commit ecb6762

Please sign in to comment.