Skip to content

Commit

Permalink
Add nav to My Shots test. (mozilla-services#4030)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Feb 12, 2018
1 parent fc8ed6e commit a2b5dea
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,29 @@ describe("Test Screenshots", function() {
});
});

it("should navigate to My Shots", function() {
return driver.get(backend).then(() => {
return startScreenshots(driver);
}).then(() => {
return driver.wait(
until.ableToSwitchToFrame(By.id(PRESELECTION_IFRAME_ID))
);
}).then(() => {
return driver.wait(
until.elementLocated(By.css(".myshots-button"))
);
}).then(myShotsButton => {
myShotsButton.click();
return setTimeoutPromise(500);
}).then(() => {
return driver.getAllWindowHandles();
}).then(tabs => {
return driver.switchTo().window(tabs[tabs.length - 1]);
}).then(() => {
return driver.getCurrentUrl();
}).then(url => {
assert.equal(url, `${backend}/shots`, `Navigated to ${url} instead of My Shots at ${backend}/shots`);
});
});

});

0 comments on commit a2b5dea

Please sign in to comment.