fix some bugs

This commit is contained in:
Nolan Lawson 2018-03-05 21:58:29 -08:00
parent 19d5d9aaae
commit 32e47a0bb7
3 changed files with 32 additions and 9 deletions

View file

@ -12,6 +12,20 @@ export const actions = times(30, i => ({
text: 'hello world'
}
},
{
user: 'admin',
post: {
text: '@foobar hello foobar',
privacy: 'unlisted'
}
},
{
user: 'foobar',
post: {
text: '@admin hello admin',
privacy: 'unlisted'
}
},
{
user: 'foobar',
post: {
@ -87,8 +101,8 @@ export const actions = times(30, i => ({
{
user: 'admin',
post: {
text: '@foobar hello foobar',
privacy: 'unlisted'
text: '@foobar direct',
privacy: 'direct'
}
},
{
@ -150,6 +164,10 @@ export const actions = times(30, i => ({
user: 'admin',
boost: 1
},
{
user: 'admin',
boost: 2
},
{
user: 'admin',
favorite: 2
@ -159,7 +177,7 @@ export const actions = times(30, i => ({
post: {
internalId: 5,
text: 'pinned toot 1',
privacy: 'private'
privacy: 'unlisted'
}
},
{
@ -167,7 +185,7 @@ export const actions = times(30, i => ({
post: {
internalId: 6,
text: 'pinned toot 2',
privacy: 'private'
privacy: 'unlisted'
}
}
]).concat(times(25, i => ({
@ -175,7 +193,7 @@ export const actions = times(30, i => ({
post: {
internalId: 100 + i,
text: 'unlisted thread ' + (i + 1),
privacy: 'private',
privacy: 'unlisted',
inReplyTo: i > 0 && (100 + i)
}
}))).concat([
@ -187,6 +205,10 @@ export const actions = times(30, i => ({
user: 'quux',
pin: 6
},
{
user: 'admin',
boost: 5
},
{
user: 'admin',
favorite: 5
@ -203,21 +225,21 @@ export const actions = times(30, i => ({
user: 'ExternalLinks',
post: {
text: 'here are some hashtags: #kitten #kitties',
privacy: 'private'
privacy: 'unlisted'
}
},
{
user: 'ExternalLinks',
post: {
text: 'here are some external links: https://joinmastodon.org https://github.com/tootsuite/mastodon',
privacy: 'private'
privacy: 'unlisted'
}
},
{
user: 'ExternalLinks',
post: {
text: 'here are some users: @admin @quux',
privacy: 'private'
privacy: 'unlisted'
}
}
])

View file

@ -52,6 +52,7 @@ export async function restoreMastodonData () {
} else if (action.boost) {
await reblogStatus('localhost:3000', accessToken, internalIdsToIds[action.boost])
}
await new Promise(resolve => setTimeout(resolve, 2000))
}
console.log('Restored mastodon data')
}

View file

@ -75,8 +75,8 @@ async function main () {
await setupMastodonDatabase()
await runMastodon()
await waitForMastodonApiToStart()
await waitForMastodonUiToStart()
await restoreMastodonData()
await waitForMastodonUiToStart()
}
process.on('SIGINT', function () {