Merge remote-tracking branch 'misskey-dev/develop' into io
This commit is contained in:
commit
0f70bf57f3
71 changed files with 4144 additions and 2532 deletions
|
@ -276,8 +276,11 @@ const align = () => {
|
|||
const onOpened = () => {
|
||||
emit('opened');
|
||||
|
||||
// NOTE: Chromatic テストの際に undefined になる場合がある
|
||||
if (content.value == null) return;
|
||||
|
||||
// モーダルコンテンツにマウスボタンが押され、コンテンツ外でマウスボタンが離されたときにモーダルバックグラウンドクリックと判定させないためにマウスイベントを監視しフラグ管理する
|
||||
const el = content.value!.children[0];
|
||||
const el = content.value.children[0];
|
||||
el.addEventListener('mousedown', ev => {
|
||||
contentClicking = true;
|
||||
window.addEventListener('mouseup', ev => {
|
||||
|
|
|
@ -193,7 +193,7 @@ const localOnly = ref(props.initialLocalOnly ?? (defaultStore.state.rememberNote
|
|||
const visibility = ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility));
|
||||
const visibleUsers = ref<Misskey.entities.UserDetailed[]>([]);
|
||||
if (props.initialVisibleUsers) {
|
||||
props.initialVisibleUsers.forEach(pushVisibleUser);
|
||||
props.initialVisibleUsers.forEach(u => pushVisibleUser(u));
|
||||
}
|
||||
const reactionAcceptance = ref(defaultStore.state.reactionAcceptance);
|
||||
const autocompleteTextareaInput = ref<Autocomplete | null>(null);
|
||||
|
@ -343,7 +343,7 @@ if (props.reply && ['home', 'followers', 'specified'].includes(props.reply.visib
|
|||
misskeyApi('users/show', {
|
||||
userIds: props.reply.visibleUserIds.filter(uid => uid !== $i.id && uid !== props.reply?.userId),
|
||||
}).then(users => {
|
||||
users.forEach(pushVisibleUser);
|
||||
users.forEach(u => pushVisibleUser(u));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -971,11 +971,7 @@ onMounted(() => {
|
|||
}
|
||||
if (draft.data.visibleUserIds) {
|
||||
misskeyApi('users/show', { userIds: draft.data.visibleUserIds }).then(users => {
|
||||
for (let i = 0; i < users.length; i++) {
|
||||
if (users[i].id === draft.data.visibleUserIds[i]) {
|
||||
pushVisibleUser(users[i]);
|
||||
}
|
||||
}
|
||||
users.forEach(u => pushVisibleUser(u));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,10 @@ import { i18n } from '@/i18n.js';
|
|||
|
||||
let lock: Promise<undefined> | undefined;
|
||||
|
||||
function sleep(ms: number) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
const common = {
|
||||
render(args) {
|
||||
return {
|
||||
|
@ -43,6 +47,8 @@ const common = {
|
|||
lock = new Promise(r => resolve = r);
|
||||
|
||||
try {
|
||||
// NOTE: sleep しないと何故か落ちる
|
||||
await sleep(100);
|
||||
const canvas = within(canvasElement);
|
||||
const a = canvas.getByRole<HTMLAnchorElement>('link');
|
||||
// await expect(a.href).toMatch(/^https?:\/\/.*#test$/);
|
||||
|
@ -53,7 +59,7 @@ const common = {
|
|||
const i = buttons[0];
|
||||
await expect(i).toBeInTheDocument();
|
||||
await userEvent.click(i);
|
||||
// await expect(canvasElement).toHaveTextContent(i18n.ts._ad.back);
|
||||
await expect(canvasElement).toHaveTextContent(i18n.ts._ad.back);
|
||||
await expect(a).not.toBeInTheDocument();
|
||||
await expect(i).not.toBeInTheDocument();
|
||||
buttons = canvas.getAllByRole<HTMLButtonElement>('button');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue