Optimized agents rules subfolders, dependencies updates (#355)
* Update AGENTS.md and CLAUDE.md for improved clarity and structure * Added MCP Server * Added missing triggers to tables that should have used them * Updated all dependencies * Fixed rare bug in React present in the Admin layout which prevents navigating to pages (sometimes...)
This commit is contained in:
committed by
GitHub
parent
9fae142f2d
commit
533dfba5b9
@@ -130,7 +130,7 @@ test.describe('Admin', () => {
|
||||
),
|
||||
]);
|
||||
|
||||
await expect(page.getByText('Banned')).toBeVisible();
|
||||
await expect(page.getByText('Banned').first()).toBeVisible();
|
||||
|
||||
await page.context().clearCookies();
|
||||
|
||||
@@ -156,7 +156,7 @@ test.describe('Admin', () => {
|
||||
await page.fill('[placeholder="Type CONFIRM to confirm"]', 'CONFIRM');
|
||||
await page.getByRole('button', { name: 'Ban User' }).click();
|
||||
|
||||
await expect(page.getByText('Banned')).toBeVisible();
|
||||
await expect(page.getByText('Banned').first()).toBeVisible();
|
||||
|
||||
// Now reactivate
|
||||
await page.getByTestId('admin-reactivate-account-button').click();
|
||||
@@ -199,6 +199,7 @@ test.describe('Admin', () => {
|
||||
|
||||
test('impersonate user flow', async ({ page }) => {
|
||||
await page.getByTestId('admin-impersonate-button').click();
|
||||
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Impersonate User' }),
|
||||
).toBeVisible();
|
||||
@@ -394,14 +395,15 @@ async function filterAccounts(page: Page, email: string) {
|
||||
}
|
||||
|
||||
async function selectAccount(page: Page, email: string) {
|
||||
const link = page
|
||||
.locator('tr', { hasText: email.split('@')[0] })
|
||||
.locator('a');
|
||||
await expect(async () => {
|
||||
const link = page
|
||||
.locator('tr', { hasText: email.split('@')[0] })
|
||||
.locator('a');
|
||||
|
||||
await expect(link).toBeVisible();
|
||||
await expect(link).toBeVisible();
|
||||
|
||||
await link.click();
|
||||
await link.click();
|
||||
|
||||
await page.waitForURL(new RegExp(`/admin/accounts/[a-z0-9-]+`));
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForLoadState('networkidle');
|
||||
}).toPass();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Page, expect } from '@playwright/test';
|
||||
import { TOTP } from 'totp-generator';
|
||||
|
||||
import { Mailbox } from '../utils/mailbox';
|
||||
|
||||
@@ -50,7 +49,9 @@ export class AuthPageObject {
|
||||
async submitMFAVerification(key: string) {
|
||||
const period = 30;
|
||||
|
||||
const { otp } = TOTP.generate(key, {
|
||||
const { TOTP } = await import('totp-generator');
|
||||
|
||||
const { otp } = await TOTP.generate(key, {
|
||||
period,
|
||||
});
|
||||
|
||||
|
||||
@@ -59,13 +59,13 @@ export class InvitationsPageObject {
|
||||
navigateToMembers() {
|
||||
return expect(async () => {
|
||||
await this.page
|
||||
.locator('a', {
|
||||
hasText: 'Members',
|
||||
})
|
||||
.click();
|
||||
.locator('a', {
|
||||
hasText: 'Members',
|
||||
})
|
||||
.click();
|
||||
|
||||
await this.page.waitForURL('**/home/*/members');
|
||||
}).toPass()
|
||||
}).toPass();
|
||||
}
|
||||
|
||||
async openInviteForm() {
|
||||
@@ -127,6 +127,8 @@ export class InvitationsPageObject {
|
||||
});
|
||||
|
||||
await Promise.all([click, response]);
|
||||
|
||||
console.log('Invitation accepted');
|
||||
}
|
||||
|
||||
private getInviteForm() {
|
||||
|
||||
@@ -84,7 +84,9 @@ test.describe('Team Invitation with MFA Flow', () => {
|
||||
await invitations.acceptInvitation();
|
||||
|
||||
// Should be redirected to the team dashboard
|
||||
await page.waitForURL(`/home/${teamSlug}`);
|
||||
await page.waitForURL(`/home/${teamSlug}`, {
|
||||
timeout: 5_000,
|
||||
});
|
||||
|
||||
// Step 4: Verify membership was successful
|
||||
// Open account selector to verify team is available
|
||||
|
||||
Reference in New Issue
Block a user