Skip to content

fix(test): solve CSS discrepancies across browsers #2177

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

Closed
wants to merge 1 commit into from

Conversation

marclaval
Copy link
Contributor

This PR fixes 6 unit tests in IE11 and 2 in Firefox.

The normalizeCSS function is a simple one that doesn't cover all possible cases, but only the ones found in the existing tests.

@marclaval marclaval force-pushed the utCSSCompare branch 2 times, most recently from 208884f to 300ae28 Compare May 27, 2015 09:54
expect(s(css, 'a')).toEqual(expected);
});

it('should handle keyframes rules', () => {
var css = '@keyframes foo {0% {transform: translate(-50%) scaleX(0);}}';
var passRe = RegExpWrapper.create(
'@keyframes foo {\\s*0% {\\s*transform: translate\\(-50%\\) scaleX\\(0\\);\\s*}}');
'@keyframes foo {\\s*0% {\\s*transform:translate\\(-50%\\) scaleX\\(0\\);\\s*}\\s*}');
Copy link
Contributor

Choose a reason for hiding this comment

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

do we still need the leading \\s* there ? (and then the RegExp)

Copy link
Contributor

Choose a reason for hiding this comment

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

oops you actually have added some \\s*, discard my comment

@marclaval marclaval force-pushed the utCSSCompare branch 2 times, most recently from 9f4d2f7 to 29bc356 Compare May 27, 2015 11:11
@vicb vicb added @lgtm action: merge The PR is ready for merge by the caretaker action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels May 27, 2015
@vicb
Copy link
Contributor

vicb commented May 27, 2015

lgtm with 1 comment

@marclaval marclaval closed this in fb42d59 May 27, 2015
@marclaval marclaval deleted the utCSSCompare branch December 11, 2017 10:18
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: merge The PR is ready for merge by the caretaker cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants