mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -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 ====
|
// ==== SUPPORT column ====
|
||||||
|
|
||||||
// TIPS PAGE
|
// IDEAS PAGE
|
||||||
tap.test('clickTipsPageLink', options, t => {
|
tap.test('clickIdeasPageLink', options, t => {
|
||||||
const linkText = 'Tips';
|
const linkText = 'Ideas';
|
||||||
const expectedHref = '/tips';
|
const expectedHref = '/ideas';
|
||||||
clickFooterLinks(linkText).then(url => {
|
clickFooterLinks(linkText).then(url => {
|
||||||
t.equal(url.substr(-expectedHref.length), expectedHref);
|
t.equal(url.substr(-expectedHref.length), expectedHref);
|
||||||
t.end();
|
t.end();
|
||||||
|
|
|
@ -57,9 +57,9 @@ tap.test('checkExploreLinkWhenSignedOut', function (t) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('checkTipsLinkWhenSignedOut', function (t) {
|
tap.test('checkIdeasLinkWhenSignedOut', function (t) {
|
||||||
var xPathLink = '//li[contains(@class, "link") and contains(@class, "tips")]/a';
|
var xPathLink = '//li[contains(@class, "link") and contains(@class, "ideas")]/a';
|
||||||
var expectedHref = '/tips';
|
var expectedHref = '/ideas';
|
||||||
driver.findElement(webdriver.By.xpath(xPathLink))
|
driver.findElement(webdriver.By.xpath(xPathLink))
|
||||||
.then(function (element) {
|
.then(function (element) {
|
||||||
return element.getAttribute('href');
|
return element.getAttribute('href');
|
||||||
|
|
Loading…
Reference in a new issue