From caab82aba6b93599f2789b5b0408b4be7d16bd66 Mon Sep 17 00:00:00 2001 From: Florian Rappl Date: Fri, 19 Jan 2024 01:27:49 +0100 Subject: [PATCH] Added test for new API --- .../Extensions/AnalysisWindow.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/AngleSharp.Css.Tests/Extensions/AnalysisWindow.cs b/src/AngleSharp.Css.Tests/Extensions/AnalysisWindow.cs index 924f54f..d755ac7 100644 --- a/src/AngleSharp.Css.Tests/Extensions/AnalysisWindow.cs +++ b/src/AngleSharp.Css.Tests/Extensions/AnalysisWindow.cs @@ -279,6 +279,18 @@ public void GetCascadedValueOfTextTransformFromElementStyle() Assert.AreEqual("uppercase", styleNormal.GetTextTransform()); } + [Test] + public void GetCascadedValueOfTextTransformFromElementStyleWithElementApi() + { + var sourceCode = "

Bold text"; + + var document = ParseDocument(sourceCode); + var element = document.QuerySelector("span"); + var styleNormal = element.ComputeStyle(); + Assert.IsNotNull(styleNormal); + Assert.AreEqual("uppercase", styleNormal.GetTextTransform()); + } + [Test] public async Task NullSelectorStillWorks_Issue52() {