|
|
|
@ -131,7 +131,7 @@ const tests = { |
|
|
|
|
.elements('xpath', '//*[@data-id="commits-current-branch-master"]//*[@data-type="commit-summary"]', function (result) { |
|
|
|
|
console.log('Number of commit-summary elements:', (result.value as any).length); |
|
|
|
|
browser.assert.ok((result.value as any).length > commitCount) |
|
|
|
|
}) |
|
|
|
|
}).pause(10000) |
|
|
|
|
}, |
|
|
|
|
'load more branches from remote #group3': function (browser: NightwatchBrowser) { |
|
|
|
|
|
|
|
|
@ -155,15 +155,34 @@ const tests = { |
|
|
|
|
|
|
|
|
|
if (useIsoGit) { |
|
|
|
|
|
|
|
|
|
browser.waitForElementVisible('*[data-id="remote-sync-origin"]') |
|
|
|
|
const branchSelector = '//*[@data-id="branches-panel-content-remote-branches"]//*[@data-type="branches-branch"]'; |
|
|
|
|
|
|
|
|
|
browser |
|
|
|
|
.waitForElementVisible('*[data-id="remote-sync-origin"]') |
|
|
|
|
.click('*[data-id="remote-sync-origin"]') |
|
|
|
|
.waitForElementVisible('*[data-id="loader-indicator"]') |
|
|
|
|
.waitForElementNotPresent('*[data-id="loader-indicator"]') |
|
|
|
|
.pause(2000) |
|
|
|
|
.elements('xpath', '//*[@data-id="branches-panel-content-remote-branches"]//*[@data-type="branches-branch"]', function (result) { |
|
|
|
|
console.log('Number of branches elements:', (result.value as any).length); |
|
|
|
|
browser.assert.ok((result.value as any).length > branchCount) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
browser.perform(function (done) { |
|
|
|
|
function checkElements() { |
|
|
|
|
browser.execute( |
|
|
|
|
function (xpath) { |
|
|
|
|
return document.evaluate(xpath, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotLength; |
|
|
|
|
}, |
|
|
|
|
[branchSelector], |
|
|
|
|
function (result) { |
|
|
|
|
if ((result.value as number) > 1) { |
|
|
|
|
console.log('Number of loaded branches elements:', result.value); |
|
|
|
|
done(); |
|
|
|
|
} else { |
|
|
|
|
browser.pause(1000); // Wait and check again
|
|
|
|
|
checkElements(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
checkElements(); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
browser.waitForElementVisible('*[data-id="show-more-branches-on-remote"]') |
|
|
|
|
.click('*[data-id="show-more-branches-on-remote"]') |
|
|
|
|