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

docs: Remove outdated test cases #147

Merged
merged 7 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions test-cases/gutenberg/darkmode.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,6 @@ Expected look:

--------------------------------------------------------------------------------

##### TC006

### Group Block - Check if in DarkMode all components gets proper colors

- Add a `Group` block
- Check if `Group` block in Dark Mode looks like below

Expected look:
![GroupDarkMode](../resources/group-dark-mode.png)
![GroupDarkModeEmpty](../resources/group-dark-mode-empty.png)

--------------------------------------------------------------------------------

##### TC008

### Quote Block - Check if in DarkMode all components gets proper colors
Expand Down
12 changes: 0 additions & 12 deletions test-cases/gutenberg/writing-flow/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@
- [ ] Code block (DEV only)
- [ ] Pullquote block
#### Rich Text Format
- [ ] [TC001](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc001) - Bold, Italic, strikethrough buttons
- [ ] [TC001](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc001) - Highlight selected text
- [ ] [TC001](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc001) - Highlight text without selection
- [ ] [TC002](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc002) - Alignment buttons
- [ ] [TC003](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc003) - Alignment Split
- [ ] [TC004](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc004) - Link button works without selection
- [ ] [TC005](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc005) - Link button works with a selected word
- [ ] [TC006](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc006) - Adding a link from a copied URL
- [ ] [TC007](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc007) - Test format detection under the cursor
- [ ] [TC008](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc008) - Test formatting doesn't remove leading or trailing whitespace
- [ ] [TC009](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc009) - Test autocorrection doesn't apply formatting to Heading
- [ ] [TC010](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/rich-text-formatting.md#tc010) - Test autocorrection doesn't remove formatting from Heading
##### Splitting and merging
Expand All @@ -37,8 +28,5 @@
- [ ] [TC005](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/splitting-merging.md#tc005) - Merge multiple blocks
- [ ] Paragraph
- [ ] Heading
- [ ] [TC006](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/splitting-merging.md#tc006) - Splitting/merge list block
#### Undo / Redo - Test Cases
- [ ] [TC001](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/undo-redo.md#tc001) - Undo/redo block actions
- [ ] [TC002](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/undo-redo.md#tc002) - Undo/redo text
- [ ] [TC003](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/writing-flow/undo-redo.md#tc003) - Undo/redo text format
86 changes: 0 additions & 86 deletions test-cases/gutenberg/writing-flow/rich-text-formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,82 +5,6 @@

Have a rich-text based component with content (Paragraph, Heading, Quote, Media Caption, etc...)

##### TC001

**Known Issues**

- [Text color selection is not preserved when cursor is placed in the middle of text](https://github.com/WordPress/gutenberg/issues/42714)

**Bold, Italic, strikethrough buttons**

- Press the Bold button and write a bold word.
- Press the Italic button and write an italic word.
- Press strikethrough button and write strikethrough text.

**Highlight selected text**

- Write some text and select it.
- Tap on the Highlight text button (A).
- Select a color.
- Expect to see the text with the selected color.

**Highlight text without selection**

- Without selecting any text tap on the highlight text button (A).
- Select a color and write some text.
- Expect to see the newly introduced text with the previously selected color.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the referenced automated tests and the test cases of the Paragraph block but couldn't find cases related to highlighting text. Hence, probably we should keep these two as manual until we automate them.

Copy link
Member Author

@dcalhoun dcalhoun Jul 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I added an integration test for highlighting with selection in WordPress/gutenberg#52446.

For highlighting without a selection, the typeInRichText helper does not support inner HTML tags, only outer HTML tags. Updating it to support inner HTML tags would get complicated really quickly, e.g. how might we handle typing with a text selection that begins within a tag but ends outside of it? Therefore, an e2e test likely makes more sense. I'll reinstate this case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For highlighting without a selection, the typeInRichText helper does not support inner HTML tags, only outer HTML tags. Updating it to support inner HTML tags would get complicated really quickly, e.g. how might we handle typing with a text selection that begins within a tag but ends outside of it? Therefore, an e2e test likely makes more sense. I'll reinstate this case.

Good point, although I'm wondering if we need support for inner HTML tags for this case. If we just create a Paragraph block, tap the Highlight text button, and type text, I understand we wouldn't need to place the cursor between inner HTML tags in the assertion. Would this be an option? (I haven't tested this myself, so I might be overlooking an issue about inner HTML tags per your comment).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we just create a Paragraph block, tap the Highlight text button, and type text, I understand we wouldn't need to place the cursor between inner HTML tags in the assertion. Would this be an option? (I haven't tested this myself, so I might be overlooking an issue about inner HTML tags per your comment).

A mark tag is inserted once the Highlight text button is tapped. The next call of typeInRichText places the cursor at the end of the input (the expected default). However, the reality is that "the end" is after the closing mark tag. To counter this we either need to (A) add support for inner HTML tags or (B) manually adjust for the closing mark tag — e.g. targetPosition - lengthOfClosingMarkTag — which feels brittle and cryptic.

Inner HTML tag support would resolve the issue of difference between rendered string position (position in a visual representation after HTML is parsed and applied) vs literal string position (position in a raw string that includes HTML mark up).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A mark tag is inserted once the Highlight text button is tapped. The next call of typeInRichText places the cursor at the end of the input (the expected default). However, the reality is that "the end" is after the closing mark tag.

Ah, true, I didn't realize that the mark tag was inserted upon tapping the button. I understand now the necessity of supporting the inner HTML tag. Thanks David for elaborating 🙇 !

To counter this we either need to (A) add support for inner HTML tags or (B) manually adjust for the closing mark tag — e.g. targetPosition - lengthOfClosingMarkTag — which feels brittle and cryptic.

I agree that option A seems the best way to go 👍 .

Inner HTML tag support would resolve the issue of difference between rendered string position (position in a visual representation after HTML is parsed and applied) vs literal string position (position in a raw string that includes HTML mark up).

Maybe we could create a follow-up GitHub issue with this, so we can keep track of it. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created WordPress/gutenberg#52520 capturing this enhancement.


dcalhoun marked this conversation as resolved.
Show resolved Hide resolved

##### TC002

**Alignment buttons**

- Press Left, Right, Center alignment buttons.
- Check that the text responds accordingly.


##### TC003

**Alignment Split**

- Write some lines on a paragraph block.
- Set an alignment on the block.
- Move the caret by the half of the text and press enter to split it.
- Check that the new block has the same alignment.
- Check that the text alignment corresponds to the setting.


##### TC004

**Link button works without selection**

- Press the links button
- Fill the options and dismiss to add a link.
- The link formatted word should be added to the block.


##### TC005

**Link button works with a selected word**

- Write a word and select it.
- Press the link format button.
- Check that the `Link Text` field is pre-filled with the selected word.
- Add a URL and dismiss.
- The selected word now should be formatted as a link.


##### TC006

**Adding a link from a copied URL**

- Go to a browser and copy a URL to the clipboard.
- Back to Gutenberg, select a word on a rich-text based component.
- Press the Link format button.
- Check that the copied URL is pre-filled on the URL field.
- Dismiss the bottom-sheet to see the selected word formatted as a link.


##### TC007
fluiddot marked this conversation as resolved.
Show resolved Hide resolved

**Test format detection under the cursor**
Expand All @@ -89,16 +13,6 @@ Have a rich-text based component with content (Paragraph, Heading, Quote, Media
Move the cursor around
- Check that the proper format buttons get selected when the cursor get under a formatted word.


##### TC008

**Test formatting doesn't remove leading or trailing whitespace**

- Add a text-based block, paragraph for example
- Type some spaces, then write some text, then type some more spaces
- Select the _text_ and apply one format, for example, bold
- Check that the leading and trailing spaces aren't removed

##### TC009

**Test autocorrection doesn't apply formatting to Heading**
Expand Down
17 changes: 0 additions & 17 deletions test-cases/gutenberg/writing-flow/splitting-merging.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,3 @@ Start from an empty post.
- Press enter two times to create an empty block in between
- Press back two times to merge everything again.
- Check that the blocks were merged.


##### TC006

**Splitting/merge list block**

- Write some items on a list block
- Put the caret by the half of them (at the end of the item) and press Enter to create a new item.
- Press Enter again to split the block into two, with an empty paragraph block in the middle. The paragraph block at the middle should be focused.
fluiddot marked this conversation as resolved.
Show resolved Hide resolved
- Write something on that newly created paragraph block.
- Move the cursor to the beginning of the paragraph block
- Press delete to merge the paragraph block with the upper list block.
- Check that the new word should be a new list item.
- Move the caret to the beginning of the second list block.
- Press delete once to merge it back into the first list block.
- Check that everything was merged and there’s just one list block.

24 changes: 0 additions & 24 deletions test-cases/gutenberg/writing-flow/undo-redo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@

Start on a new empty post.

##### TC001

**Undo/redo block actions**

- From the example app, remove a few blocks.
- Press the Undo button to see them reappear.
- Press Redo to remove the blocks again.


##### TC002

**Known Issues**
Expand All @@ -26,18 +17,3 @@ Start on a new empty post.
- Write some text on a text based block .
- Press Undo until all new text has disappeared.
- Press Redo to see the text appear again.
fluiddot marked this conversation as resolved.
Show resolved Hide resolved


##### TC003

**Known Issues**

- Highlighting text breaks the ability to redo changes. [#38084](https://github.com/WordPress/gutenberg/issues/38084)

**Undo/redo text format**

- On a rich-text based component, add some format (bold, links, etc…).
- Undo all changes and Redo them to arrive to the same state.



1 change: 0 additions & 1 deletion test-suites/gutenberg/functionality-test-suites.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ This holds a grouping of certain test suites to run in order to share the work w

- [ ] Spacer block - Dark mode - [TC004](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/darkmode.md#tc004)
- [ ] Buttons block - Dark mode - [TC005](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/darkmode.md#tc005)
- [ ] Group - Dark mode - [TC006](https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/darkmode.md#tc006)

### Group - 2

Expand Down