Last active
June 19, 2019 10:25
-
-
Save NiGhTTraX/3a14d9213e8332bb86258926460dc762 to your computer and use it in GitHub Desktop.
Visual test with Mugshot
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
import Mugshot from 'mugshot'; | |
import WebdriverIOAdapter from '@mugshot/webdriverio'; | |
describe('Mugshot README', () => { | |
/* BROWSER SETUP */ | |
/* Identical setup from previous example omitted. | |
/* ENDBROWSER SETUP */ | |
it('should have a logo', async () => { | |
await browser.url('https://github.com/NiGhTTraX/mugshot/blob/master/README.md'); | |
const mugshot = new Mugshot( | |
new WebdriverIOAdapter(browser), | |
'/tmp/screenshots' | |
); | |
const result = await mugshot.check('logo', 'img[alt=logo]'); | |
expect(result.matches).to.be.true; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment