-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
to debug test, run | ||
|
||
```sh | ||
./node_modules/.bin/karma start --no-single-run --browsers Chrome | ||
``` | ||
then click debug and press F12 to launch Chrome Developer Tools | ||
|
||
to run test in ci mode, run | ||
|
||
```sh | ||
npm run test:watch | ||
``` | ||
Tests runs in headless Chromium downloaded by Puppeteer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { appWrapper } from 'helpers/fullRenderHelper' | ||
|
||
describe('styler > quick', () => { | ||
it('should change style when hover mouse over palette #1', () => { | ||
let otSlide = $('.sp-operating-table .sp-ot-slide') | ||
const originalStyle = otSlide.css('background').slice(0) | ||
let palette1Dom = $( | ||
'.sp-navbar-style #sp-quick-styler > .sp-palette[title="palette 1"]' | ||
) | ||
let palette1 = appWrapper.find( | ||
'.sp-navbar-style #sp-quick-styler > .sp-palette[title="palette 1"]' | ||
) | ||
palette1.simulate('mouseover') | ||
expect(otSlide.css('background')).to.equal(palette1Dom.css('background')) | ||
palette1.simulate('mouseleave') | ||
expect(otSlide.css('background')).to.equal(originalStyle) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters