summaryrefslogtreecommitdiff
path: root/packages/backend/test/e2e/note.ts (follow)
Commit message (Collapse)AuthorAgeFilesLines
* clarify comment about MAX_NOTE_TEXT_LENGTH in testsHazel K2024-10-261-1/+1
|
* separate character limits for local and remote notesHazel K2024-10-261-1/+3
|
* test(backend): kill many `any` in backend test (partial) (#14054)Kisaragi2024-07-141-29/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kill any on utils:api * kill any on timeline test * use optional chain to kill TS2532 on timeline test 変更前: 該当ノートが見つからなければundefinedに対するプロパティアクセスとしてテストがクラッシュ 変更後: 該当ノートが見つからなければoptional chainがundefinedとして評価されるが、strictEqualの右辺がnon-nullableなためアサーションに失敗しテストがクラッシュ * kill `as any` for ApMfmService * kill argument any for api-visibility * kill argument any across a few tests * do not return value that has yielded from `await`-ing `Promise<void>` * force cast * runtime non-null assertion to coerce * rewrite `assert.notEqual(expr, null)` to `assert.ok(expr)` こうすることでassertion type扱いになり、non-nullableになる * change return type of `failedApiCall` to `void` 戻り値がどこにも使われていない * split bindings for exports.ts 型が合わなくて文句を言ってくるので適切に分割 * runtime non-null assertion * runtime non-null assertion * 何故かうまく行かないので、とりあえずXORしてみる * Revert "何故かうまく行かないので、とりあえずXORしてみる" This reverts commit 48cf32c930924840d0892af92d71b9437acb5844. * castAsErrorで安全ではないキャストを隠蔽 * 型アサーションの追加 * 型アサーションの追加 * 型アサーションの追加 * voidで値を返さない * castAsError * assert.ok => kill nullability * もはや明示的な型の指定は必要ない * castAsError * castAsError * 型アサーションの追加 * nullableを一旦抑止 * 変数を分離して型エラーを排除 * 不要なプロパティを削除する処理を隠蔽してanyを排除 * Repository type * simple type * assert.ok => kill nullability * revert `as any` drop reverts fe95c05b3f53266108128680d9358a3796844232 partialy * test: fix invalid assertion partially revert b99b7b5392d9d20c81dfee1346ba8b33ff9e1fbb * test: 52d8a54fc72b886fecb30a736b3ccf5057ea2a0c により型が合うようになった部分の`as any`を除去 * format * test: apply https://github.com/misskey-dev/misskey/pull/14054#discussion_r1672369526 (part 1) * test: use non-null assertion to suppress too many error * Update packages/backend/test/utils.ts Co-authored-by: anatawa12 <anatawa12@icloud.com> --------- Co-authored-by: anatawa12 <anatawa12@icloud.com>
* test(backend): goodbye, Lenna (#14111)Kisaragi2024-07-021-2/+2
|
* fix(backend): better `notes/translate` error response (#13631)zyoshoka2024-03-301-24/+83
| | | | | | | | | | | * fix(backend): better `notes/translate` error response * Update CHANGELOG.md * test(backend): perform administrative operations as `root` --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
* test(backend): enable typecheck by workflow (#13526)zyoshoka2024-03-071-4/+4
|
* test(backend): refactor tests (#13499)zyoshoka2024-03-031-84/+85
| | | | | * test(backend): refactor tests * fix: failed test
* メンションの最大数をロールごとに設定可能にする (#13343)Yuriha2024-02-291-0/+165
| | | | | | | | | | | | | | | | | | | | | * Add new role policy: maximum mentions per note * fix * Reviewを反映 * fix * Add ChangeLog * Update type definitions * Add E2E test * CHANGELOG に説明を追加 --------- Co-authored-by: taichan <40626578+tai-cha@users.noreply.github.com>
* fix(backend): ↵zyoshoka2024-02-291-0/+81
| | | | | | | | | ダイレクトなノートに対してはダイレクトでしか返信できないように (#13477) * fix(backend): ダイレクトなノートに対してはダイレクトでしか返信できないように * Update CHANGELOG.md * test(backend): `notes/create`とWebSocket関連のテストを追加
* (re) update SPDX-FileCopyrightTexttamaina2024-02-131-1/+1
| | | | Fix #13290
* Revert "update SPDX-FileCopyrightText"tamaina2024-02-131-1/+1
| | | | This reverts commit 9b5aeb76d8c9372d67058c512597152b6bf222f2.
* enhance: 禁止ワードはリモートノートも対象に (#13280)tamaina2024-02-131-2/+2
| | | Resolve #13279
* update SPDX-FileCopyrightTextsyuilo2024-02-121-1/+1
|
* fix: ↵おさむのひと2024-02-091-0/+73
| | | | | | | 特定文字列を含むノートを投稿できないようにする管理画面用設定項目を追加 (#13210) * fix: 特定文字列を含むノートを投稿できないようにする管理画面用設定項目を追加 * Serviceでチェックするように変更
* fix(backend): 虚無ノートを投稿できる問題の修正と `api.json` ↵zyoshoka2024-01-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | の OpenAPI Specification 3.1.0 への対応 (#12969) * fix(backend): `text: null`だけのノートは投稿できないように * add test * Update CHANGELOG.md * chore: bump OpenAPI Specification from 3.0.0 to 3.1.0 * chore: テストがすでにコメントで記述されていたのでそっちを使うことにする * fix test * fix(backend): prohibit posting whitespace-only notes * Update CHANGELOG.md * fix(backend): `renoteId`または`fileIds`(`mediaIds`)または`poll`が`null`でない場合に、`text が空白文字のみで構成されたリクエストになることを許可して、結果は`text: null`を返すように * test(backend): 引用renoteで空白文字のみで構成されたtextにするとレスポンスが`text: null`になることをチェックするテストを追加 * fix(frontend): `text`が`null`であって`renoteId`と`replyId`が`null`でないようなノートは引用リノートとして表示するように * fix(misskey-js): OpenAPI 3.1に対応 * fix(misskey-js): 型生成をOpenAPI Specification 3.1.0に対応 * fix(ci): `validate-api.json`をOpenAPI Specification 3.1.0に対応 * fix(ci): スキーマ書き換えの際のミスを修正 * Revert "fix(frontend): `text`が`null`であって`renoteId`と`replyId`が`null`でないようなノートは引用リノートとして表示するように" This reverts commit a9ca55343df6ea1679599acbc4801f78aa3a242b. * fix(misskey-js): `build-misskey-js-with-types`時は`api.json`のGETをスキップするように * Revert "fix(misskey-js): `build-misskey-js-with-types`時は`api.json`のGETをスキップするように" This reverts commit 865458989f9ddacc38d1bb3743a41ea828dbf324. * fix(misskey-js): `openapi-parser`で`validate`のかわりに`parse`を用いるように * Update CHANGELOG.md
* enhance(backend): テストの高速化 (#12939)おさむのひと2024-01-081-8/+1
| | | | | | | | | | | * enhance(backend): テストの高速化 * add ls * 自動的にマージされるようなので不要 * 起動方法を揃える * fix test
* fix(misskey-js): ↵おさむのひと2024-01-031-2/+2
| | | | | | | | | | | | | | | | | /signupと/signinの定義を作成してフロントの型エラーを抑制する (#12846) * fix(misskey-js): /signupと/signinの定義を復活してフロントの型エラーを抑制する * fix ci * fix ci * fix * fix --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com>
* refactor(backend): update directory structure for modelssyuilo2023-09-201-1/+1
|
* refactor: prefix Mi for all entities (#11719)syuilo2023-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | * wip * wip * wip * wip * Update RepositoryModule.ts * wip * wip * wip * Revert "wip" This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
* chore: ↵Shun Sakai2023-07-271-9/+12
| | | | | | | | | | | | | | 著作権とライセンスについての情報を各ファイルに追加する (#11348) * chore: Add the SPDX information to each file Add copyright and licensing information as defined in version 3.0 of the REUSE Specification. * tweak format --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor: ↵猫ロキP@deflis2023-07-271-2/+3
| | | | | | | forkでデフォルトのノート文字数を変更した場合、E2Eテストが落ちる問題を修正する (#11366) * forkでデフォルトのノート文字数を変更した場合このテストが落ちる問題を修正する * 文字数についてのコメントを追加しておく
* chore(backend, misskey-js): add type for signup (#11043)Kagami Sascha Rosylight2023-06-251-3/+4
| | | | | * chore(backend, misskey-js): add type for signup * rerun
* センシティブワードを正規表現、CWにも適用するように ↵nenohi2023-05-101-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#10688) * cwにセンシティブが効いてない * CWが無いときにTextを見るように * 比較演算子間違えた * とりあえずチェック * 正規表現対応 * /test/giにも対応 * matchでしなくてもいいのでは感 * レビュー修正 * Update packages/backend/src/core/NoteCreateService.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * Update packages/backend/src/core/NoteCreateService.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * 修正 * wipかも * wordsでスペース区切りのものできたかも * なんか動いたかも * test作成 * 文言の修正 * 修正 * note参照 --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
* ロールにNSFWを強制的につけるオプションを追加 (#10731)nenohi2023-05-051-0/+66
| | | | | | | | | | | | | | | | | | | | | * ロールにNSFWを強制的につけるオプションを追加 * すでにあるファイルにNSFWが付与できない * NSFWを付与しようとするとエラーに * add test * Update packages/backend/src/core/RoleService.ts Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> * spacingで怒られたので * ロール作成時のプロパティ削除 --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor(test): rename variable for INestApplicationContextsyuilo2023-03-121-3/+3
|
* fix(backend/ApRendererService): allow announces with visibility: followers ↵Kagami Sascha Rosylight2023-03-121-0/+25
| | | | | | | | | | | (#10291) * fix(backend/ApRendererService): allow announces with visibility: followers * Update CHANGELOG.md --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* fix(server): DriveFile related N+1 query when call note packMany (again) ↵rinsuki2023-03-041-1/+117
| | | | | | | | | | | | | | | | | | | | | (#10190) * Revert "Revert "fix(server): DriveFile related N+1 query when call note packMany (#10133)"" This reverts commit a7c82eeabcc732e76c5c358c98812cac8457d57f. * packManyByIdsMap: 存在チェックをしてなかったものは null を入れるように * Note.packMany で reply とか renote がもうあったらそのファイルも引く * テストを書く * fix test * fix test * fix test * fix test
* test(backend): APIテストの復活 (#10163)Kagami Sascha Rosylight2023-03-031-0/+370
* Revert 1c5291f8185651c231903129ee7c1cee263f9f03 * APIテストの復活 * apiテストの移行 * moduleNameMapper修正 * simpleGetでthrowしないように status確認しているので要らない * longer timeout * ローカルでは問題ないのになんで * case sensitive * Run Nest instance within the current process * Skip some setIntervals * wait for 5 seconds * kill them all!! * logHeapUsage: true * detectOpenHandlesがじゃましているらしい * maxWorkers=1? * restore drive api tests * workerIdleMemoryLimit: 500MB * 1024MiB * Wait what