mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 23:27:54 -05:00
Merge pull request #2482 from ericrosenbaum/bugfix/fix-tests-for-ideas-page
Update tests
This commit is contained in:
commit
2c40e2d78a
2 changed files with 7 additions and 7 deletions
|
@ -162,10 +162,10 @@ tap.test('clickStatisticsLink', options, t => {
|
|||
|
||||
// ==== SUPPORT column ====
|
||||
|
||||
// TIPS PAGE
|
||||
tap.test('clickTipsPageLink', options, t => {
|
||||
const linkText = 'Tips';
|
||||
const expectedHref = '/tips';
|
||||
// IDEAS PAGE
|
||||
tap.test('clickIdeasPageLink', options, t => {
|
||||
const linkText = 'Ideas';
|
||||
const expectedHref = '/ideas';
|
||||
clickFooterLinks(linkText).then(url => {
|
||||
t.equal(url.substr(-expectedHref.length), expectedHref);
|
||||
t.end();
|
||||
|
|
|
@ -57,9 +57,9 @@ tap.test('checkExploreLinkWhenSignedOut', function (t) {
|
|||
});
|
||||
});
|
||||
|
||||
tap.test('checkTipsLinkWhenSignedOut', function (t) {
|
||||
var xPathLink = '//li[contains(@class, "link") and contains(@class, "tips")]/a';
|
||||
var expectedHref = '/tips';
|
||||
tap.test('checkIdeasLinkWhenSignedOut', function (t) {
|
||||
var xPathLink = '//li[contains(@class, "link") and contains(@class, "ideas")]/a';
|
||||
var expectedHref = '/ideas';
|
||||
driver.findElement(webdriver.By.xpath(xPathLink))
|
||||
.then(function (element) {
|
||||
return element.getAttribute('href');
|
||||
|
|
Loading…
Reference in a new issue