fix loading

desktop-master-git2
bunsenstraat 3 months ago
parent 6e354f99ac
commit 2648d0fcf8
  1. 2
      apps/remix-ide-e2e/src/tests/dgit_github.test.ts
  2. 6
      libs/remix-ui/git/src/components/panels/commits.tsx

@ -364,6 +364,7 @@ module.exports = {
.setValue('*[data-id="githubToken"]', 'invalidtoken')
.setValue('*[data-id="gitubUsername"]', 'git')
.setValue('*[data-id="githubEmail"]', 'git@example.com')
.pause()
.click('*[data-id="saveGitHubCredentials"]')
.modalFooterOKClick('github-credentials-error')
},
@ -382,6 +383,7 @@ module.exports = {
.click('*[data-id="load-more-commits"]')
.waitForElementVisible('*[data-id="loader-indicator"]')
.waitForElementNotPresent('*[data-id="loader-indicator"]')
.pause()
.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 > 2)

@ -19,9 +19,8 @@ export const Commits = () => {
}
};
const loadNextPage = () => {
actions.setStateGitLogCount(context.gitLogCount + 5)
actions.fetch({
const loadNextPage = async () => {
await actions.fetch({
remote: null,
ref: context.currentBranch,
relative: true,
@ -29,6 +28,7 @@ export const Commits = () => {
singleBranch: true,
quiet: true
})
await actions.setStateGitLogCount(context.gitLogCount + 5)
}
const getRemote = () => {

Loading…
Cancel
Save