DEV: Fix flaky `tags-test` (#16410)

The test was dependent on a translation string. Under certain seeds, the translation string for `{{category-drop}}`'s `noCategoriesLabel` is broken. This is because the value is calculated the first time a `{{category-drop}}` is rendered during the suite. If that first time happens to be during a test which is messing with `I18n.translations`, then it will cache a broken value. Maybe this should be fixed in a future commit... but for now moving to `data-value` will make the `tags-test` more robust and will stop the flakiness.
This commit is contained in:
David Taylor 2022-04-07 14:39:52 +01:00 committed by GitHub
parent 9d9d13abf9
commit e22acaa565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -499,7 +499,7 @@ acceptance("Tag info", function (needs) {
await click(".category-breadcrumb li:nth-of-type(2) .category-drop-header");
await click(
'.category-breadcrumb li:nth-of-type(2) .category-row[data-name="none"]'
'.category-breadcrumb li:nth-of-type(2) .category-row[data-value="no-categories"]'
);
assert.strictEqual(currentURL(), "/tags/c/feature/2/none/planters");
});