From 80aaf8b7f6bf3fcd9e36ed2c20377c6405f39b61 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 08:52:48 +0100 Subject: [PATCH 01/77] Added new stage --- build/azure-pipelines.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index a41d0f5b7f..80cebd8143 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -99,6 +99,39 @@ stages: inputs: command: test projects: '**\Umbraco.Tests.Integration.csproj' + - stage: Acceptance_Tests + displayName: Acceptance Tests + dependsOn: [] + jobs: + - job: Windows + displayName: Windows + pool: + vmImage: windows-latest + steps: + - task: UseDotNet@2 + displayName: Use .Net Core sdk 5.x + inputs: + version: 5.x + - task: DotNetCoreCLI@2 + displayName: dotnet build + inputs: + command: build + projects: '**/Umbraco.Web.UI.Netcore.csproj' + - task: NodeTool@0 + displayName: Use Node 11.x + inputs: + versionSpec: 11.x + - task: Npm@1 + displayName: npm install + inputs: + workingDir: src\Umbraco.Web.UI.Client + verbose: false + - task: gulp@0 + displayName: gulp build + inputs: + gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js + targets: build + workingDirectory: src\Umbraco.Web.UI.Client - stage: Artifacts dependsOn: [] jobs: From c9ba15ebd42c321e0ba22ee1bc94df774f71896c Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 08:54:27 +0100 Subject: [PATCH 02/77] fix indentation --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 80cebd8143..cfa29dfd48 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -120,7 +120,7 @@ stages: - task: NodeTool@0 displayName: Use Node 11.x inputs: - versionSpec: 11.x + versionSpec: 11.x - task: Npm@1 displayName: npm install inputs: From 2abdc8178f2b5d40154b3acc8e60c9260ac8b458 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 09:26:40 +0100 Subject: [PATCH 03/77] Try to run dotnet run in process --- build/azure-pipelines.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index cfa29dfd48..13ba6b377f 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -132,6 +132,19 @@ stages: gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js targets: build workingDirectory: src\Umbraco.Web.UI.Client + - task: PowerShell@1 + displayName: dotnet run + inputs: + scriptType: inlineScript + inlineScript: > + cd src\Umbraco.Web.UI.Netcore + Start-Process -FilePath "dotnet" -ArgumentList "run" + - task: PowerShell@1 + displayName: whatever + inputs: + scriptType: inlineScript + inlineScript: > + Write-Host "Hello World" - stage: Artifacts dependsOn: [] jobs: From 911e0f3837c5495fa1577828756f6028156a3280 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 09:58:02 +0100 Subject: [PATCH 04/77] added environment variables --- build/azure-pipelines.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 13ba6b377f..8aabaa3f9c 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -15,6 +15,7 @@ resources: stages: - stage: Unit_Tests displayName: Unit Tests + dependsOn: [] jobs: - job: Linux_Unit_Tests @@ -102,6 +103,17 @@ stages: - stage: Acceptance_Tests displayName: Acceptance Tests dependsOn: [] + variables: + - name: Umbraco__CMS__Unattended__InstallUnattended + value: true + - name: Umbraco__CMS__Unattended__UnattendedUserName + value: Cypress Test + - name: Umbraco__CMS__Unattended__UnattendedUserEmail + value: cypress@umbraco.com + - name: Umbraco__CMS__Unattended__UnattendedUserPassword + value: abc123ABC!!! + - name: ConnectionStrings__umbracoDbDSN + value: Server=(LocalDB)\\MSSQLLocalDB;Database=Cypress;Integrated Security=true jobs: - job: Windows displayName: Windows @@ -137,14 +149,18 @@ stages: inputs: scriptType: inlineScript inlineScript: > - cd src\Umbraco.Web.UI.Netcore - Start-Process -FilePath "dotnet" -ArgumentList "run" + Start-Process -FilePath "dotnet" -ArgumentList "run", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - task: PowerShell@1 displayName: whatever inputs: scriptType: inlineScript inlineScript: > Write-Host "Hello World" + - task: Npm@1 + displayName: npm install + inputs: + workingDir: src\Umbraco.Tests.AcceptanceTest + verbose: false - stage: Artifacts dependsOn: [] jobs: From 7ce2bc4a561fd1c5373928973ab68f24a406a99d Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 10:09:50 +0100 Subject: [PATCH 05/77] run cypress --- build/azure-pipelines.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 8aabaa3f9c..cf06852531 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -15,7 +15,6 @@ resources: stages: - stage: Unit_Tests displayName: Unit Tests - dependsOn: [] jobs: - job: Linux_Unit_Tests @@ -125,7 +124,7 @@ stages: inputs: version: 5.x - task: DotNetCoreCLI@2 - displayName: dotnet build + displayName: dotnet build (Netcore) inputs: command: build projects: '**/Umbraco.Web.UI.Netcore.csproj' @@ -134,7 +133,7 @@ stages: inputs: versionSpec: 11.x - task: Npm@1 - displayName: npm install + displayName: npm install (Client) inputs: workingDir: src\Umbraco.Web.UI.Client verbose: false @@ -145,7 +144,7 @@ stages: targets: build workingDirectory: src\Umbraco.Web.UI.Client - task: PowerShell@1 - displayName: dotnet run + displayName: dotnet run (Netcore) inputs: scriptType: inlineScript inlineScript: > @@ -155,12 +154,16 @@ stages: inputs: scriptType: inlineScript inlineScript: > - Write-Host "Hello World" + @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" - task: Npm@1 - displayName: npm install + displayName: npm install (AcceptanceTest) inputs: - workingDir: src\Umbraco.Tests.AcceptanceTest - verbose: false + workingDir: src\Umbraco.Tests.AcceptanceTest + verbose: false + - task: Npm@1 + inputs: + command: 'custom' + customCommand: 'run test' - stage: Artifacts dependsOn: [] jobs: From b2a62c83bb9874dad3cfc73c125035618ce3f332 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 10:14:45 +0100 Subject: [PATCH 06/77] Update port --- build/azure-pipelines.yml | 2 +- src/Umbraco.Web.UI.NetCore/Properties/launchSettings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index cf06852531..38583852d4 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -148,7 +148,7 @@ stages: inputs: scriptType: inlineScript inlineScript: > - Start-Process -FilePath "dotnet" -ArgumentList "run", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - task: PowerShell@1 displayName: whatever inputs: diff --git a/src/Umbraco.Web.UI.NetCore/Properties/launchSettings.json b/src/Umbraco.Web.UI.NetCore/Properties/launchSettings.json index b16945dcb0..4edb56f7fa 100644 --- a/src/Umbraco.Web.UI.NetCore/Properties/launchSettings.json +++ b/src/Umbraco.Web.UI.NetCore/Properties/launchSettings.json @@ -20,7 +20,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, - "applicationUrl": "https://localhost:44354;http://localhost:9000" + "applicationUrl": "https://localhost:44331;http://localhost:9000" } } } From a5cf66c25b06b3f51718c1be86ac2869c6a67514 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 10:23:45 +0100 Subject: [PATCH 07/77] Better displayNames --- build/azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 38583852d4..d78a0a30c2 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -150,7 +150,7 @@ stages: inlineScript: > Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - task: PowerShell@1 - displayName: whatever + displayName: Generate Cypress.env.json inputs: scriptType: inlineScript inlineScript: > @@ -161,6 +161,7 @@ stages: workingDir: src\Umbraco.Tests.AcceptanceTest verbose: false - task: Npm@1 + displayName: npm run test (AcceptanceTest) inputs: command: 'custom' customCommand: 'run test' From 64926795bf877b5d70f73a9dbedc43c3f8c16274 Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 10:29:58 +0100 Subject: [PATCH 08/77] Split Acceptance_Tests into jobs --- build/azure-pipelines.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 38583852d4..750de75448 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -128,6 +128,10 @@ stages: inputs: command: build projects: '**/Umbraco.Web.UI.Netcore.csproj' + - job: Install_client + displayName: Install Client + dependsOn: Windows + steps: - task: NodeTool@0 displayName: Use Node 11.x inputs: @@ -149,8 +153,12 @@ stages: scriptType: inlineScript inlineScript: > Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + - job: Install_Cypress + displayName: Install Cypress + dependsOn: Windows + steps: - task: PowerShell@1 - displayName: whatever + displayName: Update cypress.env inputs: scriptType: inlineScript inlineScript: > @@ -160,6 +168,12 @@ stages: inputs: workingDir: src\Umbraco.Tests.AcceptanceTest verbose: false + - job: Run_Tests + displayName: Run acceptance tests + dependsOn: + - Install_client + - Install_Cypress + steps: - task: Npm@1 inputs: command: 'custom' From 0a76b7fb0333e3ba297768dab4fbd06294d23188 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 10:30:45 +0100 Subject: [PATCH 09/77] Right folder --- build/azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index d78a0a30c2..df077468ab 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -163,6 +163,7 @@ stages: - task: Npm@1 displayName: npm run test (AcceptanceTest) inputs: + workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' customCommand: 'run test' - stage: Artifacts From dba80e1c8a1396098de905707f0306d8ec5a75dd Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 10:39:25 +0100 Subject: [PATCH 10/77] Add vmImage --- build/azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 99186850a9..ff683eafc3 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -131,6 +131,8 @@ stages: - job: Install_client displayName: Install Client dependsOn: Windows + pool: + vmImage: windows-latest steps: - task: NodeTool@0 displayName: Use Node 11.x @@ -156,6 +158,8 @@ stages: - job: Install_Cypress displayName: Install Cypress dependsOn: Windows + pool: + vmImage: windows-latest steps: - task: PowerShell@1 displayName: Generate Cypress.env.json @@ -173,6 +177,8 @@ stages: dependsOn: - Install_client - Install_Cypress + pool: + vmImage: windows-latest steps: - task: Npm@1 displayName: npm run test (AcceptanceTest) From 3936ca070f6575e1acb527fbcba83248a2c888e9 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 10:51:33 +0100 Subject: [PATCH 11/77] Start localdb --- build/azure-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index ff683eafc3..75c601975d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -114,8 +114,8 @@ stages: - name: ConnectionStrings__umbracoDbDSN value: Server=(LocalDB)\\MSSQLLocalDB;Database=Cypress;Integrated Security=true jobs: - - job: Windows - displayName: Windows + - job: dotnet_build + displayName: Build C# pool: vmImage: windows-latest steps: @@ -128,6 +128,8 @@ stages: inputs: command: build projects: '**/Umbraco.Web.UI.Netcore.csproj' + - powershell: sqllocaldb start mssqllocaldb + displayName: Start MSSQL LocalDb - job: Install_client displayName: Install Client dependsOn: Windows From 0e07a898ce51f3845906f3fcda469047028814d4 Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 11:05:30 +0100 Subject: [PATCH 12/77] Add start local db and prefix jobs with Windows --- build/azure-pipelines.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index ff683eafc3..76b392a11e 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -114,8 +114,8 @@ stages: - name: ConnectionStrings__umbracoDbDSN value: Server=(LocalDB)\\MSSQLLocalDB;Database=Cypress;Integrated Security=true jobs: - - job: Windows - displayName: Windows + - job: Windows_Dotnet_build + displayName: Windows Dotnet build pool: vmImage: windows-latest steps: @@ -123,14 +123,16 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x + - powershell: sqllocaldb start mssqllocaldb + displayName: Start MSSQL LocalDb - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) inputs: command: build projects: '**/Umbraco.Web.UI.Netcore.csproj' - - job: Install_client - displayName: Install Client - dependsOn: Windows + - job: Windows_Install_client + displayName: Windows Install Client + dependsOn: Windows_Dotnet_build pool: vmImage: windows-latest steps: @@ -155,9 +157,9 @@ stages: scriptType: inlineScript inlineScript: > Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - - job: Install_Cypress - displayName: Install Cypress - dependsOn: Windows + - job: Windows_Install_Cypress + displayName: Windows Install Cypress + dependsOn: Windows_Dotnet_build pool: vmImage: windows-latest steps: @@ -172,8 +174,8 @@ stages: inputs: workingDir: src\Umbraco.Tests.AcceptanceTest verbose: false - - job: Run_Tests - displayName: Run acceptance tests + - job: Windows_Run_Tests + displayName: Windows Run Acceptance Tests dependsOn: - Install_client - Install_Cypress From 7dd7d4a5b87c48458bfb175e743ab2ac06b9366f Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 11:07:09 +0100 Subject: [PATCH 13/77] Fix indentation --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 76b392a11e..1a0e76863a 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -124,7 +124,7 @@ stages: inputs: version: 5.x - powershell: sqllocaldb start mssqllocaldb - displayName: Start MSSQL LocalDb + displayName: Start MSSQL LocalDb - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) inputs: From f86275e77d611f9ed6c64bfe41e5e9a20b28bbf1 Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 11:08:25 +0100 Subject: [PATCH 14/77] Fix dependsOn --- build/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 1a0e76863a..ddce010cbf 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -130,7 +130,7 @@ stages: inputs: command: build projects: '**/Umbraco.Web.UI.Netcore.csproj' - - job: Windows_Install_client + - job: Windows_Install_Client displayName: Windows Install Client dependsOn: Windows_Dotnet_build pool: @@ -177,8 +177,8 @@ stages: - job: Windows_Run_Tests displayName: Windows Run Acceptance Tests dependsOn: - - Install_client - - Install_Cypress + - Windows_Install_Client + - Windows_Install_Cypress pool: vmImage: windows-latest steps: From 804e8853a7a38ef1f8d03beb3663c060dd05323d Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 11:13:31 +0100 Subject: [PATCH 15/77] Run install_client and install_cypress while building --- build/azure-pipelines.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index ddce010cbf..bc068a4e4d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -114,8 +114,8 @@ stages: - name: ConnectionStrings__umbracoDbDSN value: Server=(LocalDB)\\MSSQLLocalDB;Database=Cypress;Integrated Security=true jobs: - - job: Windows_Dotnet_build - displayName: Windows Dotnet build + - job: Windows_Dotnet_Build + displayName: Windows Dotnet Build pool: vmImage: windows-latest steps: @@ -132,7 +132,6 @@ stages: projects: '**/Umbraco.Web.UI.Netcore.csproj' - job: Windows_Install_Client displayName: Windows Install Client - dependsOn: Windows_Dotnet_build pool: vmImage: windows-latest steps: @@ -159,7 +158,6 @@ stages: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - job: Windows_Install_Cypress displayName: Windows Install Cypress - dependsOn: Windows_Dotnet_build pool: vmImage: windows-latest steps: @@ -177,6 +175,7 @@ stages: - job: Windows_Run_Tests displayName: Windows Run Acceptance Tests dependsOn: + - Windows_Dotnet_Build - Windows_Install_Client - Windows_Install_Cypress pool: From 9317e45dc67446d1cfa836eca8e761802ca4712b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 11:20:23 +0100 Subject: [PATCH 16/77] Move dotnet run --- build/azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index bc068a4e4d..069f8e99fc 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -150,12 +150,6 @@ stages: gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js targets: build workingDirectory: src\Umbraco.Web.UI.Client - - task: PowerShell@1 - displayName: dotnet run (Netcore) - inputs: - scriptType: inlineScript - inlineScript: > - Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - job: Windows_Install_Cypress displayName: Windows Install Cypress pool: @@ -181,6 +175,12 @@ stages: pool: vmImage: windows-latest steps: + - task: PowerShell@1 + displayName: dotnet run (Netcore) + inputs: + scriptType: inlineScript + inlineScript: > + Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - task: Npm@1 displayName: npm run test (AcceptanceTest) inputs: From ff51b477ebb58750630595a1bab58a779e2181d4 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 11:22:23 +0100 Subject: [PATCH 17/77] Move dotnet run --- build/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 069f8e99fc..47e2744c18 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -123,8 +123,6 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqllocaldb start mssqllocaldb - displayName: Start MSSQL LocalDb - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) inputs: @@ -175,6 +173,8 @@ stages: pool: vmImage: windows-latest steps: + - powershell: sqllocaldb start mssqllocaldb + displayName: Start MSSQL LocalDb - task: PowerShell@1 displayName: dotnet run (Netcore) inputs: From 131f731b4ce634498639c225566c7f68fef06be8 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 11:59:50 +0100 Subject: [PATCH 18/77] sleep and invoke web request --- build/azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 47e2744c18..27e0e88025 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -181,6 +181,8 @@ stages: scriptType: inlineScript inlineScript: > Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + Start-Sleep -s 15 + Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 - task: Npm@1 displayName: npm run test (AcceptanceTest) inputs: From b1e354778d502bb97d39c3dc81dcc16918ad63fb Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 12:22:08 +0100 Subject: [PATCH 19/77] Update azure-pipelines.yml for Azure Pipelines --- build/azure-pipelines.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 27e0e88025..603832b08d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -110,7 +110,7 @@ stages: - name: Umbraco__CMS__Unattended__UnattendedUserEmail value: cypress@umbraco.com - name: Umbraco__CMS__Unattended__UnattendedUserPassword - value: abc123ABC!!! + value: UmbracoAcceptance123! - name: ConnectionStrings__umbracoDbDSN value: Server=(LocalDB)\\MSSQLLocalDB;Database=Cypress;Integrated Security=true jobs: @@ -175,14 +175,12 @@ stages: steps: - powershell: sqllocaldb start mssqllocaldb displayName: Start MSSQL LocalDb - - task: PowerShell@1 + - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" displayName: dotnet run (Netcore) - inputs: - scriptType: inlineScript - inlineScript: > - Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - Start-Sleep -s 15 - Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 + - powershell: Start-Sleep -s 15 + displayName: Sleep 15 sec + - powershell: Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 + displayName: Call website - task: Npm@1 displayName: npm run test (AcceptanceTest) inputs: From b921d5b7709895e110662c36133fdec7dc8de0a4 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 12:42:33 +0100 Subject: [PATCH 20/77] Update azure-pipelines.yml for Azure Pipelines --- build/azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 603832b08d..48c5780b31 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -175,7 +175,9 @@ stages: steps: - powershell: sqllocaldb start mssqllocaldb displayName: Start MSSQL LocalDb - - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + #- powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + # displayName: dotnet run (Netcore) + - powershell: dotnet run --no-build -p src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj displayName: dotnet run (Netcore) - powershell: Start-Sleep -s 15 displayName: Sleep 15 sec From 95724e24f4703c3a9571bd52095329d7e8c1c6cf Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 13:06:14 +0100 Subject: [PATCH 21/77] remove jobs for acceptance tests --- build/azure-pipelines.yml | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 48c5780b31..c51173cd10 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -114,8 +114,8 @@ stages: - name: ConnectionStrings__umbracoDbDSN value: Server=(LocalDB)\\MSSQLLocalDB;Database=Cypress;Integrated Security=true jobs: - - job: Windows_Dotnet_Build - displayName: Windows Dotnet Build + - job: Windows_Acceptance_tests + displayName: Windows pool: vmImage: windows-latest steps: @@ -123,16 +123,13 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x + - powershell: sqllocaldb start mssqllocaldb + displayName: Start MSSQL LocalDb - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) inputs: command: build projects: '**/Umbraco.Web.UI.Netcore.csproj' - - job: Windows_Install_Client - displayName: Windows Install Client - pool: - vmImage: windows-latest - steps: - task: NodeTool@0 displayName: Use Node 11.x inputs: @@ -148,11 +145,10 @@ stages: gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js targets: build workingDirectory: src\Umbraco.Web.UI.Client - - job: Windows_Install_Cypress - displayName: Windows Install Cypress - pool: - vmImage: windows-latest - steps: + #- powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + # displayName: dotnet run (Netcore) + - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj + displayName: dotnet run (Netcore) - task: PowerShell@1 displayName: Generate Cypress.env.json inputs: @@ -164,23 +160,6 @@ stages: inputs: workingDir: src\Umbraco.Tests.AcceptanceTest verbose: false - - job: Windows_Run_Tests - displayName: Windows Run Acceptance Tests - dependsOn: - - Windows_Dotnet_Build - - Windows_Install_Client - - Windows_Install_Cypress - pool: - vmImage: windows-latest - steps: - - powershell: sqllocaldb start mssqllocaldb - displayName: Start MSSQL LocalDb - #- powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - # displayName: dotnet run (Netcore) - - powershell: dotnet run --no-build -p src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj - displayName: dotnet run (Netcore) - - powershell: Start-Sleep -s 15 - displayName: Sleep 15 sec - powershell: Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 displayName: Call website - task: Npm@1 From 6b79ef18bc39677e66c9ed9a5598ab8fcc5dc37b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 13:18:11 +0100 Subject: [PATCH 22/77] casing of local db instance name --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index c51173cd10..956bb1e40b 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -112,7 +112,7 @@ stages: - name: Umbraco__CMS__Unattended__UnattendedUserPassword value: UmbracoAcceptance123! - name: ConnectionStrings__umbracoDbDSN - value: Server=(LocalDB)\\MSSQLLocalDB;Database=Cypress;Integrated Security=true + value: Server=(LocalDB)\\mssqllocaldb;Database=Cypress;Integrated Security=true jobs: - job: Windows_Acceptance_tests displayName: Windows From e9a3ed44cff03d8cb0a4dca79bd0a57f47782ba1 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 13:31:15 +0100 Subject: [PATCH 23/77] test other connectionstring --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 956bb1e40b..4c5108674d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -112,7 +112,7 @@ stages: - name: Umbraco__CMS__Unattended__UnattendedUserPassword value: UmbracoAcceptance123! - name: ConnectionStrings__umbracoDbDSN - value: Server=(LocalDB)\\mssqllocaldb;Database=Cypress;Integrated Security=true + value: Server=(LocalDB)\\MSSQLLocalDB;Initial Catalog=Cypress;Integrated Security=true jobs: - job: Windows_Acceptance_tests displayName: Windows From cc221c684b712646bb673d6cba7f00b5b17f5474 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 14:11:09 +0100 Subject: [PATCH 24/77] nested variables names and create database --- build/azure-pipelines.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 4c5108674d..d61723a46e 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -111,8 +111,12 @@ stages: value: cypress@umbraco.com - name: Umbraco__CMS__Unattended__UnattendedUserPassword value: UmbracoAcceptance123! + - name: UmbracoDatabaseServer + value: (LocalDB)\\MSSQLLocalDB + - name: UmbracoDatabaseName + value: Cypress - name: ConnectionStrings__umbracoDbDSN - value: Server=(LocalDB)\\MSSQLLocalDB;Initial Catalog=Cypress;Integrated Security=true + value: Server=$(UmbracoDatabaseServer);Database=$(UmbracoDatabaseName);Integrated Security=true; jobs: - job: Windows_Acceptance_tests displayName: Windows @@ -125,6 +129,8 @@ stages: version: 5.x - powershell: sqllocaldb start mssqllocaldb displayName: Start MSSQL LocalDb + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer + displayName: Create database - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) inputs: From 204c476486aba2c0fbf0f5b6779814f4619deea7 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 14:20:30 +0100 Subject: [PATCH 25/77] syntax fix --- build/azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index d61723a46e..ddd45ae4bb 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -127,9 +127,10 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x + - powershell: sqllocaldb start mssqllocaldb displayName: Start MSSQL LocalDb - - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $($env:UmbracoDatabaseName)" -ServerInstance $env:UmbracoDatabaseServer displayName: Create database - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) From 3c3e22f7ffcf91d652c8124b7aeadf030adb07cf Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 14:28:29 +0100 Subject: [PATCH 26/77] test with hardcoded values --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index ddd45ae4bb..d519953c5c 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -130,7 +130,7 @@ stages: - powershell: sqllocaldb start mssqllocaldb displayName: Start MSSQL LocalDb - - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $($env:UmbracoDatabaseName)" -ServerInstance $env:UmbracoDatabaseServer + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE Cypress" -ServerInstance "(LocalDB)\\MSSQLLocalDB" displayName: Create database - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) From 0e14ab6b9ffea2725385b4db0553d15e0c566af3 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 14:34:03 +0100 Subject: [PATCH 27/77] Update azure-pipelines.yml for Azure Pipelines --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index d519953c5c..b3895490e4 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -130,7 +130,7 @@ stages: - powershell: sqllocaldb start mssqllocaldb displayName: Start MSSQL LocalDb - - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE Cypress" -ServerInstance "(LocalDB)\\MSSQLLocalDB" + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE Cypress" -ServerInstance "(LocalDB)\MSSQLLocalDB" displayName: Create database - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) From 74bfe973570ceaa34267ec32157e338038203af6 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 14:43:27 +0100 Subject: [PATCH 28/77] are \\ wrong for connectionstring.. --- build/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index b3895490e4..98c0588448 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -112,7 +112,7 @@ stages: - name: Umbraco__CMS__Unattended__UnattendedUserPassword value: UmbracoAcceptance123! - name: UmbracoDatabaseServer - value: (LocalDB)\\MSSQLLocalDB + value: (LocalDB)\MSSQLLocalDB - name: UmbracoDatabaseName value: Cypress - name: ConnectionStrings__umbracoDbDSN @@ -130,7 +130,7 @@ stages: - powershell: sqllocaldb start mssqllocaldb displayName: Start MSSQL LocalDb - - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE Cypress" -ServerInstance "(LocalDB)\MSSQLLocalDB" + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $($env:UmbracoDatabaseName)" -ServerInstance $env:UmbracoDatabaseServer displayName: Create database - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) From 9cd33c1dd428186f77676ed9fa2684f83e96fa0d Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 14:51:40 +0100 Subject: [PATCH 29/77] Update azure-pipelines.yml for Azure Pipelines --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 98c0588448..a0626051e3 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -130,7 +130,7 @@ stages: - powershell: sqllocaldb start mssqllocaldb displayName: Start MSSQL LocalDb - - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $($env:UmbracoDatabaseName)" -ServerInstance $env:UmbracoDatabaseServer + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer displayName: Create database - task: DotNetCoreCLI@2 displayName: dotnet build (Netcore) From 7d9efb014cc11e44b14e46c6c5195faa5ba79491 Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 15:03:17 +0100 Subject: [PATCH 30/77] Run site in separate process again. --- build/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index a0626051e3..50e79dbe72 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -152,10 +152,10 @@ stages: gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js targets: build workingDirectory: src\Umbraco.Web.UI.Client - #- powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - # displayName: dotnet run (Netcore) - - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj + - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" displayName: dotnet run (Netcore) +# - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj +# displayName: dotnet run (Netcore) - task: PowerShell@1 displayName: Generate Cypress.env.json inputs: From 0b2a3753bd993f6e07fd628615f9999fa33d36b1 Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 15:23:15 +0100 Subject: [PATCH 31/77] Try hack to get around ssl --- build/azure-pipelines.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 50e79dbe72..6802eb04b5 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -167,8 +167,24 @@ stages: inputs: workingDir: src\Umbraco.Tests.AcceptanceTest verbose: false - - powershell: Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 + - task: PowerShell@1 displayName: Call website + inputs: + scriptType: inlineScript + inlineScript: > + add-type @" + using System.Net; + using System.Security.Cryptography.X509Certificates; + public class TrustAllCertsPolicy : ICertificatePolicy { + public bool CheckValidationResult( + ServicePoint srvPoint, X509Certificate certificate, + WebRequest request, int certificateProblem) { + return true; + } + } + "@ + [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy + Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 - task: Npm@1 displayName: npm run test (AcceptanceTest) inputs: From c1d701efff296be0fc616d94e2d9eb0a69ebbf5d Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 15:49:16 +0100 Subject: [PATCH 32/77] Try using -SkipCertificateCheck --- build/azure-pipelines.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 6802eb04b5..a6c83581f1 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -167,24 +167,8 @@ stages: inputs: workingDir: src\Umbraco.Tests.AcceptanceTest verbose: false - - task: PowerShell@1 + - powershell: Invoke-WebRequest https://localhost:44331 -SkipCertificateCheck -TimeoutSec 120 displayName: Call website - inputs: - scriptType: inlineScript - inlineScript: > - add-type @" - using System.Net; - using System.Security.Cryptography.X509Certificates; - public class TrustAllCertsPolicy : ICertificatePolicy { - public bool CheckValidationResult( - ServicePoint srvPoint, X509Certificate certificate, - WebRequest request, int certificateProblem) { - return true; - } - } - "@ - [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy - Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 - task: Npm@1 displayName: npm run test (AcceptanceTest) inputs: From eeb5c1db7c29572bbc5ea274d289ac67e159b19b Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 16:34:00 +0100 Subject: [PATCH 33/77] Remove call website --- build/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index a6c83581f1..2ef5444f07 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -167,8 +167,8 @@ stages: inputs: workingDir: src\Umbraco.Tests.AcceptanceTest verbose: false - - powershell: Invoke-WebRequest https://localhost:44331 -SkipCertificateCheck -TimeoutSec 120 - displayName: Call website +# - powershell: Invoke-WebRequest https://localhost:44331 -SkipCertificateCheck -TimeoutSec 120 +# displayName: Call website - task: Npm@1 displayName: npm run test (AcceptanceTest) inputs: From b60fffe8e5b5e7eeaca1172226289b95e1fbf550 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 18:29:26 +0100 Subject: [PATCH 34/77] Run cypress with custom commands --- build/azure-pipelines.yml | 46 +++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 2ef5444f07..bc58dcb0bc 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -165,16 +165,44 @@ stages: - task: Npm@1 displayName: npm install (AcceptanceTest) inputs: - workingDir: src\Umbraco.Tests.AcceptanceTest - verbose: false -# - powershell: Invoke-WebRequest https://localhost:44331 -SkipCertificateCheck -TimeoutSec 120 -# displayName: Call website - - task: Npm@1 - displayName: npm run test (AcceptanceTest) + workingDir: + - task: PowerShell@2 + displayName: Run Cypress (Desktop) inputs: - workingDir: src\Umbraco.Tests.AcceptanceTest - command: 'custom' - customCommand: 'run test' + targetType: 'inline' + errorActionPreference: 'continue' + workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' + script: | + node_modules/.bin/cypress run --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos + - task: PowerShell@2 + displayName: Run Cypress (Tablet portrait) + inputs: + targetType: 'inline' + errorActionPreference: 'continue' + workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' + script: | + node_modules/.bin/cypress run --reporter junit --reporter-options "mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos + - task: PowerShell@2 + displayName: Run Cypress (Mobile protrait) + inputs: + targetType: 'inline' + errorActionPreference: 'continue' + workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' + script: | + node_modules/.bin/cypress run --reporter junit --reporter-options "mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos + - task: PublishTestResults@2 + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: 'results/test-output-M-*.xml' + mergeTestResults: true + testRunTitle: "Test results Mobile" + # - task: Npm@1 + # displayName: npm run test (AcceptanceTest) + # inputs: + # workingDir: src\Umbraco.Tests.AcceptanceTest + # command: 'custom' + # customCommand: 'run test' + - stage: Artifacts dependsOn: [] jobs: From 31c786d9fd88e3b0ded35da33eac852edac8540b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 18:51:59 +0100 Subject: [PATCH 35/77] changed slash vs backslash --- build/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index bc58dcb0bc..363cc2f82a 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -173,7 +173,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - node_modules/.bin/cypress run --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos + node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos" - task: PowerShell@2 displayName: Run Cypress (Tablet portrait) inputs: @@ -181,7 +181,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - node_modules/.bin/cypress run --reporter junit --reporter-options "mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos + node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos" - task: PowerShell@2 displayName: Run Cypress (Mobile protrait) inputs: @@ -189,7 +189,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - node_modules/.bin/cypress run --reporter junit --reporter-options "mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos + node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos" - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' From 3ac15011c89227cf009bfe4d528c88537e99ccd3 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 19:12:31 +0100 Subject: [PATCH 36/77] Update azure-pipelines.yml for Azure Pipelines --- build/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 363cc2f82a..f13256b0b2 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -173,7 +173,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos" + .\node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos" - task: PowerShell@2 displayName: Run Cypress (Tablet portrait) inputs: @@ -181,7 +181,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos" + .\node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos" - task: PowerShell@2 displayName: Run Cypress (Mobile protrait) inputs: @@ -189,7 +189,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos" + .\node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos" - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' From ab9f7bb15172bb015c97dda183f4c3daec4b193e Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 19:26:59 +0100 Subject: [PATCH 37/77] try using npx --- build/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index f13256b0b2..74026e2f56 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -173,7 +173,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - .\node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos" + npx cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos" - task: PowerShell@2 displayName: Run Cypress (Tablet portrait) inputs: @@ -181,7 +181,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - .\node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos" + npx cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos" - task: PowerShell@2 displayName: Run Cypress (Mobile protrait) inputs: @@ -189,7 +189,7 @@ stages: errorActionPreference: 'continue' workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' script: | - .\node_modules\.bin\cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos" + npx cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos" - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' From 5ef26997a0eaa3590d6726f8baf4b3ebe9adba16 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 19:44:59 +0100 Subject: [PATCH 38/77] use npm run again , but with custom params --- build/azure-pipelines.yml | 56 +++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 74026e2f56..24c5d29c4f 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -165,44 +165,48 @@ stages: - task: Npm@1 displayName: npm install (AcceptanceTest) inputs: - workingDir: - - task: PowerShell@2 + workingDir: 'src\Umbraco.Tests.AcceptanceTest' + - task: Npm@1 displayName: Run Cypress (Desktop) inputs: - targetType: 'inline' - errorActionPreference: 'continue' - workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' - script: | - npx cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos" - - task: PowerShell@2 + workingDir: src\Umbraco.Tests.AcceptanceTest + command: 'custom' + customCommand: 'run test -- --reporter=junit --reporter-options="mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos"' + - task: PublishTestResults@2 + displayName: Publish Test results (Desktop) + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: 'results/test-output-D-*.xml' + mergeTestResults: true + testRunTitle: "Test results Desktop" + - task: Npm@1 displayName: Run Cypress (Tablet portrait) inputs: - targetType: 'inline' - errorActionPreference: 'continue' - workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' - script: | - npx cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos" - - task: PowerShell@2 + workingDir: src\Umbraco.Tests.AcceptanceTest + command: 'custom' + customCommand: 'run test -- --reporter=junit --reporter-options="mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos"' + - task: PublishTestResults@2 + displayName: Publish Test results (Tablet portrait) + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: 'results/test-output-T-*.xml' + mergeTestResults: true + testRunTitle: "Test results Tablet portrait" + - task: Npm@1 displayName: Run Cypress (Mobile protrait) inputs: - targetType: 'inline' - errorActionPreference: 'continue' - workingDirectory: 'src\Umbraco.Tests.AcceptanceTest' - script: | - npx cypress run --reporter=junit --reporter-options="mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos" + workingDir: src\Umbraco.Tests.AcceptanceTest + command: 'custom' + customCommand: 'run test -- --reporter-options="mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos"' + - task: PublishTestResults@2 + displayName: Publish Test results (Mobile portrait) inputs: testResultsFormat: 'JUnit' testResultsFiles: 'results/test-output-M-*.xml' mergeTestResults: true testRunTitle: "Test results Mobile" - # - task: Npm@1 - # displayName: npm run test (AcceptanceTest) - # inputs: - # workingDir: src\Umbraco.Tests.AcceptanceTest - # command: 'custom' - # customCommand: 'run test' - + - stage: Artifacts dependsOn: [] jobs: From f5bd29a8a353c9101b23dac6a3654f76f8e5c883 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 20:09:02 +0100 Subject: [PATCH 39/77] continue on error --- build/azure-pipelines.yml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 24c5d29c4f..0dd1723969 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -168,44 +168,32 @@ stages: workingDir: 'src\Umbraco.Tests.AcceptanceTest' - task: Npm@1 displayName: Run Cypress (Desktop) + continueOnError: true inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --reporter=junit --reporter-options="mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos"' - - task: PublishTestResults@2 - displayName: Publish Test results (Desktop) - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'results/test-output-D-*.xml' - mergeTestResults: true - testRunTitle: "Test results Desktop" + customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos"' + - task: Npm@1 displayName: Run Cypress (Tablet portrait) + continueOnError: true inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --reporter=junit --reporter-options="mochaFile=results/test-output-T-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos"' - - task: PublishTestResults@2 - displayName: Publish Test results (Tablet portrait) - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'results/test-output-T-*.xml' - mergeTestResults: true - testRunTitle: "Test results Tablet portrait" + customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos"' + - task: Npm@1 displayName: Run Cypress (Mobile protrait) + continueOnError: true inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --reporter-options="mochaFile=results/test-output-M-[hash].xml,toConsole=true" --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos"' - - - task: PublishTestResults@2 - displayName: Publish Test results (Mobile portrait) + customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos"' + - task: PublishPipelineArtifact@1 + displayName: "Publish test artifacts" inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'results/test-output-M-*.xml' - mergeTestResults: true - testRunTitle: "Test results Mobile" + targetPath: '$(Build.SourcesDirectory)/cypress/artifacts' + artifact: 'Test artifacts' - stage: Artifacts dependsOn: [] From 124dbd528be81e05511d7142b881faa38b53db0e Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 22 Mar 2021 21:03:44 +0100 Subject: [PATCH 40/77] fix path --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 0dd1723969..28567ef236 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -192,7 +192,7 @@ stages: - task: PublishPipelineArtifact@1 displayName: "Publish test artifacts" inputs: - targetPath: '$(Build.SourcesDirectory)/cypress/artifacts' + targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' artifact: 'Test artifacts' - stage: Artifacts From b84e3e3bbc85430e72b8d8a6624d6d52328fe135 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 06:47:51 +0100 Subject: [PATCH 41/77] use condition istead of continueonerror --- build/azure-pipelines.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 28567ef236..a22bdbccda 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -163,34 +163,36 @@ stages: inlineScript: > @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" - task: Npm@1 + name: PrepareTask displayName: npm install (AcceptanceTest) inputs: workingDir: 'src\Umbraco.Tests.AcceptanceTest' - task: Npm@1 displayName: Run Cypress (Desktop) - continueOnError: true + condition: eq(PrepareTask.result,'Succeeded') inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos"' + customCommand: 'run test -- --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' - task: Npm@1 displayName: Run Cypress (Tablet portrait) - continueOnError: true + condition: eq(PrepareTask.result,'Succeeded') inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos"' + customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' - task: Npm@1 displayName: Run Cypress (Mobile protrait) - continueOnError: true + condition: eq(PrepareTask.result,'Succeeded') inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos"' + customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' - task: PublishPipelineArtifact@1 displayName: "Publish test artifacts" + condition: eq(PrepareTask.result,'Succeeded') inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' artifact: 'Test artifacts' From df43f9139693d3f1b8abd5745f6f585cd3cdb788 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 06:50:57 +0100 Subject: [PATCH 42/77] Update azure-pipelines.yml for Azure Pipelines --- build/azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index a22bdbccda..8284d631cc 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -169,7 +169,7 @@ stages: workingDir: 'src\Umbraco.Tests.AcceptanceTest' - task: Npm@1 displayName: Run Cypress (Desktop) - condition: eq(PrepareTask.result,'Succeeded') + condition: always() inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' @@ -177,7 +177,7 @@ stages: - task: Npm@1 displayName: Run Cypress (Tablet portrait) - condition: eq(PrepareTask.result,'Succeeded') + condition: always() inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' @@ -185,14 +185,14 @@ stages: - task: Npm@1 displayName: Run Cypress (Mobile protrait) - condition: eq(PrepareTask.result,'Succeeded') + condition: always() inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' - task: PublishPipelineArtifact@1 displayName: "Publish test artifacts" - condition: eq(PrepareTask.result,'Succeeded') + condition: always() inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' artifact: 'Test artifacts' From d8555d501c1cc6889fc77d9e3d6f4a868be79507 Mon Sep 17 00:00:00 2001 From: Mole Date: Tue, 23 Mar 2021 08:51:48 +0100 Subject: [PATCH 43/77] Add retries, fix two failing tests, and uncomment tablet & mobile tests --- build/azure-pipelines.yml | 34 +++++++++---------- src/Umbraco.Tests.AcceptanceTest/cypress.json | 6 +++- .../cypress/integration/Settings/languages.ts | 2 +- .../cypress/integration/Settings/templates.ts | 3 ++ 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 8284d631cc..25967e1c23 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -174,29 +174,29 @@ stages: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' customCommand: 'run test -- --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' - - - task: Npm@1 - displayName: Run Cypress (Tablet portrait) - condition: always() - inputs: - workingDir: src\Umbraco.Tests.AcceptanceTest - command: 'custom' - customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' - - - task: Npm@1 - displayName: Run Cypress (Mobile protrait) - condition: always() - inputs: - workingDir: src\Umbraco.Tests.AcceptanceTest - command: 'custom' - customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' + +# - task: Npm@1 +# displayName: Run Cypress (Tablet portrait) +# condition: always() +# inputs: +# workingDir: src\Umbraco.Tests.AcceptanceTest +# command: 'custom' +# customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' +# +# - task: Npm@1 +# displayName: Run Cypress (Mobile protrait) +# condition: always() +# inputs: +# workingDir: src\Umbraco.Tests.AcceptanceTest +# command: 'custom' +# customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' - task: PublishPipelineArtifact@1 displayName: "Publish test artifacts" condition: always() inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' artifact: 'Test artifacts' - + - stage: Artifacts dependsOn: [] jobs: diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress.json b/src/Umbraco.Tests.AcceptanceTest/cypress.json index 33978211ed..d563625cb8 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress.json +++ b/src/Umbraco.Tests.AcceptanceTest/cypress.json @@ -7,5 +7,9 @@ "password": "" }, "supportFile": "cypress/support/index.ts", - "videoUploadOnPasses" : false + "videoUploadOnPasses" : false, + "retries": { + "runMode": 2, + "openMode": 1 + } } diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts index 541c6d213d..b3e7f2f2e2 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts @@ -6,7 +6,7 @@ context('Languages', () => { }); it('Add language', () => { - const name = "Afrikaans"; // Must be an option in the select box + const name = "afrikaans"; // Must be an option in the select box cy.umbracoEnsureLanguageNameNotExists(name); diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts index 3122c3ebf7..8e0eed9154 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts @@ -23,6 +23,9 @@ context('Templates', () => { cy.umbracoEnsureTemplateNameNotExists(name); createTemplate(); + // We have to wait for the ace editor to load, because when the editor is loading it will "steal" the focus briefly, + // which causes the save event to fire if we've added something to the header field, causing errors. + cy.wait(500); //Type name cy.umbracoEditorHeaderName(name); // Save From f3aa3812c49821302d964199b4a507eb71b46352 Mon Sep 17 00:00:00 2001 From: Mole Date: Tue, 23 Mar 2021 09:30:30 +0100 Subject: [PATCH 44/77] Remove videos if no test failed --- .../cypress/plugins/index.js | 9 +++++++++ src/Umbraco.Tests.AcceptanceTest/package.json | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/plugins/index.js b/src/Umbraco.Tests.AcceptanceTest/cypress/plugins/index.js index 59283feec5..51b79a1fef 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/plugins/index.js +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/plugins/index.js @@ -11,6 +11,7 @@ // This function is called when a project is opened or re-opened (e.g. due to // the project's config changing) +const del = require('del') /** * @type {Cypress.PluginConfig} @@ -24,5 +25,13 @@ module.exports = (on, config) => { config.baseUrl = baseUrl; } + on('after:spec', (spec, results) => { + if(results.stats.failures === 0 && results.video) { + // `del()` returns a promise, so it's important to return it to ensure + // deleting the video is finished before moving + return del(results.video) + } + }) + return config; } diff --git a/src/Umbraco.Tests.AcceptanceTest/package.json b/src/Umbraco.Tests.AcceptanceTest/package.json index 378fe719fc..b443390d1e 100644 --- a/src/Umbraco.Tests.AcceptanceTest/package.json +++ b/src/Umbraco.Tests.AcceptanceTest/package.json @@ -7,7 +7,8 @@ }, "devDependencies": { "cross-env": "^7.0.2", - "cypress": "^6.0.1", + "cypress": "^6.7.0", + "del": "^6.0.0", "ncp": "^2.0.0", "prompt": "^1.0.0", "umbraco-cypress-testhelpers": "^1.0.0-beta-52" From 25de77a8bee1c1cd2f3d78ece586205d02aad033 Mon Sep 17 00:00:00 2001 From: Mole Date: Tue, 23 Mar 2021 09:55:14 +0100 Subject: [PATCH 45/77] Up retries to 5 and set language name back to Afrikaans --- src/Umbraco.Tests.AcceptanceTest/cypress.json | 2 +- .../cypress/integration/Settings/languages.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress.json b/src/Umbraco.Tests.AcceptanceTest/cypress.json index d563625cb8..340eede2a0 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress.json +++ b/src/Umbraco.Tests.AcceptanceTest/cypress.json @@ -9,7 +9,7 @@ "supportFile": "cypress/support/index.ts", "videoUploadOnPasses" : false, "retries": { - "runMode": 2, + "runMode": 5, "openMode": 1 } } diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts index b3e7f2f2e2..541c6d213d 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts @@ -6,7 +6,7 @@ context('Languages', () => { }); it('Add language', () => { - const name = "afrikaans"; // Must be an option in the select box + const name = "Afrikaans"; // Must be an option in the select box cy.umbracoEnsureLanguageNameNotExists(name); From 347ab9ffec4ff027807190caedbf9cb01c9e79b8 Mon Sep 17 00:00:00 2001 From: Mole Date: Tue, 23 Mar 2021 11:39:13 +0100 Subject: [PATCH 46/77] Only publish artifacts on failed --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 25967e1c23..995ce3bd1c 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -192,7 +192,7 @@ stages: # customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' - task: PublishPipelineArtifact@1 displayName: "Publish test artifacts" - condition: always() + condition: failed() inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' artifact: 'Test artifacts' From 0f3bed13d5b04924ee570cfb2c875438394ea03a Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 11:54:02 +0100 Subject: [PATCH 47/77] Potential optimization - Build as part of run (in background process) --- build/azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 995ce3bd1c..13a9de8f70 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -132,11 +132,11 @@ stages: displayName: Start MSSQL LocalDb - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer displayName: Create database - - task: DotNetCoreCLI@2 - displayName: dotnet build (Netcore) - inputs: - command: build - projects: '**/Umbraco.Web.UI.Netcore.csproj' +# - task: DotNetCoreCLI@2 +# displayName: dotnet build (Netcore) +# inputs: +# command: build +# projects: '**/Umbraco.Web.UI.Netcore.csproj' - task: NodeTool@0 displayName: Use Node 11.x inputs: @@ -152,7 +152,7 @@ stages: gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js targets: build workingDirectory: src\Umbraco.Web.UI.Client - - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" displayName: dotnet run (Netcore) # - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj # displayName: dotnet run (Netcore) From 04df87984f82ede0abbb5d49d03d369d2923e6bd Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 11:59:57 +0100 Subject: [PATCH 48/77] Change test reporter to junit --- build/azure-pipelines.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 13a9de8f70..ed02988980 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -173,8 +173,14 @@ stages: inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' + customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' + - task: PublishTestResults@2 + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-M-*.xml' + mergeTestResults: true + testRunTitle: "Test results Desktop" # - task: Npm@1 # displayName: Run Cypress (Tablet portrait) # condition: always() From cad4e9a0fe3db6af39ba49b2c17c6056de026441 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 12:29:34 +0100 Subject: [PATCH 49/77] Fix wrong test result output file --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index ed02988980..4b3d2d0cce 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -178,7 +178,7 @@ stages: - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' - testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-M-*.xml' + testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml' mergeTestResults: true testRunTitle: "Test results Desktop" # - task: Npm@1 From c6eefeb2d7b785fc2dcb09e725cd077dfb88118c Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 14:04:55 +0100 Subject: [PATCH 50/77] Always post test result --- build/azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 4b3d2d0cce..43a6f09d46 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -176,6 +176,7 @@ stages: customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' - task: PublishTestResults@2 + condition: always() inputs: testResultsFormat: 'JUnit' testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml' From e49f8a0edf4a01fa46db8fb83c64a765d466df33 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 20:52:45 +0100 Subject: [PATCH 51/77] Add Linux acceptance tests - Trial 1 --- build/azure-pipelines.yml | 104 +++++++++++++++++++++++++++++++++++--- 1 file changed, 98 insertions(+), 6 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 43a6f09d46..aa6ecb269d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -111,14 +111,15 @@ stages: value: cypress@umbraco.com - name: Umbraco__CMS__Unattended__UnattendedUserPassword value: UmbracoAcceptance123! - - name: UmbracoDatabaseServer - value: (LocalDB)\MSSQLLocalDB - - name: UmbracoDatabaseName - value: Cypress - - name: ConnectionStrings__umbracoDbDSN - value: Server=$(UmbracoDatabaseServer);Database=$(UmbracoDatabaseName);Integrated Security=true; jobs: - job: Windows_Acceptance_tests + variables: + - name: UmbracoDatabaseServer + value: (LocalDB)\MSSQLLocalDB + - name: UmbracoDatabaseName + value: Cypress + - name: ConnectionStrings__umbracoDbDSN + value: Server=$(UmbracoDatabaseServer);Database=$(UmbracoDatabaseName);Integrated Security=true; displayName: Windows pool: vmImage: windows-latest @@ -203,7 +204,98 @@ stages: inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' artifact: 'Test artifacts' + - job: Linux_Acceptance_tests + displayName: Linux + variables: + - name: UmbracoDatabaseServer + value: localhost + - name: UmbracoDatabaseName + value: Cypress + - name: ConnectionStrings__umbracoDbDSN + value: Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD); + services: + mssql: mssql + pool: + vmImage: ubuntu-latest + steps: + - task: UseDotNet@2 + displayName: Use .Net Core sdk 5.x + inputs: + version: 5.x + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer + displayName: Create database + # - task: DotNetCoreCLI@2 + # displayName: dotnet build (Netcore) + # inputs: + # command: build + # projects: '**/Umbraco.Web.UI.Netcore.csproj' + - task: NodeTool@0 + displayName: Use Node 11.x + inputs: + versionSpec: 11.x + - task: Npm@1 + displayName: npm install (Client) + inputs: + workingDir: src\Umbraco.Web.UI.Client + verbose: false + - task: gulp@0 + displayName: gulp build + inputs: + gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js + targets: build + workingDirectory: src\Umbraco.Web.UI.Client + - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + displayName: dotnet run (Netcore) + # - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj + # displayName: dotnet run (Netcore) + - task: PowerShell@1 + displayName: Generate Cypress.env.json + inputs: + scriptType: inlineScript + inlineScript: > + @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" + - task: Npm@1 + name: PrepareTask + displayName: npm install (AcceptanceTest) + inputs: + workingDir: 'src\Umbraco.Tests.AcceptanceTest' + - task: Npm@1 + displayName: Run Cypress (Desktop) + condition: always() + inputs: + workingDir: src\Umbraco.Tests.AcceptanceTest + command: 'custom' + customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' + + - task: PublishTestResults@2 + condition: always() + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml' + mergeTestResults: true + testRunTitle: "Test results Desktop" + # - task: Npm@1 + # displayName: Run Cypress (Tablet portrait) + # condition: always() + # inputs: + # workingDir: src\Umbraco.Tests.AcceptanceTest + # command: 'custom' + # customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' + # + # - task: Npm@1 + # displayName: Run Cypress (Mobile protrait) + # condition: always() + # inputs: + # workingDir: src\Umbraco.Tests.AcceptanceTest + # command: 'custom' + # customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' + - task: PublishPipelineArtifact@1 + displayName: "Publish test artifacts" + condition: failed() + inputs: + targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' + artifact: 'Test artifacts' - stage: Artifacts dependsOn: [] jobs: From d534493c70c6f413dc8948612e08a5de5041c888 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 20:58:50 +0100 Subject: [PATCH 52/77] Add Linux acceptance tests - Trial 2 --- build/azure-pipelines.yml | 180 +++++++++++++++++++------------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index aa6ecb269d..a20d290f95 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -204,98 +204,98 @@ stages: inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' artifact: 'Test artifacts' - - job: Linux_Acceptance_tests - displayName: Linux - variables: - - name: UmbracoDatabaseServer - value: localhost - - name: UmbracoDatabaseName - value: Cypress - - name: ConnectionStrings__umbracoDbDSN - value: Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD); - services: - mssql: mssql - pool: - vmImage: ubuntu-latest - steps: - - task: UseDotNet@2 - displayName: Use .Net Core sdk 5.x - inputs: - version: 5.x + - job: Linux_Acceptance_tests + displayName: Linux + variables: + - name: UmbracoDatabaseServer + value: localhost + - name: UmbracoDatabaseName + value: Cypress + - name: ConnectionStrings__umbracoDbDSN + value: Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD); + services: + mssql: mssql + pool: + vmImage: ubuntu-latest + steps: + - task: UseDotNet@2 + displayName: Use .Net Core sdk 5.x + inputs: + version: 5.x - - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer - displayName: Create database - # - task: DotNetCoreCLI@2 - # displayName: dotnet build (Netcore) - # inputs: - # command: build - # projects: '**/Umbraco.Web.UI.Netcore.csproj' - - task: NodeTool@0 - displayName: Use Node 11.x - inputs: - versionSpec: 11.x - - task: Npm@1 - displayName: npm install (Client) - inputs: - workingDir: src\Umbraco.Web.UI.Client - verbose: false - - task: gulp@0 - displayName: gulp build - inputs: - gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js - targets: build - workingDirectory: src\Umbraco.Web.UI.Client - - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - displayName: dotnet run (Netcore) - # - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj - # displayName: dotnet run (Netcore) - - task: PowerShell@1 - displayName: Generate Cypress.env.json - inputs: - scriptType: inlineScript - inlineScript: > - @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" - - task: Npm@1 - name: PrepareTask - displayName: npm install (AcceptanceTest) - inputs: - workingDir: 'src\Umbraco.Tests.AcceptanceTest' - - task: Npm@1 - displayName: Run Cypress (Desktop) - condition: always() - inputs: - workingDir: src\Umbraco.Tests.AcceptanceTest - command: 'custom' - customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer + displayName: Create database + # - task: DotNetCoreCLI@2 + # displayName: dotnet build (Netcore) + # inputs: + # command: build + # projects: '**/Umbraco.Web.UI.Netcore.csproj' + - task: NodeTool@0 + displayName: Use Node 11.x + inputs: + versionSpec: 11.x + - task: Npm@1 + displayName: npm install (Client) + inputs: + workingDir: src\Umbraco.Web.UI.Client + verbose: false + - task: gulp@0 + displayName: gulp build + inputs: + gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js + targets: build + workingDirectory: src\Umbraco.Web.UI.Client + - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + displayName: dotnet run (Netcore) + # - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj + # displayName: dotnet run (Netcore) + - task: PowerShell@1 + displayName: Generate Cypress.env.json + inputs: + scriptType: inlineScript + inlineScript: > + @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" + - task: Npm@1 + name: PrepareTask + displayName: npm install (AcceptanceTest) + inputs: + workingDir: 'src\Umbraco.Tests.AcceptanceTest' + - task: Npm@1 + displayName: Run Cypress (Desktop) + condition: always() + inputs: + workingDir: src\Umbraco.Tests.AcceptanceTest + command: 'custom' + customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' - - task: PublishTestResults@2 - condition: always() - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml' - mergeTestResults: true - testRunTitle: "Test results Desktop" - # - task: Npm@1 - # displayName: Run Cypress (Tablet portrait) - # condition: always() - # inputs: - # workingDir: src\Umbraco.Tests.AcceptanceTest - # command: 'custom' - # customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' - # - # - task: Npm@1 - # displayName: Run Cypress (Mobile protrait) - # condition: always() - # inputs: - # workingDir: src\Umbraco.Tests.AcceptanceTest - # command: 'custom' - # customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' - - task: PublishPipelineArtifact@1 - displayName: "Publish test artifacts" - condition: failed() - inputs: - targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' - artifact: 'Test artifacts' + - task: PublishTestResults@2 + condition: always() + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml' + mergeTestResults: true + testRunTitle: "Test results Desktop" + # - task: Npm@1 + # displayName: Run Cypress (Tablet portrait) + # condition: always() + # inputs: + # workingDir: src\Umbraco.Tests.AcceptanceTest + # command: 'custom' + # customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' + # + # - task: Npm@1 + # displayName: Run Cypress (Mobile protrait) + # condition: always() + # inputs: + # workingDir: src\Umbraco.Tests.AcceptanceTest + # command: 'custom' + # customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' + - task: PublishPipelineArtifact@1 + displayName: "Publish test artifacts" + condition: failed() + inputs: + targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' + artifact: 'Test artifacts' - stage: Artifacts dependsOn: [] jobs: From c5692323500b8081ecd79149611a6fbdb8fc3786 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:00:50 +0100 Subject: [PATCH 53/77] Add Linux acceptance tests - Trial 3 --- build/azure-pipelines.yml | 162 +++++++++++++++++++------------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index a20d290f95..c9ebc05d0b 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -213,89 +213,89 @@ stages: value: Cypress - name: ConnectionStrings__umbracoDbDSN value: Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD); - services: - mssql: mssql - pool: - vmImage: ubuntu-latest - steps: - - task: UseDotNet@2 - displayName: Use .Net Core sdk 5.x - inputs: - version: 5.x + services: + mssql: mssql + pool: + vmImage: ubuntu-latest + steps: + - task: UseDotNet@2 + displayName: Use .Net Core sdk 5.x + inputs: + version: 5.x - - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer - displayName: Create database - # - task: DotNetCoreCLI@2 - # displayName: dotnet build (Netcore) - # inputs: - # command: build - # projects: '**/Umbraco.Web.UI.Netcore.csproj' - - task: NodeTool@0 - displayName: Use Node 11.x - inputs: - versionSpec: 11.x - - task: Npm@1 - displayName: npm install (Client) - inputs: - workingDir: src\Umbraco.Web.UI.Client - verbose: false - - task: gulp@0 - displayName: gulp build - inputs: - gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js - targets: build - workingDirectory: src\Umbraco.Web.UI.Client - - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" - displayName: dotnet run (Netcore) - # - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj - # displayName: dotnet run (Netcore) - - task: PowerShell@1 - displayName: Generate Cypress.env.json - inputs: - scriptType: inlineScript - inlineScript: > - @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" - - task: Npm@1 - name: PrepareTask - displayName: npm install (AcceptanceTest) - inputs: - workingDir: 'src\Umbraco.Tests.AcceptanceTest' - - task: Npm@1 - displayName: Run Cypress (Desktop) - condition: always() - inputs: - workingDir: src\Umbraco.Tests.AcceptanceTest - command: 'custom' - customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' + - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer + displayName: Create database + # - task: DotNetCoreCLI@2 + # displayName: dotnet build (Netcore) + # inputs: + # command: build + # projects: '**/Umbraco.Web.UI.Netcore.csproj' + - task: NodeTool@0 + displayName: Use Node 11.x + inputs: + versionSpec: 11.x + - task: Npm@1 + displayName: npm install (Client) + inputs: + workingDir: src\Umbraco.Web.UI.Client + verbose: false + - task: gulp@0 + displayName: gulp build + inputs: + gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js + targets: build + workingDirectory: src\Umbraco.Web.UI.Client + - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + displayName: dotnet run (Netcore) + # - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj + # displayName: dotnet run (Netcore) + - task: PowerShell@1 + displayName: Generate Cypress.env.json + inputs: + scriptType: inlineScript + inlineScript: > + @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" + - task: Npm@1 + name: PrepareTask + displayName: npm install (AcceptanceTest) + inputs: + workingDir: 'src\Umbraco.Tests.AcceptanceTest' + - task: Npm@1 + displayName: Run Cypress (Desktop) + condition: always() + inputs: + workingDir: src\Umbraco.Tests.AcceptanceTest + command: 'custom' + customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' - - task: PublishTestResults@2 - condition: always() - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml' - mergeTestResults: true - testRunTitle: "Test results Desktop" - # - task: Npm@1 - # displayName: Run Cypress (Tablet portrait) - # condition: always() - # inputs: - # workingDir: src\Umbraco.Tests.AcceptanceTest - # command: 'custom' - # customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' - # - # - task: Npm@1 - # displayName: Run Cypress (Mobile protrait) - # condition: always() - # inputs: - # workingDir: src\Umbraco.Tests.AcceptanceTest - # command: 'custom' - # customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' - - task: PublishPipelineArtifact@1 - displayName: "Publish test artifacts" - condition: failed() - inputs: - targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' - artifact: 'Test artifacts' + - task: PublishTestResults@2 + condition: always() + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml' + mergeTestResults: true + testRunTitle: "Test results Desktop" + # - task: Npm@1 + # displayName: Run Cypress (Tablet portrait) + # condition: always() + # inputs: + # workingDir: src\Umbraco.Tests.AcceptanceTest + # command: 'custom' + # customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' + # + # - task: Npm@1 + # displayName: Run Cypress (Mobile protrait) + # condition: always() + # inputs: + # workingDir: src\Umbraco.Tests.AcceptanceTest + # command: 'custom' + # customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' + - task: PublishPipelineArtifact@1 + displayName: "Publish test artifacts" + condition: failed() + inputs: + targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' + artifact: 'Test artifacts' - stage: Artifacts dependsOn: [] jobs: From 3d88203d7bee759dacdfb701232173494dc064d9 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:07:44 +0100 Subject: [PATCH 54/77] Add Linux acceptance tests - Trial 4 --- build/azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index c9ebc05d0b..e8b8ac0398 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -223,6 +223,8 @@ stages: inputs: version: 5.x + - powershell: Install-Module -Name SqlServer + displayName: Install PS Module for MSSql - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer displayName: Create database # - task: DotNetCoreCLI@2 From fd4c12a448b3a237faa1e31abe12f196060398e8 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:13:10 +0100 Subject: [PATCH 55/77] Add Linux acceptance tests - Trial 5 --- build/azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index e8b8ac0398..4d21b39968 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,10 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - - powershell: Install-Module -Name SqlServer - displayName: Install PS Module for MSSql - - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer + - powershell: sqlcmd -S $env:UmbracoDatabaseServer -Q "CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) From 74dff277c3dd27750032f378062fd9ec54303ac2 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:17:35 +0100 Subject: [PATCH 56/77] Add Linux acceptance tests - Trial 6 --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 4d21b39968..6c91e8957f 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,7 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S $env:UmbracoDatabaseServer -Q "CREATE DATABASE $env:UmbracoDatabaseName" + - powershell: sqlcmd -S $env:UmbracoDatabaseServer -U sa -P $env:SA_PASSWORD -Q "CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) From d399d2c46c6a4ab888f4085672fc13f6806862d2 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:22:43 +0100 Subject: [PATCH 57/77] Add Linux acceptance tests - Trial 7 --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 6c91e8957f..02ee26c6dc 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,7 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S $env:UmbracoDatabaseServer -U sa -P $env:SA_PASSWORD -Q "CREATE DATABASE $env:UmbracoDatabaseName" + - powershell: sqlcmd -S="$env:UmbracoDatabaseServer" -U="sa" -P="$env:SA_PASSWORD" -Q="CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) From 9ce54fa45b17a51878a38f1478e432225e22d8d3 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:36:58 +0100 Subject: [PATCH 58/77] Add Linux acceptance tests - Trial 8 --- build/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 02ee26c6dc..ec58c75724 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -212,7 +212,7 @@ stages: - name: UmbracoDatabaseName value: Cypress - name: ConnectionStrings__umbracoDbDSN - value: Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD); + value: Server=localhost,1433;Database=$(UmbracoDatabaseName);User Id=sa;Password=$(SA_PASSWORD); services: mssql: mssql pool: @@ -222,7 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S="$env:UmbracoDatabaseServer" -U="sa" -P="$env:SA_PASSWORD" -Q="CREATE DATABASE $env:UmbracoDatabaseName" + - powershell: sqlcmd -S="localhost,1433" -U="sa" -P="UmbracoIntegration123!" -Q="CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) From bb03d244582a2caaf1ad0861741b5e05b96d9845 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:42:10 +0100 Subject: [PATCH 59/77] Add Linux acceptance tests - Trial 9 --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index ec58c75724..f013fed3c4 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,7 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S="localhost,1433" -U="sa" -P="UmbracoIntegration123!" -Q="CREATE DATABASE $env:UmbracoDatabaseName" + - powershell: sqlcmd -S="127.0.0.1,1433" -U="sa" -P="UmbracoIntegration123!" -Q="CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) From 02cb8084742fa18d1179dd80d2a460741335847b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:45:20 +0100 Subject: [PATCH 60/77] Add Linux acceptance tests - Trial 10 --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index f013fed3c4..1950766152 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,7 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S="127.0.0.1,1433" -U="sa" -P="UmbracoIntegration123!" -Q="CREATE DATABASE $env:UmbracoDatabaseName" + - powershell: sqlcmd -S="." -U="sa" -P="UmbracoIntegration123!" -Q="CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) From 5a77a097af8707500869604fdf2a24838278c6be Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:46:29 +0100 Subject: [PATCH 61/77] Add Linux acceptance tests - Trial 11 --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 1950766152..94d0418c6d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,7 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S="." -U="sa" -P="UmbracoIntegration123!" -Q="CREATE DATABASE $env:UmbracoDatabaseName" + - powershell: sqlcmd -S . -U sa -P UmbracoIntegration123! -Q="CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) From 19ae71ea3fd5285bbdba487d879d0acd022e196c Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:50:54 +0100 Subject: [PATCH 62/77] Add Linux acceptance tests - Trial 12 --- build/azure-pipelines.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 94d0418c6d..971edab89b 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,7 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S . -U sa -P UmbracoIntegration123! -Q="CREATE DATABASE $env:UmbracoDatabaseName" + - powershell: sqlcmd -S . -U sa -P $env:SA_PASSWORD -Q="CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) @@ -236,34 +236,34 @@ stages: - task: Npm@1 displayName: npm install (Client) inputs: - workingDir: src\Umbraco.Web.UI.Client + workingDir: src/Umbraco.Web.UI.Client verbose: false - task: gulp@0 displayName: gulp build inputs: - gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js + gulpFile: src/Umbraco.Web.UI.Client/gulpfile.js targets: build - workingDirectory: src\Umbraco.Web.UI.Client - - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj" + workingDirectory: src/Umbraco.Web.UI.Client + - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src/Umbraco.Web.UI.Netcore/Umbraco.Web.UI.Netcore.csproj" displayName: dotnet run (Netcore) - # - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj + # - powershell: dotnet run --no-build -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj # displayName: dotnet run (Netcore) - task: PowerShell@1 displayName: Generate Cypress.env.json inputs: scriptType: inlineScript inlineScript: > - @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" + @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src/Umbraco.Tests.AcceptanceTest/cypress.env.json" - task: Npm@1 name: PrepareTask displayName: npm install (AcceptanceTest) inputs: - workingDir: 'src\Umbraco.Tests.AcceptanceTest' + workingDir: 'src/Umbraco.Tests.AcceptanceTest' - task: Npm@1 displayName: Run Cypress (Desktop) condition: always() inputs: - workingDir: src\Umbraco.Tests.AcceptanceTest + workingDir: src/Umbraco.Tests.AcceptanceTest command: 'custom' customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' @@ -278,7 +278,7 @@ stages: # displayName: Run Cypress (Tablet portrait) # condition: always() # inputs: - # workingDir: src\Umbraco.Tests.AcceptanceTest + # workingDir: src/Umbraco.Tests.AcceptanceTest # command: 'custom' # customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' # @@ -286,7 +286,7 @@ stages: # displayName: Run Cypress (Mobile protrait) # condition: always() # inputs: - # workingDir: src\Umbraco.Tests.AcceptanceTest + # workingDir: src/Umbraco.Tests.AcceptanceTest # command: 'custom' # customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' - task: PublishPipelineArtifact@1 From 17689bd6b35361ff26397c905514ec4247842d04 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 21:53:53 +0100 Subject: [PATCH 63/77] Add Linux acceptance tests - Trial 13 --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 971edab89b..8daa785d21 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,7 +222,7 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S . -U sa -P $env:SA_PASSWORD -Q="CREATE DATABASE $env:UmbracoDatabaseName" + - powershell: sqlcmd -S . -U sa -P $env:SA_PASSWORD -Q "CREATE DATABASE $env:UmbracoDatabaseName" displayName: Create database # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) From 7ef572c55511cb96928bae8a7b513aa6c7c3074c Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 05:50:49 +0100 Subject: [PATCH 64/77] Add Linux acceptance tests - Trial 14 --- build/azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 8daa785d21..8dbc3355db 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -253,7 +253,8 @@ stages: inputs: scriptType: inlineScript inlineScript: > - @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src/Umbraco.Tests.AcceptanceTest/cypress.env.json" + $jsonObject = "{ ""username"": ""$env:Umbraco__CMS__Unattended__UnattendedUserEmail"", ""password"" : ""$env:Umbraco__CMS__Unattended__UnattendedUserPassword"" }" + $jsonObject | ConvertTo-Json | Set-Content -Path "src/Umbraco.Tests.AcceptanceTest/cypress.env.json" - task: Npm@1 name: PrepareTask displayName: npm install (AcceptanceTest) From fae00eb6d29189fecdf906ae1afe7ef1c4c8782e Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 05:58:40 +0100 Subject: [PATCH 65/77] Add Linux acceptance tests - Trial 15 --- build/azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 8dbc3355db..5cc2ca6f1e 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -253,8 +253,7 @@ stages: inputs: scriptType: inlineScript inlineScript: > - $jsonObject = "{ ""username"": ""$env:Umbraco__CMS__Unattended__UnattendedUserEmail"", ""password"" : ""$env:Umbraco__CMS__Unattended__UnattendedUserPassword"" }" - $jsonObject | ConvertTo-Json | Set-Content -Path "src/Umbraco.Tests.AcceptanceTest/cypress.env.json" + "{ ""username"": ""$env:Umbraco__CMS__Unattended__UnattendedUserEmail"", ""password"" : ""$env:Umbraco__CMS__Unattended__UnattendedUserPassword"" }" | Set-Content -Path "src/Umbraco.Tests.AcceptanceTest/cypress.env.json" - task: Npm@1 name: PrepareTask displayName: npm install (AcceptanceTest) From 9f9c1ffbb074170b18ca387fe92735ab8d72f605 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 06:13:40 +0100 Subject: [PATCH 66/77] Add Linux acceptance tests - Trial 16 --- build/azure-pipelines.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 5cc2ca6f1e..73546bc404 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -248,12 +248,11 @@ stages: displayName: dotnet run (Netcore) # - powershell: dotnet run --no-build -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj # displayName: dotnet run (Netcore) - - task: PowerShell@1 - displayName: Generate Cypress.env.json + + - task: Bash@3 inputs: - scriptType: inlineScript - inlineScript: > - "{ ""username"": ""$env:Umbraco__CMS__Unattended__UnattendedUserEmail"", ""password"" : ""$env:Umbraco__CMS__Unattended__UnattendedUserPassword"" }" | Set-Content -Path "src/Umbraco.Tests.AcceptanceTest/cypress.env.json" + targetType: 'inline' + script: 'echo ''{ "username": "$Umbraco__CMS__Unattended__UnattendedUserEmail", "password": "$Umbraco__CMS__Unattended__UnattendedUserPassword" }'' > ''src/Umbraco.Tests.AcceptanceTest/cypress.env.json''' - task: Npm@1 name: PrepareTask displayName: npm install (AcceptanceTest) From b4b5f211f32746686c730a613c04ff1de4be4038 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 06:24:08 +0100 Subject: [PATCH 67/77] Add Linux acceptance tests - Trial 17 --- build/azure-pipelines.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 73546bc404..6f015aba5b 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -244,11 +244,10 @@ stages: gulpFile: src/Umbraco.Web.UI.Client/gulpfile.js targets: build workingDirectory: src/Umbraco.Web.UI.Client - - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src/Umbraco.Web.UI.Netcore/Umbraco.Web.UI.Netcore.csproj" - displayName: dotnet run (Netcore) - # - powershell: dotnet run --no-build -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj - # displayName: dotnet run (Netcore) - + - task: Bash@3 + inputs: + targetType: 'inline' + script: 'dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj &' - task: Bash@3 inputs: targetType: 'inline' From 5fbacaf3c5133edbe3a7a2edfb1b06c56668ed06 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 06:52:28 +0100 Subject: [PATCH 68/77] Add Linux acceptance tests - Trial 18 --- build/azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 6f015aba5b..8c17ca2516 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -245,10 +245,12 @@ stages: targets: build workingDirectory: src/Umbraco.Web.UI.Client - task: Bash@3 + displayName: dotnet run (Netcore) inputs: targetType: 'inline' - script: 'dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj &' + script: 'nohup dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj &' - task: Bash@3 + displayName: Generate Cypress.env.json inputs: targetType: 'inline' script: 'echo ''{ "username": "$Umbraco__CMS__Unattended__UnattendedUserEmail", "password": "$Umbraco__CMS__Unattended__UnattendedUserPassword" }'' > ''src/Umbraco.Tests.AcceptanceTest/cypress.env.json''' From 7210022068dc5cd06d238d895f798c517d317adf Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 07:06:04 +0100 Subject: [PATCH 69/77] Add Linux acceptance tests - Trial 19 --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 8c17ca2516..3d864c630a 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -248,7 +248,7 @@ stages: displayName: dotnet run (Netcore) inputs: targetType: 'inline' - script: 'nohup dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj &' + script: 'dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj' - task: Bash@3 displayName: Generate Cypress.env.json inputs: From 3b4a14a6155aeeaad26b4045a73ca0c95bd373e9 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 07:13:43 +0100 Subject: [PATCH 70/77] Add Linux acceptance tests - Trial 20 --- build/azure-pipelines.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 3d864c630a..26544fac09 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -222,8 +222,11 @@ stages: displayName: Use .Net Core sdk 5.x inputs: version: 5.x - - powershell: sqlcmd -S . -U sa -P $env:SA_PASSWORD -Q "CREATE DATABASE $env:UmbracoDatabaseName" + - task: Bash@3 displayName: Create database + inputs: + targetType: 'inline' + script: 'sqlcmd -S . -U sa -P $SA_PASSWORD -Q "CREATE DATABASE $UmbracoDatabaseName"' # - task: DotNetCoreCLI@2 # displayName: dotnet build (Netcore) # inputs: From 9394a08c212dea225fb9bbf932b2623ec3f30cc6 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 07:16:47 +0100 Subject: [PATCH 71/77] Add Linux acceptance tests - Trial 21 --- build/azure-pipelines.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 26544fac09..4b8d2b3b6d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -226,12 +226,7 @@ stages: displayName: Create database inputs: targetType: 'inline' - script: 'sqlcmd -S . -U sa -P $SA_PASSWORD -Q "CREATE DATABASE $UmbracoDatabaseName"' - # - task: DotNetCoreCLI@2 - # displayName: dotnet build (Netcore) - # inputs: - # command: build - # projects: '**/Umbraco.Web.UI.Netcore.csproj' + script: 'sqlcmd -S . -U sa -P $SA_PASSWORD -Q "CREATE DATABASE Cypress"' - task: NodeTool@0 displayName: Use Node 11.x inputs: From 6246d8e32daaecb3c8c0497186a86cc45d6492c3 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 07:22:31 +0100 Subject: [PATCH 72/77] Add Linux acceptance tests - Trial 22 --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 4b8d2b3b6d..4718a826e0 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -246,7 +246,7 @@ stages: displayName: dotnet run (Netcore) inputs: targetType: 'inline' - script: 'dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj' + script: 'nohup dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj &' - task: Bash@3 displayName: Generate Cypress.env.json inputs: From 68a3b5bc8c9bd642d615a9f33b3e67d96629d346 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 07:47:19 +0100 Subject: [PATCH 73/77] Add Linux acceptance tests - Trial 23 --- build/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 4718a826e0..409e363201 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -203,7 +203,7 @@ stages: condition: failed() inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' - artifact: 'Test artifacts' + artifact: 'Test artifacts - Windows' - job: Linux_Acceptance_tests displayName: Linux variables: @@ -251,7 +251,7 @@ stages: displayName: Generate Cypress.env.json inputs: targetType: 'inline' - script: 'echo ''{ "username": "$Umbraco__CMS__Unattended__UnattendedUserEmail", "password": "$Umbraco__CMS__Unattended__UnattendedUserPassword" }'' > ''src/Umbraco.Tests.AcceptanceTest/cypress.env.json''' + script: 'echo "{ \"username\": \"$Umbraco__CMS__Unattended__UnattendedUserEmail\", \"password\": \"$Umbraco__CMS__Unattended__UnattendedUserPassword\" }" > "src/Umbraco.Tests.AcceptanceTest/cypress.env.json"' - task: Npm@1 name: PrepareTask displayName: npm install (AcceptanceTest) @@ -292,7 +292,7 @@ stages: condition: failed() inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' - artifact: 'Test artifacts' + artifact: 'Test artifacts - Linux' - stage: Artifacts dependsOn: [] jobs: From 4e2072af63e9f57d9605b0274c79df785214c2ce Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 08:00:31 +0100 Subject: [PATCH 74/77] Add Linux acceptance tests - Trial 24 --- build/azure-pipelines.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 409e363201..88af31fccb 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -226,7 +226,10 @@ stages: displayName: Create database inputs: targetType: 'inline' - script: 'sqlcmd -S . -U sa -P $SA_PASSWORD -Q "CREATE DATABASE Cypress"' + script: 'sqlcmd -S . -U sa -P $SA_PASSWORD -Q "CREATE DATABASE $DBNAME"' + env: + DBNAME: $(UmbracoDatabaseName) + SA_PASSWORD: $(SA_PASSWORD) - task: NodeTool@0 displayName: Use Node 11.x inputs: @@ -251,7 +254,10 @@ stages: displayName: Generate Cypress.env.json inputs: targetType: 'inline' - script: 'echo "{ \"username\": \"$Umbraco__CMS__Unattended__UnattendedUserEmail\", \"password\": \"$Umbraco__CMS__Unattended__UnattendedUserPassword\" }" > "src/Umbraco.Tests.AcceptanceTest/cypress.env.json"' + script: 'echo "{ \"username\": \"$USERNAME\", \"password\": \"$PASSWORD\" }" > "src/Umbraco.Tests.AcceptanceTest/cypress.env.json"' + env: + USERNAME: $(Umbraco__CMS__Unattended__UnattendedUserEmail) + PASSWORD: $(Umbraco__CMS__Unattended__UnattendedUserPassword) - task: Npm@1 name: PrepareTask displayName: npm install (AcceptanceTest) From 36ed141065e5fc7a727f7390734ad259e63d2cc6 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 08:02:35 +0100 Subject: [PATCH 75/77] Add Linux acceptance tests - Trial 25 --- build/azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 88af31fccb..bce240e33d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -227,9 +227,9 @@ stages: inputs: targetType: 'inline' script: 'sqlcmd -S . -U sa -P $SA_PASSWORD -Q "CREATE DATABASE $DBNAME"' - env: - DBNAME: $(UmbracoDatabaseName) - SA_PASSWORD: $(SA_PASSWORD) + env: + DBNAME: $(UmbracoDatabaseName) + SA_PASSWORD: $(SA_PASSWORD) - task: NodeTool@0 displayName: Use Node 11.x inputs: @@ -255,9 +255,9 @@ stages: inputs: targetType: 'inline' script: 'echo "{ \"username\": \"$USERNAME\", \"password\": \"$PASSWORD\" }" > "src/Umbraco.Tests.AcceptanceTest/cypress.env.json"' - env: - USERNAME: $(Umbraco__CMS__Unattended__UnattendedUserEmail) - PASSWORD: $(Umbraco__CMS__Unattended__UnattendedUserPassword) + env: + USERNAME: $(Umbraco__CMS__Unattended__UnattendedUserEmail) + PASSWORD: $(Umbraco__CMS__Unattended__UnattendedUserPassword) - task: Npm@1 name: PrepareTask displayName: npm install (AcceptanceTest) From bffe1576d1810f1a5a896af3a1c674c4e7c41532 Mon Sep 17 00:00:00 2001 From: Mole Date: Wed, 24 Mar 2021 10:06:15 +0100 Subject: [PATCH 76/77] Try a fix for language tests --- .../cypress/integration/Settings/languages.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts index 541c6d213d..43f32a0821 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts @@ -6,7 +6,10 @@ context('Languages', () => { }); it('Add language', () => { - const name = "Afrikaans"; // Must be an option in the select box + // For some reason the languages to chose fom seems to be translated differently than normal, as an example: + // My system is set to EN (US), but most languages are translated into Danish for some reason + // Aghem seems untranslated though? + const name = "Aghem"; // Must be an option in the select box cy.umbracoEnsureLanguageNameNotExists(name); From 55354b969bb3feab3e46d98c5d82afeb43ba0e43 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 24 Mar 2021 11:43:33 +0100 Subject: [PATCH 77/77] Added continueOnError: true so the acceptance tests are not blocking a merge --- build/azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index bce240e33d..6dde647e06 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -171,6 +171,7 @@ stages: - task: Npm@1 displayName: Run Cypress (Desktop) condition: always() + continueOnError: true inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' @@ -266,6 +267,7 @@ stages: - task: Npm@1 displayName: Run Cypress (Desktop) condition: always() + continueOnError: true inputs: workingDir: src/Umbraco.Tests.AcceptanceTest command: 'custom'