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

✅ Add visual tests for live story notification label #22813

Merged
merged 3 commits into from Jun 13, 2019

Conversation

Enriqe
Copy link
Contributor

@Enriqe Enriqe commented Jun 12, 2019

Partial for #21714

Adds visual tests for live story notification label, it mocks when a new page is added.

@newmuis
Copy link
Contributor

newmuis commented Jun 13, 2019

Can you also add tests for RTL?

@Enriqe
Copy link
Contributor Author

Enriqe commented Jun 13, 2019

PTAL.

@gmajoulet
Copy link
Contributor

Side note: having more tests is always good, but I find it a bit extreme to have 12 screenshots and 3 new files for a simple toast message with 0 parameterization. If we were to do that for every single feature, our visual diff tests would get really really hard to maintain :(

Alternative proposal for the next visual diff tests so this message isn't a useless rant:

  • One screenshot mobile LTR
  • One screenshot desktop RTL
  • Testing that the message isn't displayed when the active page isn't the last one could be unit/integration tests
  • The tests can add the dir=rtl attribute directly from the JavaScript and it propagates to all the components since there is no shadow DOM, no need to add a new file where the only diff is an extra dir=rtl

@newmuis
Copy link
Contributor

newmuis commented Jun 13, 2019

+1 to:

Testing that the message isn't displayed when the active page isn't the last one could be unit/integration tests

That's behavior, so it seems like a unit test could test this. The visual tests should primarily test the visuals.

@Enriqe
Copy link
Contributor Author

Enriqe commented Jun 13, 2019

I gave it another go, let me know what you think!

@Enriqe
Copy link
Contributor Author

Enriqe commented Jun 13, 2019

Could you guys also approve the Percy diffs? Thanks!

@gmajoulet gmajoulet merged commit 2dae9e8 into ampproject:master Jun 13, 2019
thekorn pushed a commit to edelight/amphtml that referenced this pull request Sep 11, 2019
* add visual tests for live story notification label

* add rtl tests and delete duplicate desktop test

* do rtl in same test, remove rtl file, remove behavior logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants