Skip to content

Instantly share code, notes, and snippets.

@jonyet
Created September 20, 2016 18:38
Show Gist options
  • Save jonyet/da3b9859a26de94ba48dd33ac5e93afd to your computer and use it in GitHub Desktop.
Save jonyet/da3b9859a26de94ba48dd33ac5e93afd to your computer and use it in GitHub Desktop.
var Global = require('../page_objects/Global.js');
var Home = require('../page_objects/Home.js');
var Utility = require('../lib/Utility.js');
describe('AMC Homepage Hero Carousel - Full', function () {
before('On the home page...', function () {
browser.setViewportSize({ width: 1300, height: 4373 });
Home.open();
Home.tickets.waitForExist();
Home.tickets.waitForVisible();
});
it('Carousel Next is visible at >1260', function () {
expect(Home.carouselNext.isVisible()).to.be.true;
});
it('Carousel Previous is visible at >1260', function () {
expect(Home.carouselPrev.isVisible()).to.be.true;
});
it('Carousel Next works', function () {
Home.carouselNext.click();
browser.pause(600);
expect(Home.carouselTwo.isVisible()).to.be.true;
Home.carouselNext.click();
browser.pause(600);
expect(Home.carouselThree.isVisible()).to.be.true;
Home.carouselNext.click();
browser.pause(600);
expect(Home.carouselOne.isVisible()).to.be.true;
});
it('Carousel Previous works', function () {
Home.carouselPrev.click();
browser.pause(600);
expect(Home.carouselThree.isVisible()).to.be.true;
Home.carouselPrev.click();
browser.pause(600);
expect(Home.carouselTwo.isVisible()).to.be.true;
Home.carouselPrev.click();
browser.pause(600);
expect(Home.carouselOne.isVisible()).to.be.true;
});
it('Carousel Buttons work', function () {
Home.carouselButtonTwo.click();
browser.pause(600);
expect(Home.carouselTwo.isVisible()).to.be.true;
Home.carouselButtonThree.click();
browser.pause(600);
expect(Home.carouselThree.isVisible()).to.be.true;
Home.carouselButtonOne.click();
browser.pause(600);
expect(Home.carouselOne.isVisible()).to.be.true;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment