SkyeYoung commented on code in PR #3281:
URL: https://github.com/apache/apisix-dashboard/pull/3281#discussion_r2681819554
##########
e2e/tests/secrets.crud-all-fields.spec.ts:
##########
@@ -78,13 +84,13 @@ test.describe('CRUD secret with all fields (AWS)', () => {
await row.getByRole('button', { name: 'View' }).click();
await secretsPom.isDetailPage(page);
- const pageContent = await page.textContent('body');
- expect(pageContent).toContain('Secret Manager');
+ // Wait for the form to be loaded by checking for the ID field
await
expect(page.locator('input[name="id"]')).toHaveValue(createdSecretId);
- // Verify AWS-specific fields are present (labels)
- expect(pageContent).toContain('Access Key ID');
- expect(pageContent).toContain('Secret Access Key');
- expect(pageContent).toContain('Region');
+
+ // Wait for AWS-specific fields to be visible
+ await expect(page.getByLabel('Access Key ID')).toBeVisible();
+ await expect(page.getByLabel('Secret Access Key')).toBeVisible();
+ await expect(page.getByLabel('Region')).toBeVisible();
Review Comment:
improve stability
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]