diff --git a/test/button/get-styles.test.js b/test/button/get-styles.test.js index 9e8224fb..2dda4ec7 100644 --- a/test/button/get-styles.test.js +++ b/test/button/get-styles.test.js @@ -2,6 +2,10 @@ import { expect } from 'chai'; import getStyles from '../../src/button/get-styles'; import styles from '../../src/button/styles'; +import colors from '../../src/settings/colors'; +import darken from '../../src/internal/darken'; +import fade from '../../src/internal/fade'; +import internalStyles from '../../src/settings/styles'; describe('Button.getStyles', () => { describe('root', () => { @@ -21,18 +25,22 @@ describe('Button.getStyles', () => { const style = getStyles.root('red'); expect(style).to.have.property('backgroundColor', 'red'); + expect(style[':hover']).to.have.property('backgroundColor', darken('red', 0.15)); }); it('should add inverted styles', () => { const style = getStyles.root('red', true); - expect(style).to.have.property('backgroundColor', '#FEFEFE'); + expect(style).to.have.property('color', 'red'); + expect(style).to.have.property('backgroundColor', colors.white); + expect(style[':hover']).to.have.property('backgroundColor', darken(colors.white, 0.15)); + expect(style[':active']).to.have.property('boxShadow', internalStyles.depthShadows[1]); }); it('should add iconButton styles', () => { const style = getStyles.root('red', false, true); - expect(style).to.have.property('borderRadius', '50%'); + expect(style).to.deep.equal(styles.iconButton); }); it('should add disabled styles', () => { @@ -45,6 +53,11 @@ describe('Button.getStyles', () => { const style = getStyles.root('red', false, false, false, true); expect(style).to.have.property('backgroundColor', 'transparent'); + expect(style).to.have.property('boxShadow', 'none'); + expect(style).to.have.property('textTransform', 'uppercase'); + expect(style).to.have.property('flexShrink', 0); + expect(style[':hover']).to.have.property('backgroundColor', fade(colors.black, 0.95)); + expect(style[':active']).to.have.property('backgroundColor', fade(colors.black, 0.85)); }); }); });