Created
May 26, 2018 23:26
-
-
Save ali-kamalizade/ab75320847a8eac220bf24856560ab11 to your computer and use it in GitHub Desktop.
Sample e2e test with better-protractor
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 {} from "protractor"; | |
import {BetterProtractorService} from "better-protractor"; | |
const service: BetterProtractorService = new BetterProtractorService(); | |
describe('Mobiflip', () => { | |
it('should navigate to Mobiflip page', async() => { | |
service.disableAngular(); | |
service.navigateToRoute('https://mobiflip.de'); | |
service.pauseBrowserTemporarily(500); | |
expect(await service.checkIfRouteContains('mobiflip')).toBe(true); | |
}); | |
it('should open first article', async() => { | |
service.clickElementByCss('.blog-widget-list > .infinite-post:first-child'); | |
service.pauseBrowserTemporarily(1000); | |
}); | |
it('should scroll to sharing buttons', async() => { | |
await service.scrollToElement('".sharep"'); | |
service.pauseBrowserTemporarily(3000); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment