From 4ddd1a91edadbeb2c4b0829eaf1555af4bbb1a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 17 Jun 2020 15:41:08 +0200 Subject: [PATCH 1/6] make reload work --- src/Umbraco.Web.UI.Docs/gulpfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Docs/gulpfile.js b/src/Umbraco.Web.UI.Docs/gulpfile.js index 5dd4c57032..a7269ec8b7 100644 --- a/src/Umbraco.Web.UI.Docs/gulpfile.js +++ b/src/Umbraco.Web.UI.Docs/gulpfile.js @@ -32,7 +32,8 @@ gulp.task('docs', [], function (cb) { } }) .pipe(gulpDocs.process(options)) - .pipe(gulp.dest('./api')); + .pipe(gulp.dest('./api')) + .pipe(connect.reload()); }); From f0f92db3dcb00b83b5a20e17a4632318cda7e5b3 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 17 Jun 2020 18:02:23 +0200 Subject: [PATCH 2/6] First compile all the gulp things before trying to make the docs --- build/V8-Docs-Pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build/V8-Docs-Pipeline.yml b/build/V8-Docs-Pipeline.yml index 1df4092397..56e8fde60c 100644 --- a/build/V8-Docs-Pipeline.yml +++ b/build/V8-Docs-Pipeline.yml @@ -37,6 +37,7 @@ jobs: script: | $uenv=./build.ps1 -get -doc $uenv.SandboxNode() + $uenv.CompileBelle() $uenv.PrepareAngularDocs() $nugetsourceUmbraco = "https://api.nuget.org/v3/index.json" $uenv.PrepareCSharpDocs() From d49265f3bae2b3dcb4c19c7b95633440cbc33570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 18 Jun 2020 09:23:57 +0200 Subject: [PATCH 3/6] removed preinstall fix. --- src/Umbraco.Web.UI.Docs/package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Docs/package.json b/src/Umbraco.Web.UI.Docs/package.json index 6e58f958cf..f216b4b129 100644 --- a/src/Umbraco.Web.UI.Docs/package.json +++ b/src/Umbraco.Web.UI.Docs/package.json @@ -1,7 +1,6 @@ { "private": true, "scripts": { - "preinstall": "npx npm-force-resolutions", "docs": "gulp docs", "start": "gulp docs", "default": "gulp docs", @@ -9,9 +8,6 @@ "serve": "gulp watch", "watch": "gulp watch" }, - "resolutions": { - "graceful-fs": "4.2.3" - }, "devDependencies": { "gulp": "^3.9.1", "gulp-connect": "5.6.1", From 95cb7e72d1a8423b4e36b7e40127e0c473c33d8a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 18 Jun 2020 11:21:03 +0200 Subject: [PATCH 4/6] Clarify some property meanings on `IContent` --- src/Umbraco.Core/Models/IContent.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Models/IContent.cs b/src/Umbraco.Core/Models/IContent.cs index 6990a7f7da..7a4fc83253 100644 --- a/src/Umbraco.Core/Models/IContent.cs +++ b/src/Umbraco.Core/Models/IContent.cs @@ -25,6 +25,7 @@ namespace Umbraco.Core.Models /// /// Gets a value indicating whether the content is published. /// + /// The property tells you which version of the content is currently published. bool Published { get; set; } PublishedState PublishedState { get; set; } @@ -32,10 +33,11 @@ namespace Umbraco.Core.Models /// /// Gets a value indicating whether the content has been edited. /// + /// Will return `true` once unpublished edits have been made after the version with has been published. bool Edited { get; set; } /// - /// Gets the published version identifier. + /// Gets the version identifier for the currently published version of the content. /// int PublishedVersionId { get; set; } @@ -129,6 +131,6 @@ namespace Umbraco.Core.Models /// /// IContent DeepCloneWithResetIdentities(); - + } } From 3b2d87950cf2a381c23e3089722c210c51c0464a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 18 Jun 2020 11:28:31 +0200 Subject: [PATCH 5/6] Fix replacement of baseurl in UI docs --- build/build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.ps1 b/build/build.ps1 index 185d1b8ff6..c2c5bdd232 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -475,7 +475,7 @@ # change baseUrl $BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/" $IndexPath = "./api/index.html" - (Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath + (Get-Content $IndexPath).replace('origin + location.href.substr(origin.length).replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath # zip it & $this.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Docs\api\*.*" From 378118236345b7d3008935d43319d1be755320fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 19 Jun 2020 09:41:19 +0200 Subject: [PATCH 6/6] fix of npm run unit, plus begin able to test code that uses promises. --- src/Umbraco.Web.UI.Client/gulpfile.js | 4 ++-- src/Umbraco.Web.UI.Client/package.json | 6 ++++-- src/Umbraco.Web.UI.Client/test/config/karma.conf.js | 13 ++++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/gulpfile.js b/src/Umbraco.Web.UI.Client/gulpfile.js index 542d45c479..d272c77397 100644 --- a/src/Umbraco.Web.UI.Client/gulpfile.js +++ b/src/Umbraco.Web.UI.Client/gulpfile.js @@ -31,6 +31,6 @@ exports.build = series(parallel(dependencies, js, less, views), testUnit); exports.dev = series(setDevelopmentMode, parallel(dependencies, js, less, views), watchTask); exports.watch = series(watchTask); // -exports.runTests = series(setTestMode, parallel(js, testUnit)); -exports.runUnit = series(setTestMode, parallel(js, runUnitTestServer), watchTask); +exports.runTests = series(setTestMode, series(js, testUnit)); +exports.runUnit = series(setTestMode, series(js, runUnitTestServer), watchTask); exports.testE2e = series(setTestMode, parallel(testE2e)); diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index c298f063a7..1b0af95e13 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -2,7 +2,7 @@ "private": true, "scripts": { "test": "gulp runTests", - "unit": "gulp testUnit", + "unit": "gulp runUnit", "e2e": "gulp testE2e", "build": "gulp build", "dev": "gulp dev", @@ -39,7 +39,7 @@ "moment": "2.22.2", "ng-file-upload": "12.2.13", "nouislider": "14.1.1", - "npm": "6.13.6", + "npm": "^6.14.0", "signalr": "2.4.0", "spectrum-colorpicker": "1.8.0", "tinymce": "4.9.10", @@ -71,7 +71,9 @@ "gulp-wrap": "0.15.0", "gulp-wrap-js": "0.4.1", "jasmine-core": "3.5.0", + "jasmine-promise-matchers": "^2.6.0", "karma": "4.4.1", + "karma-chrome-launcher": "^3.1.0", "karma-jasmine": "2.0.1", "karma-junit-reporter": "2.0.1", "karma-phantomjs-launcher": "1.0.4", diff --git a/src/Umbraco.Web.UI.Client/test/config/karma.conf.js b/src/Umbraco.Web.UI.Client/test/config/karma.conf.js index 4e3a78144b..5883f59be8 100644 --- a/src/Umbraco.Web.UI.Client/test/config/karma.conf.js +++ b/src/Umbraco.Web.UI.Client/test/config/karma.conf.js @@ -10,6 +10,9 @@ module.exports = function (config) { // list of files / patterns to load in the browser files: [ + // Jasmine plugins + 'node_modules/jasmine-promise-matchers/dist/jasmine-promise-matchers.js', + //libraries 'node_modules/jquery/dist/jquery.min.js', 'node_modules/angular/angular.js', @@ -98,7 +101,14 @@ module.exports = function (config) { // - PhantomJS // - IE (only Windows) // CLI --browsers Chrome,Firefox,Safari - browsers: ['PhantomJS'], + browsers: ['ChromeHeadless'], + + customLaunchers: { + ChromeDebugging: { + base: 'Chrome', + flags: ['--remote-debugging-port=9333'] + } + }, // allow waiting a bit longer, some machines require this @@ -115,6 +125,7 @@ module.exports = function (config) { plugins: [ require('karma-jasmine'), require('karma-phantomjs-launcher'), + require('karma-chrome-launcher'), require('karma-junit-reporter'), require('karma-spec-reporter')