Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/dotnet-core-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ jobs:
path: eform-angular-frontend
- name: Copy dependencies
run: |
mkdir -p eform-angular-frontend/eform-client/e2e/Tests
mkdir -p "eform-angular-frontend/eform-client/e2e/Page objects"
mkdir -p eform-angular-frontend/eform-client/e2e/Constants
cp -av eform-angular-workflow-plugin/eform-client/e2e/Constants/LoginConstants.ts eform-angular-frontend/eform-client/e2e/Constants/LoginConstants.ts
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-settings eform-angular-frontend/eform-client/e2e/Tests/workflow-settings
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-general eform-angular-frontend/eform-client/e2e/Tests/workflow-general
cp -av eform-angular-workflow-plugin/eform-client/e2e/Page\ objects/Workflow eform-angular-frontend/eform-client/e2e/Page\ objects/Workflow
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-workflow-plugin/testinginstallpn.sh
- name: Get the version release
Expand Down Expand Up @@ -90,12 +94,16 @@ jobs:
mysql -u root -h 127.0.0.1 --password=secretpassword 420_eform-angular-workflow-plugin < eform-angular-workflow-plugin/420_eform-angular-workflow-plugin.sql
- name: Copy dependencies
run: |
mkdir -p eform-angular-frontend/eform-client/e2e/Tests
mkdir -p "eform-angular-frontend/eform-client/e2e/Page objects"
mkdir -p eform-angular-frontend/eform-client/e2e/Constants
cp -av eform-angular-workflow-plugin/eform-client/e2e/Constants/LoginConstants.ts eform-angular-frontend/eform-client/e2e/Constants/LoginConstants.ts
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-settings eform-angular-frontend/eform-client/e2e/Tests/workflow-settings
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-general eform-angular-frontend/eform-client/e2e/Tests/workflow-general
cp -av eform-angular-workflow-plugin/eform-client/e2e/Page\ objects/Workflow eform-angular-frontend/eform-client/e2e/Page\ objects/Workflow
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-workflow-plugin/testinginstallpn.sh
- name: Start the newly build Docker container
Expand Down Expand Up @@ -124,7 +132,7 @@ jobs:
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin
run: echo "Plugin testing migrated to workflow-playwright-test job"
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
Expand Down Expand Up @@ -209,7 +217,9 @@ jobs:
- name: Copy dependencies
run: |
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
mkdir -p eform-angular-frontend/eform-client/e2e/Constants
mkdir -p eform-angular-frontend/eform-client/playwright/e2e/plugins/
cp -av eform-angular-workflow-plugin/eform-client/e2e/Constants/LoginConstants.ts eform-angular-frontend/eform-client/e2e/Constants/LoginConstants.ts
cp -av eform-angular-workflow-plugin/eform-client/playwright/e2e/plugins/workflow-pn eform-angular-frontend/eform-client/playwright/e2e/plugins/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/playwright.config.ts eform-angular-frontend/eform-client/playwright.config.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/dotnet-core-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ jobs:
path: eform-angular-frontend
- name: Copy dependencies
run: |
mkdir -p eform-angular-frontend/eform-client/e2e/Tests
mkdir -p "eform-angular-frontend/eform-client/e2e/Page objects"
mkdir -p eform-angular-frontend/eform-client/e2e/Constants
cp -av eform-angular-workflow-plugin/eform-client/e2e/Constants/LoginConstants.ts eform-angular-frontend/eform-client/e2e/Constants/LoginConstants.ts
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-settings eform-angular-frontend/eform-client/e2e/Tests/workflow-settings
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-general eform-angular-frontend/eform-client/e2e/Tests/workflow-general
cp -av eform-angular-workflow-plugin/eform-client/e2e/Page\ objects/Workflow eform-angular-frontend/eform-client/e2e/Page\ objects/Workflow
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-workflow-plugin/testinginstallpn.sh
- name: Get the version release
Expand Down Expand Up @@ -84,12 +88,16 @@ jobs:
mysql -u root -h 127.0.0.1 --password=secretpassword 420_eform-angular-workflow-plugin < eform-angular-workflow-plugin/420_eform-angular-workflow-plugin.sql
- name: Copy dependencies
run: |
mkdir -p eform-angular-frontend/eform-client/e2e/Tests
mkdir -p "eform-angular-frontend/eform-client/e2e/Page objects"
mkdir -p eform-angular-frontend/eform-client/e2e/Constants
cp -av eform-angular-workflow-plugin/eform-client/e2e/Constants/LoginConstants.ts eform-angular-frontend/eform-client/e2e/Constants/LoginConstants.ts
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-settings eform-angular-frontend/eform-client/e2e/Tests/workflow-settings
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-general eform-angular-frontend/eform-client/e2e/Tests/workflow-general
cp -av eform-angular-workflow-plugin/eform-client/e2e/Page\ objects/Workflow eform-angular-frontend/eform-client/e2e/Page\ objects/Workflow
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-workflow-plugin/testinginstallpn.sh
- name: Start the newly build Docker container
Expand Down Expand Up @@ -118,7 +126,7 @@ jobs:
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin
run: echo "Plugin testing migrated to workflow-playwright-test job"
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
Expand Down Expand Up @@ -199,8 +207,10 @@ jobs:
mysql -u root -h 127.0.0.1 --password=secretpassword 420_eform-angular-workflow-plugin < eform-angular-workflow-plugin/420_eform-angular-workflow-plugin.sql
- name: Copy dependencies
run: |
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
mkdir -p eform-angular-frontend/eform-client/e2e/Constants
mkdir -p eform-angular-frontend/eform-client/playwright/e2e/plugins/
cp -av eform-angular-workflow-plugin/eform-client/e2e/Constants/LoginConstants.ts eform-angular-frontend/eform-client/e2e/Constants/LoginConstants.ts
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/playwright/e2e/plugins/workflow-pn eform-angular-frontend/eform-client/playwright/e2e/plugins/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/playwright.config.ts eform-angular-frontend/eform-client/playwright.config.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ namespace Workflow.Pn
using Infrastructure.Models.Settings;
using Microsoft.AspNetCore.Builder;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microting.eFormApi.BasePn;
Expand Down Expand Up @@ -151,7 +153,11 @@ public void ConfigureDbContext(IServiceCollection services, string connectionStr

var contextFactory = new WorkflowPnContextFactory();
var context = contextFactory.CreateDbContext(new[] { connectionString });
context.Database.Migrate();
var historyRepo = context.GetService<IHistoryRepository>();
if (!historyRepo.Exists() || context.Database.GetPendingMigrations().Any())
{
Comment on lines 154 to +158
context.Database.Migrate();
}

// Seed database
SeedDatabase(connectionString);
Expand Down
5 changes: 5 additions & 0 deletions eform-client/e2e/Constants/LoginConstants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
username: 'admin@admin.com',
password: 'secretpassword',
newPassword: '2Times2WillDo'
};
Loading