Merge branch 'release/11.4' into v11/dev

# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts
This commit is contained in:
Nikolaj
2023-05-04 09:23:05 +02:00
3 changed files with 4 additions and 44 deletions

View File

@@ -131,7 +131,7 @@ internal class TagRepository : EntityRepositoryBase<int, ITag>, ITagRepository
var sql1 = $@"INSERT INTO cmsTags (tag, {group}, languageId)
SELECT tagSet.tag, tagSet.{group}, tagSet.languageId
FROM {tagSetSql}
LEFT OUTER JOIN cmsTags ON (tagSet.tag LIKE cmsTags.tag AND tagSet.{group} = cmsTags.{group} AND COALESCE(tagSet.languageId, -1) = COALESCE(cmsTags.languageId, -1))
LEFT OUTER JOIN cmsTags ON (tagSet.tag = cmsTags.tag AND tagSet.{group} = cmsTags.{group} AND COALESCE(tagSet.languageId, -1) = COALESCE(cmsTags.languageId, -1))
WHERE cmsTags.id IS NULL";
Database.Execute(sql1);
@@ -321,7 +321,7 @@ WHERE r.tagId IS NULL";
Sql<ISqlContext> sql = GetTaggedEntitiesSql(objectType, culture);
sql = sql
.WhereLike<TagDto>(dto => dto.Text, tag);
.Where<TagDto>(dto => dto.Text == tag);
if (group.IsNullOrWhiteSpace() == false)
{

View File

@@ -46,12 +46,12 @@ test.describe('Tabs', () => {
await openDocTypeFolder(umbracoUi, page);
}
test.only('Click dashboard tabs', async ({umbracoUi, page}) => {
test('Click dashboard tabs', async ({umbracoUi, page}) => {
await umbracoUi.goToSection('content');
await page.locator('[data-element="tab-contentRedirectManager"] > button').click();
expect(page.locator('.redirecturlsearch')).not.toBeNull();
await page.locator('[data-element="tab-contentIntro"] > button').click();
await expect(page.locator('[data-element="tab-contentIntro"]')).toHaveClass('umb-tab ng-scope umb-tab--active');
await expect(page.locator('[data-element="tab-contentIntro"]')).toHaveClass(/umb\-tab\-\-active/);
});
test('Create tab', async ({umbracoUi, umbracoApi, page}) => {

View File

@@ -13,7 +13,6 @@ using Umbraco.Cms.Infrastructure.Scoping;
using Umbraco.Cms.Tests.Common.Builders;
using Umbraco.Cms.Tests.Common.Testing;
using Umbraco.Cms.Tests.Integration.Testing;
using static Umbraco.Cms.Core.Constants.Conventions;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories;
@@ -99,45 +98,6 @@ public class TagRepositoryTest : UmbracoIntegrationTest
}
}
[Test]
public void Can_Create_Tag_Relations_With_Mixed_Casing()
{
var provider = ScopeProvider;
using (ScopeProvider.CreateScope())
{
var template = TemplateBuilder.CreateTextPageTemplate();
FileService.SaveTemplate(template);
var contentType =
ContentTypeBuilder.CreateSimpleContentType("test", "Test", defaultTemplateId: template.Id);
ContentTypeRepository.Save(contentType);
var content1 = ContentBuilder.CreateSimpleContent(contentType);
var content2 = ContentBuilder.CreateSimpleContent(contentType);
DocumentRepository.Save(content1);
DocumentRepository.Save(content2);
var repository = CreateRepository(provider);
Tag[] tags1 = { new Tag { Text = "tag1", Group = "test" } };
repository.Assign(
content1.Id,
contentType.PropertyTypes.First().Id,
tags1,
false);
// Note the casing is different from tags1, but both should be considered equivalent
Tag[] tags2 = { new Tag { Text = "TAG1", Group = "test" } };
repository.Assign(
content2.Id,
contentType.PropertyTypes.First().Id,
tags2,
false);
// The template should have only one tag, despite case differences
Assert.AreEqual(1, repository.GetTaggedEntitiesByTag(TaggableObjectTypes.Content, "tag1").Count());
}
}
[Test]
public void Can_Append_Tag_Relations()
{