Kuadrant/kuadrant-console-plugin

E2E: Policy test comment mismatch

オープン

#769 opened on 2026/08/19

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (63 件のフォーク)auto 404
e2egood first issueteststriage/needs-triage

Repository metrics

Stars
 (10 個のスター)
PR merge metrics
 (平均マージ 2d 23h) (30d で 53 merged PRs)

説明

Description

Comment says "remove existing limit and add updated one" but the test code only adds a new updated limit. The test assertion only checks the new limit exists, not that default was removed.

Current Behaviour

// remove existing limit and add updated one  ← comment says "remove"
await page.getByRole('button', { name: 'Add Limit' }).click();
// ... adds 'updated' limit ...

expect(
  kubectl(['get', 'tokenratelimitpolicy', policyName, '-n', namespace, '-o', 'jsonpath={.spec.limits.updated.rates[0].limit}'])
).toBe('200');
// ❌ No assertion that 'default' was removed

Expected Behaviour

Option 1: Update comment to match behavior:

// add the updated limit; the form replaces previous limits on save

Option 2: Add assertion that old limit is gone:

expect(
  kubectl(['get', 'tokenratelimitpolicy', policyName, '-n', namespace, '-o', 'jsonpath={.spec.limits.default}'])
).toBe('');

Location

e2e/tests/policy-forms.spec.ts:818-845

Related

CodeRabbit comment in PR #734

コントリビューターガイド