Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogrowing textview improvements #338

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Using text change notification instead of observing content size chan…

869a13e
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

Autogrowing textview improvements #338

Using text change notification instead of observing content size chan…
869a13e
Select commit
Loading
Failed to load commit list.
GitHub Actions / Xcode test results succeeded Aug 22, 2024 in 0s

Xcode test results

Testing workspace Proton with scheme Proton

Summary

TotalSuccess PassedFailure FailedSkipped SkippedExpected Failure Expected Failure⏱️ Time
45945900027.16s

Test Summary

ProtonTests

  • Device: iPhone 15 Pro, 17.2 (21C62)
  • SDK: Simulator - iOS 17.2, 17.2
TestTotalSuccessFailureSkippedExpected Failure
test-class AttachmentUpdateSnapshotTests66000
test-class AttributesCommandTests22000
test-class AutogrowingTextViewSnapshotTests22000
test-class AutogrowingTextViewTests11000
test-class EditorCommandExecutorTests66000
test-class EditorCommandSnapshotTests11000
test-class EditorContentTransformerTests11000
test-class EditorContextDelegateTests44000
test-class EditorKeyTests33000
test-class EditorListsSnapshotTests3232000
test-class EditorSnapshotTests5353000
test-class EditorViewContextSnapshotTests11000
test-class EditorViewContextTests55000
test-class EditorViewDelegateTests88000
test-class EditorViewMenuTests88000
test-class EditorViewTests5555000
test-class ProtonTests.xctest00000
test-class FontTraitToggleCommandTests44000
test-class GridCellTests11000
test-class GridTests2020000
test-class GridViewAttachmentSnapshotTests4747000
test-class GridViewSnapshotTests33000
test-class GridViewTests1111000
test-class ListCommandTests22000
test-class ListParserTests1414000
test-class ListsSnapshotTests44000
test-class NSAttributedStringExtensionTests2727000
test-class RichTextViewContextTests1414000
test-class RichTextViewSnapshotTests33000
test-class RichTextViewTests1212000
test-class TableTests11000
test-class TableViewAttachmentSnapshotTests3939000
test-class TableViewTests22000
test-class TextBlockAttributeTests2323000
test-class TextProcessorTests1919000
test-class TextStorageTests1515000
test-class ViewAttachmentSnapshotTests1010000

Failure Failures

All tests passed 🎉


Code Coverage

Coverage Covered Executable
Proton.framework 77.35 % 6967 9007
  Grid.swift 90.62 % 338 373
  NSParagraphStyleExtensions.swift 90.00 % 9 10
  TextProcessor.swift 100.00 % 91 91
  EditorView.swift 67.17 % 710 1057
  AutogrowingTextView.swift 85.12 % 103 121
  NSAttributedString+Range.swift 95.16 % 118 124
  GridCell.swift 82.99 % 200 241
  GestureRegognizerDelegateOverride.swift 7.14 % 3 42
  UnderlineCommand.swift 100.00 % 4 4
  TextProcessing.swift 33.33 % 2 6
  AsyncTaskScheduler.swift 61.18 % 52 85
  AttachmentContent.swift 65.52 % 19 29
  UIColor+Image.swift 100.00 % 10 10
  EditorContentView.swift 44.44 % 8 18
  NSRangeExtensions.swift 80.43 % 37 46
  AttributesDecoding.swift 0.00 % 0 8
  AttributesToggleCommand.swift 98.21 % 55 56
  Attachment.swift 85.51 % 419 490
  Table.swift 66.29 % 295 445
  FontTraitToggleCommand.swift 96.77 % 30 31
  TableCellStore.swift 77.94 % 53 68
  TableCellContentView.swift 71.32 % 97 136
  LineNumberFormatting.swift 100.00 % 11 11
  TableContentView.swift 65.06 % 352 541
  EditorContent.swift 63.64 % 7 11
  EditorContentDecoding.swift 0.00 % 0 7
  RichTextEditorContext.swift 73.18 % 161 220
  GridView.swift 63.41 % 253 399
  LayoutManager.swift 92.19 % 803 871
  RichTextViewContext.swift 95.38 % 62 65
  Utility.swift 95.00 % 19 20
  RichTextRendererContext.swift 0.00 % 0 1
  TableCell.swift 80.67 % 96 119
  NullRichTextEditorContext.swift 0.00 % 0 6
  FontExtensions.swift 73.77 % 45 61
  EditorContentEncoding.swift 75.00 % 9 12
  RichTextViewDelegate.swift 85.29 % 29 34
  EditorCommandExecutor.swift 100.00 % 12 12
  ListFormattingProvider.swift 100.00 % 1 1
  RichTextView.swift 85.59 % 689 805
  UITextRangeExtensions.swift 100.00 % 5 5
  CommandName.swift 100.00 % 6 6
  AggregateEditorViewDelegate.swift 82.19 % 60 73
  String+NSRange.swift 66.67 % 20 30
  GridConfiguration.swift 100.00 % 75 75
  TableView.swift 55.65 % 330 593
  NSAttributedString+Content.swift 99.18 % 242 244
  GridCellStore.swift 85.51 % 59 69
  TableCellRepository.swift 100.00 % 13 13
  ListParser.swift 94.44 % 170 180
  ListOutdentCommand.swift 62.50 % 5 8
  StrikethroughCommand.swift 100.00 % 4 4
  BoldCommand.swift 100.00 % 3 3
  BackgroundStyle.swift 100.00 % 27 27
  EditorViewDelegate.swift 30.00 % 6 20
  EditorCommand.swift 0.00 % 0 5
  ListIndentCommand.swift 62.50 % 5 8
  ListCommand.swift 92.96 % 66 71
  GridContentView.swift 78.97 % 308 390
  SynchronizedArray.swift 35.71 % 25 70
  EditorViewContext.swift 78.57 % 11 14
  ListTextProcessor.swift 83.50 % 258 309
  SelectionView.swift 48.94 % 23 47
  ItalicsCommand.swift 100.00 % 3 3
  AttributesEncoding.swift 78.57 % 11 14
  GradientView.swift 76.47 % 13 17
  SequenceGenerator.swift 77.27 % 17 22
Total 77.35 % 6967 9007

Details

Test Details

ProtonTestsback

AttachmentUpdateSnapshotTests back

SuccessFailureSkippedExpected Failure⏱️
6 (100%)0 (0%)0 (0%)0 (0%)0.24s
Successtest-method testRendersImageBasedBlockAttachment()
Successtest-method testRendersImageBasedInlineAttachment()
Successtest-method testRendersUpdatedImageInAttachment()
Successtest-method testRendersUpdatedViewInAttachment()
Successtest-method testRendersUpdatedViewInImageAttachment()
Successtest-method testRenderUpdatedImageInViewAttachment()

AttributesCommandTests back

SuccessFailureSkippedExpected Failure⏱️
2 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testSetsToggledTypingAttributesInEmptySelectionInNonEmptyEditor()
Successtest-method testSetsTypingAttributesInEmptyEditor()

AutogrowingTextViewSnapshotTests back

SuccessFailureSkippedExpected Failure⏱️
2 (100%)0 (0%)0 (0%)0 (0%)0.13s
Successtest-method testRendersMultilineTextViewBasedOnContent()
Successtest-method testRendersTextViewBasedOnContent()

AutogrowingTextViewTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.06s
Successtest-method testNotifiesDelegateOfBoundsChange()

EditorCommandExecutorTests back

SuccessFailureSkippedExpected Failure⏱️
6 (100%)0 (0%)0 (0%)0 (0%)1.01s
Successtest-method testCommandExecutorDelegate()
Successtest-method testDoesNotExecuteCommandsIfRequiresCommandRegistrationAndNoCommandsRegistered()
Successtest-method testExecuteAllCommandsByDefault()
Successtest-method testExecuteCommandsBasedOnContext()
Successtest-method testExecutesCommandOnEditor()
Successtest-method testExecutesOnlyRegisteredCommandsOnEditor()

EditorCommandSnapshotTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)1.32s
Successtest-method testExecutesCommandOnNestedEditors()

EditorContentTransformerTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testTransformsText()

EditorContextDelegateTests back

SuccessFailureSkippedExpected Failure⏱️
4 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testDidChangeSelectionInAllEditors()
Successtest-method testDidLoseFocusInAllEditors()
Successtest-method testDidReceiveFocusInAllEditors()
Successtest-method testDidReceiveKeyInAllEditors()

EditorKeyTests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method test_ReturnsEnter()
Successtest-method test_ReturnsTab()
Successtest-method testReturnsNil()

EditorListsSnapshotTests back

SuccessFailureSkippedExpected Failure⏱️
32 (100%)0 (0%)0 (0%)0 (0%)0.34s
Successtest-method testAddsMultipleLevelOfLists()
Successtest-method testAppliesAndRemovesListStyleToEntireLineOnPartialSelection()
Successtest-method testContinuesNumberingWhenTwoListsAreCombined()
Successtest-method testCreatesListBetweenTwoParagraphs()
Successtest-method testCreatesListFromSelectedText()
Successtest-method testCreatesListWithoutSelectionUsingCommandAtEnd()
Successtest-method testCreatesListWithoutSelectionUsingCommandInBeginning()
Successtest-method testCreatesListWithoutSelectionUsingCommandInTheMiddle()
Successtest-method testCreatesNewListItemOnReturnKey()
Successtest-method testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList()
Successtest-method testExitsNewListItemOnSecondReturnKey()
Successtest-method testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText()
Successtest-method testFullWidthAttachmentInLists()
Successtest-method testIndentsAndOutdentsListWithMultipleSelectedLines()
Successtest-method testIndentsAndOutdentsListWithoutSelectedRangeInBeginning()
Successtest-method testIndentsAndOutdentsListWithoutSelectedRangeInEnd()
Successtest-method testIndentsAndOutdentsListWithoutSelectedRangeInMiddle()
Successtest-method testIndentsNestedItems()
Successtest-method testInitiatesCreationOfList()
Successtest-method testOutdentsNestedItems()
Successtest-method testOutdentsToZerothLevel()
Successtest-method testQueriesDelegateForListLineMarker()
Successtest-method testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists()
Successtest-method testRemoveListAttributeFromRange()
Successtest-method testRendersListInArrowFormat()
Successtest-method testRendersListInAttributedString()
Successtest-method testRendersListWithDifferentAttributeValues()
Successtest-method testResetsParagraphStyleOnExitingList()
Successtest-method testSkipListMarkerForSkipAttribute()
Successtest-method testSkipNumberingForMultilineText()
Successtest-method testSkipsListMarkerOnShiftReturnKeyAtEndOfTheList()
Successtest-method testSkipsListMarkerOnShiftReturnKeyInMiddleOfList()

EditorSnapshotTests back

SuccessFailureSkippedExpected Failure⏱️
53 (100%)0 (0%)0 (0%)0 (0%)0.50s
Successtest-method testBackgroundStyleThreeLines()
Successtest-method testBackgroundStyleTwoLinesMinorOverlap()
Successtest-method testBackgroundStyleTwoLinesNoOverlap()
Successtest-method testBackgroundStyleTwoLinesOverlap()
Successtest-method testBackgroundStyleWithBorders()
Successtest-method testBackgroundStyleWithCapsuleStyle()
Successtest-method testBackgroundStyleWithContinuity()
Successtest-method testBackgroundStyleWithHeightMatchingText()
Successtest-method testBackgroundStyleWithIncreasedFontSize()
Successtest-method testBackgroundStyleWithIncreasedParagraphSpacing()
Successtest-method testBackgroundStyleWithInsets()
Successtest-method testBackgroundStyleWithOverlappingLine()
Successtest-method testBackgroundStyleWithOverlappingLineExactTextHeight()
Successtest-method testBackgroundStyleWithOverlappingLineNoBorder()
Successtest-method testBackgroundStyleWithParagraphAndLineSpacing()
Successtest-method testBackgroundStyleWithTextContainerInsets()
Successtest-method testBackgroundStyleWithVariedFontSizes()
Successtest-method testBackgroundStyleWithWidthModeAsText()
Successtest-method testCursorCaretRect()
Successtest-method testCustomLineNumbersWithWrappedText()
Successtest-method testDefaultBackground()
Successtest-method testDeletesAttachments()
Successtest-method testEditorWithArabicText()
Successtest-method testGetsCaretRectForPositionInEmptyEditor()
Successtest-method testGetsCaretRectForPositionOutsideBounds()
Successtest-method testGetsCaretRectForValidPosition()
Successtest-method testGetsCaretRectForValidPositionWithScrollableContent()
Successtest-method testGetsCurrentLineRange()
Successtest-method testGetsRectsForGivenRangeSpanningAcrossMultipleLines()
Successtest-method testGetsRectsForGivenRangeSpanningAcrossSingleLine()
Successtest-method testGetsVisibleContentRange()
Successtest-method testInvisibleCharacters()
Successtest-method testLineNumbersBlank()
Successtest-method testLineNumbersDefault()
Successtest-method testLineNumbersEnableDisable()
Successtest-method testLineNumbersWithFormatting()
Successtest-method testLineNumbersWithLineSpacing()
Successtest-method testLineNumbersWithParagraphSpacing()
Successtest-method testLineNumbersWithWrappedText()
Successtest-method testLineRanges()
Successtest-method testParagraphStyling()
Successtest-method testRendersAttachmentWithTextContainerInset()
Successtest-method testRendersFixedWidthAttachment()
Successtest-method testRendersFullWidthAttachment()
Successtest-method testRendersFullWidthAttachmentWithParaIndent()
Successtest-method testRendersMatchContentAttachment()
Successtest-method testRendersPercentWidthAttachment()
Successtest-method testSelectionRects()
Successtest-method testSelectOnTap()
Successtest-method testSelectOnTapInNonEditableEditor()
Successtest-method testSuccessiveSimilarBackgroundStyles()
Successtest-method testUpdatesPlaceholderWithInsets()
Successtest-method testWrappedBackgroundInNestedEditor()

EditorViewContextSnapshotTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.15s
Successtest-method testSelectsBeforeDeletingImageBasedAttachment()

EditorViewContextTests back

SuccessFailureSkippedExpected Failure⏱️
5 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testAppliesSameContextAsParentToNestedEditor()
Successtest-method testCarriesOverCustomTypingAttributes()
Successtest-method testGetsActiveEditorViewAcrossMultipleContexts()
Successtest-method testGetsActiveEditorViewFromContext()
Successtest-method testLockedAttributes()

EditorViewDelegateTests back

SuccessFailureSkippedExpected Failure⏱️
8 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testDidChangeSelection()
Successtest-method testDidLoseFocus()
Successtest-method testDidReceiveFocus()
Successtest-method testDidReceiveKey()
Successtest-method testNotifiesBackspace()
Successtest-method testNotifiesEnter()
Successtest-method testNotifiesTab()
Successtest-method testShouldHandleKey()

EditorViewMenuTests back

SuccessFailureSkippedExpected Failure⏱️
8 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testDefaultSelectAll()
Successtest-method testOverridesCopy()
Successtest-method testOverridesCut()
Successtest-method testOverridesPaste()
Successtest-method testOverridesSelect()
Successtest-method testOverridesToggleBold()
Successtest-method testOverridesToggleItalics()
Successtest-method testOverridesToggleUnderline()

EditorViewTests back

SuccessFailureSkippedExpected Failure⏱️
55 (100%)0 (0%)0 (0%)0 (0%)0.03s
Success<