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

Added integration tests for inline text formatting #2718

Merged
merged 22 commits into from
Jul 14, 2020

Conversation

barklund
Copy link
Contributor

Summary

This PR implements the tests listed in #1612.

Relevant Technical Choices

  • Adds new DOM selectors and accessors to karma container structure - including some new generic components
  • Abstracts common functionality in _utils.js file.

To-do

See #1612

User-facing changes

None

Testing Instructions

None, if tests pass, we're good!


Fixes #1612

@barklund barklund added this to the Sprint 31 milestone Jun 25, 2020
@barklund barklund requested a review from dvoytenko June 25, 2020 05:02
@barklund barklund self-assigned this Jun 25, 2020
@codecov
Copy link

codecov bot commented Jun 25, 2020

Codecov Report

Merging #2718 into master will increase coverage by 15.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2718       +/-   ##
===========================================
+ Coverage   67.34%   82.38%   +15.03%     
===========================================
  Files         729      740       +11     
  Lines       12360    12465      +105     
===========================================
+ Hits         8324    10269     +1945     
+ Misses       4036     2196     -1840     
Flag Coverage Δ
#karmatests 65.48% <100.00%> (?)
#unittests 65.98% <100.00%> (+0.02%) ⬆️
Impacted Files Coverage Δ
...sets/src/edit-story/components/canvas/editLayer.js 100.00% <ø> (+86.36%) ⬆️
...rc/edit-story/components/panels/textStyle/color.js 63.63% <ø> (ø)
...ry/components/richText/useSelectionManipulation.js 100.00% <ø> (+100.00%) ⬆️
...sets/src/edit-story/components/form/color/color.js 100.00% <100.00%> (ø)
...edit-story/components/inspector/inspectorLayout.js 100.00% <100.00%> (+62.50%) ⬆️
...ts/src/edit-story/components/panels/panel/panel.js 69.38% <100.00%> (+3.47%) ⬆️
...edit-story/components/panels/panel/shared/title.js 78.12% <100.00%> (+3.93%) ⬆️
...ory/components/inspector/document/publish/index.js 82.35% <0.00%> (-5.15%) ⬇️
assets/src/edit-story/elements/text/output.js 96.87% <0.00%> (ø)
assets/src/edit-story/utils/textMeasurements.js 72.09% <0.00%> (ø)
... and 195 more

} = useContext(panelContext);
const {
state: { inspectorContentHeight },
} = useInspector();

useEffect(confirmTitle, [confirmTitle]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not all panels have a title ("No selection" panel in particular), and if a panel doesn't have a title but still has aria-labelledby referencing a non-existent id, AXE e2e tests start failing as it's an illegal WAI-ARIA property.

This is not the prettiest way to do it, but it works.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 25, 2020

Size Change: +422 B (0%)

Total Size: 1.06 MB

Filename Size Change
assets/js/edit-story.js 462 kB +242 B (0%)
assets/js/stories-dashboard.js 526 kB +180 B (0%)
ℹ️ View Unchanged
Filename Size Change
assets/css/edit-story.css 269 B 0 B
assets/css/stories-dashboard.css 305 B 0 B
assets/css/web-stories-embed-block.css 515 B 0 B
assets/js/web-stories-activation-notice.js 55.8 kB 0 B
assets/js/web-stories-embed-block.js 16.4 kB 0 B

compressed-size-action

Copy link
Contributor

@dvoytenko dvoytenko left a comment

Choose a reason for hiding this comment

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

This looks very good, imho. Just a few nits.

Copy link
Contributor

@dvoytenko dvoytenko left a comment

Choose a reason for hiding this comment

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

LGTM with one request

@swissspidy swissspidy added Skip Changelog Type: Enhancement New feature or improvement of an existing feature labels Jun 26, 2020
@barklund barklund marked this pull request as ready for review June 27, 2020 03:26
@barklund barklund changed the title [WIP] Added integration tests for inline text formatting Added integration tests for inline text formatting Jun 29, 2020
Copy link
Contributor

@miina miina left a comment

Choose a reason for hiding this comment

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

This is awesome!!!

Added some questions/comments.

@barklund barklund requested a review from miina July 1, 2020 22:35
Copy link
Contributor

@miina miina left a comment

Choose a reason for hiding this comment

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

LGTM!

@swissspidy
Copy link
Collaborator

@barklund ready to merge?

@swissspidy swissspidy removed this from the Sprint 31 milestone Jul 9, 2020
Copy link
Contributor

@dvoytenko dvoytenko left a comment

Choose a reason for hiding this comment

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

Approved. One general ask: please add a few snapshots in CUJ tests.

@barklund barklund merged commit cc37fd1 into master Jul 14, 2020
@barklund barklund deleted the test/1612-itf-integration branch July 14, 2020 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add integration tests to inline text formatting
5 participants