プロジェクト

全般

プロフィール

Vote #80656

完了

CSS selector in test_index_should_show_warning_when_no_workflow_is_defined is too specific

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
低め
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
152
issue_org_id:
32927
author_id:
88801
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Hi
Just a tiny patch which makes a test less specific. This way, a plugin can add columns to the table without breaking core tests.
Thank you


journals

Plugins often break core tests. Should we relax tests every time a plugin the test suite?
--------------------------------------------------------------------------------
No, we should not ;) But I think this specific test is too precise. It will break as soon as the table is modified, even if the tested function has not changed.

But feel free to close my issue if you prefer to not update the current tests.
--------------------------------------------------------------------------------
I am not in favor of accepting this patch as it is for the following reasons:

* If the patch is accepted, many plugin developers may request to loosen tests only to fix test failures caused by their plugins
* There are some other "@:nth-of-type@" in the test suite. Changing only one place makes the test inconsistent

However, I think it is OK to change "@td:nth-of-type(3)@" to "@td.CLASS_NAME@" instead of loosening the tests.

--------------------------------------------------------------------------------
Go MAEDA wrote:
> I am not in favor of accepting this patch as it is for the following reasons:
>
> * If the patch is accepted, many plugin developers may request to loosen tests only to fix test failures caused by their plugins
> * There are some other "@:nth-of-type@" in the test suite. Changing only one place makes the test inconsistent
>
> However, I think it is OK to change "@td:nth-of-type(3)@" to "@td.CLASS_NAME@" instead of loosening the tests.

I have changed my mind.

I just noticed that the message to test can be specified by @span.icon-warning@. Now I think the current code is too strict and there is no problem to merge the suggested patch.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the patch. Thank you.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリCode cleanup/refactoring_30 にセット
  • 対象バージョン4.2.0_152 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0