Merge branch 'more-fixes' into shigusegubu-themes3
This commit is contained in:
commit
182cf5aff6
12 changed files with 11 additions and 32 deletions
|
|
@ -157,7 +157,7 @@ e2e-pleroma:
|
||||||
variables:
|
variables:
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
|
||||||
FF_NETWORK_PER_BUILD: "true"
|
FF_NETWORK_PER_BUILD: "true"
|
||||||
PLEROMA_IMAGE: git.pleroma.social:5050/pleroma/pleroma:stable
|
PLEROMA_IMAGE: git.pleroma.social/pleroma/pleroma:stable
|
||||||
POSTGRES_USER: pleroma
|
POSTGRES_USER: pleroma
|
||||||
POSTGRES_PASSWORD: pleroma
|
POSTGRES_PASSWORD: pleroma
|
||||||
POSTGRES_DB: pleroma
|
POSTGRES_DB: pleroma
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ services:
|
||||||
retries: 30
|
retries: 30
|
||||||
|
|
||||||
pleroma:
|
pleroma:
|
||||||
image: ${PLEROMA_IMAGE:-git.pleroma.social:5050/pleroma/pleroma:stable}
|
image: ${PLEROMA_IMAGE:-git.pleroma.social/pleroma/pleroma:stable}
|
||||||
environment:
|
environment:
|
||||||
DB_USER: pleroma
|
DB_USER: pleroma
|
||||||
DB_PASS: pleroma
|
DB_PASS: pleroma
|
||||||
|
|
|
||||||
|
|
@ -312,9 +312,6 @@ export const deleteAnnouncement = ({ id, credentials }) =>
|
||||||
})
|
})
|
||||||
|
|
||||||
export const setReportState = ({ id, state, credentials }) => {
|
export const setReportState = ({ id, state, credentials }) => {
|
||||||
// TODO: Can't use promisedRequest because on OK this does not return json
|
|
||||||
// See https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1322
|
|
||||||
|
|
||||||
return promisedRequest({
|
return promisedRequest({
|
||||||
url: REPORTS,
|
url: REPORTS,
|
||||||
credentials,
|
credentials,
|
||||||
|
|
@ -328,19 +325,6 @@ export const setReportState = ({ id, state, credentials }) => {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((data) => {
|
|
||||||
if (data.status >= 500) {
|
|
||||||
throw Error(data.statusText)
|
|
||||||
} else if (data.status >= 400) {
|
|
||||||
return data.json()
|
|
||||||
}
|
|
||||||
return data
|
|
||||||
})
|
|
||||||
.then((data) => {
|
|
||||||
if (data.errors) {
|
|
||||||
throw Error(data.errors[0].message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getInstanceDBConfig = ({ credentials }) =>
|
export const getInstanceDBConfig = ({ credentials }) =>
|
||||||
|
|
|
||||||
|
|
@ -842,7 +842,6 @@ export const getList = ({ listId, credentials }) =>
|
||||||
})
|
})
|
||||||
|
|
||||||
export const updateList = ({ listId, title, credentials }) =>
|
export const updateList = ({ listId, title, credentials }) =>
|
||||||
console.log('PUT', MASTODON_LIST_URL(listId)) ||
|
|
||||||
promisedRequest({
|
promisedRequest({
|
||||||
url: MASTODON_LIST_URL(listId),
|
url: MASTODON_LIST_URL(listId),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -634,6 +634,7 @@ const PostStatusForm = {
|
||||||
// Don't apply preview if not loading, because it means
|
// Don't apply preview if not loading, because it means
|
||||||
// user has closed the preview manually.
|
// user has closed the preview manually.
|
||||||
if (!this.previewLoading) return
|
if (!this.previewLoading) return
|
||||||
|
this.preview = data
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.preview = { error }
|
this.preview = { error }
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ const UserReportingModal = {
|
||||||
return !!this.$store.state.users.currentUser
|
return !!this.$store.state.users.currentUser
|
||||||
},
|
},
|
||||||
isOpen() {
|
isOpen() {
|
||||||
console.log(this.reportModal)
|
|
||||||
return this.isLoggedIn && this.reportModal.activated
|
return this.isLoggedIn && this.reportModal.activated
|
||||||
},
|
},
|
||||||
userId() {
|
userId() {
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@ function humanizeErrors(errors) {
|
||||||
export function StatusCodeError(statusCode, body, options, response) {
|
export function StatusCodeError(statusCode, body, options, response) {
|
||||||
this.name = 'StatusCodeError'
|
this.name = 'StatusCodeError'
|
||||||
this.statusCode = statusCode
|
this.statusCode = statusCode
|
||||||
this.statusText = body.error || body
|
this.statusText = body.error || body.errors || body
|
||||||
this.details = JSON && JSON.stringify ? JSON.stringify(body) : body
|
this.details = JSON && JSON.stringify ? JSON.stringify(body) : body
|
||||||
this.errorData = body.error
|
this.errorData = body.error || body.errors
|
||||||
this.message = this.statusCode + ' - ' + this.statusText
|
this.message = this.statusCode + ' - ' + this.statusText
|
||||||
this.error = body // legacy attribute
|
this.error = body // legacy attribute
|
||||||
this.options = options
|
this.options = options
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@ import { useOAuthStore } from 'src/stores/oauth.js'
|
||||||
|
|
||||||
import { fetchOAuthTokens, revokeOAuthToken } from 'src/api/user.js'
|
import { fetchOAuthTokens, revokeOAuthToken } from 'src/api/user.js'
|
||||||
|
|
||||||
|
/* Just to clear the confusion:
|
||||||
|
* OAuth Store is responsible for user authentication
|
||||||
|
* OAuth Tokens Store is responsible for *managing* all of the user's tokens,
|
||||||
|
* i.e. for current and other clients
|
||||||
|
*/
|
||||||
export const useOAuthTokensStore = defineStore('oauthTokens', {
|
export const useOAuthTokensStore = defineStore('oauthTokens', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
tokens: [],
|
tokens: [],
|
||||||
|
|
|
||||||
3
test/fixtures/worker.js
vendored
3
test/fixtures/worker.js
vendored
|
|
@ -2,7 +2,4 @@ import { setupWorker } from 'msw/browser'
|
||||||
|
|
||||||
export const worker = setupWorker()
|
export const worker = setupWorker()
|
||||||
|
|
||||||
console.log('=============== TEST ===============')
|
|
||||||
console.log(window.__test__)
|
|
||||||
console.log('=============== TEST ===============')
|
|
||||||
window.__test__ = window.__test__ || 'TEST'
|
window.__test__ = window.__test__ || 'TEST'
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ describe('The lists store', () => {
|
||||||
HttpResponse.json({ ok: true }),
|
HttpResponse.json({ ok: true }),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
console.log('1 =========', worker.listHandlers())
|
|
||||||
|
|
||||||
await store.setList({ listId: list.id, title: list.title })
|
await store.setList({ listId: list.id, title: list.title })
|
||||||
expect(store.allListsObject[list.id]).to.eql({
|
expect(store.allListsObject[list.id]).to.eql({
|
||||||
|
|
@ -46,8 +45,6 @@ describe('The lists store', () => {
|
||||||
expect(store.allLists).to.have.length(1)
|
expect(store.allLists).to.have.length(1)
|
||||||
expect(store.allLists[0]).to.eql(list)
|
expect(store.allLists[0]).to.eql(list)
|
||||||
|
|
||||||
console.log('2 =========', worker.listHandlers())
|
|
||||||
|
|
||||||
await store.setList({ listId: modList.id, title: modList.title })
|
await store.setList({ listId: modList.id, title: modList.title })
|
||||||
expect(store.allListsObject[modList.id]).to.eql({
|
expect(store.allListsObject[modList.id]).to.eql({
|
||||||
title: modList.title,
|
title: modList.title,
|
||||||
|
|
@ -55,8 +52,6 @@ describe('The lists store', () => {
|
||||||
})
|
})
|
||||||
expect(store.allLists).to.have.length(1)
|
expect(store.allLists).to.have.length(1)
|
||||||
expect(store.allLists[0]).to.eql(modList)
|
expect(store.allLists[0]).to.eql(modList)
|
||||||
|
|
||||||
console.log('3 =========', worker.listHandlers())
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('adds a new list with an array of IDs, updating the IDs for existing lists', async ({
|
it('adds a new list with an array of IDs, updating the IDs for existing lists', async ({
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,6 @@ describe('oauth store', () => {
|
||||||
describe('ensureAppToken', () => {
|
describe('ensureAppToken', () => {
|
||||||
it('should work if the state is empty', async ({ worker }) => {
|
it('should work if the state is empty', async ({ worker }) => {
|
||||||
worker.use(...authApis())
|
worker.use(...authApis())
|
||||||
console.log('=========', worker.listHandlers())
|
|
||||||
const store = useOAuthStore()
|
const store = useOAuthStore()
|
||||||
const token = await store.ensureAppToken()
|
const token = await store.ensureAppToken()
|
||||||
expect(token).to.eql('test-app-token')
|
expect(token).to.eql('test-app-token')
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ set -u
|
||||||
COMPOSE_FILE="docker-compose.e2e.yml"
|
COMPOSE_FILE="docker-compose.e2e.yml"
|
||||||
|
|
||||||
: "${COMPOSE_MENU:=false}"
|
: "${COMPOSE_MENU:=false}"
|
||||||
: "${PLEROMA_IMAGE:=git.pleroma.social:5050/pleroma/pleroma:stable}"
|
: "${PLEROMA_IMAGE:=git.pleroma.social/pleroma/pleroma:stable}"
|
||||||
: "${E2E_ADMIN_USERNAME:=admin}"
|
: "${E2E_ADMIN_USERNAME:=admin}"
|
||||||
: "${E2E_ADMIN_PASSWORD:=adminadmin}"
|
: "${E2E_ADMIN_PASSWORD:=adminadmin}"
|
||||||
: "${E2E_ADMIN_EMAIL:=admin@example.com}"
|
: "${E2E_ADMIN_EMAIL:=admin@example.com}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue