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 acceptance tests #35

Merged
merged 29 commits into from Dec 23, 2019

Conversation

rafaelfbs
Copy link
Contributor

@rafaelfbs rafaelfbs commented Apr 3, 2019

A starting point to create acceptance tests and to validate outdated styles (will close #1, close #22)


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

@rafaelfbs
Copy link
Contributor Author

rafaelfbs commented Apr 3, 2019

We need to figure out a way to test in safari. Maybe using BrowserStack? @sindresorhus @Zirro

@sindresorhus
Copy link
Owner

Travis supports osx as an OS, which has Safari.

@rafaelfbs
Copy link
Contributor Author

Travis supports osx as an OS, which has Safari.

Worked like a charm ☺️

@rafaelfbs rafaelfbs marked this pull request as ready for review April 4, 2019 04:36
@rafaelfbs
Copy link
Contributor Author

There are some future issues:

Even so, everything seems to be alright. @sindresorhus @Zirro

@rafaelfbs rafaelfbs changed the title [WIP] Add acceptance tests Add acceptance tests Apr 4, 2019
@sindresorhus
Copy link
Owner

Why are there duplicate test files for each browser?

@rafaelfbs
Copy link
Contributor Author

Each browser has it's own style property values, like some line-heights and vendor properties (-webkit-appearance, -webkit-text-size-adjust, -moz-tab-size). What's more, we need to run some assertions that is valid only in one browser, like "Remove the inner border and padding in Firefox.", that does not even exists on chrome and safari (-moz-focus-inner).

I've sepparated the tests into two types. The rules.ts files are assertions in a page loading the modern-normalize CSS, the objective is to assert if the given rule is applied correctly. The validation.ts files are assertions in a page without the CSS module, the objective is to catch the changes on the newest browsers versions and remove the old rules.

I would really appreciate some feedback and improvements. It was troublesome to test some scenarios like safari's font on different platforms (my pc vs travis mac). 😁

@sindresorhus
Copy link
Owner

@rafaelfbs Sorry for leaving this for so long. I just had to many PRs to review. Can you fix the failing tests?

@rafaelfbs
Copy link
Contributor Author

@sindresorhus Tests passing.

@sindresorhus sindresorhus merged commit 2c027da into sindresorhus:master Dec 23, 2019
@sindresorhus
Copy link
Owner

Looking good. Thanks for working on this ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add some tests Remove more outdated styles
2 participants