mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-10 23:32:56 +03:00
tests: fix custom claims test data
This commit is contained in:
@@ -80,12 +80,12 @@ test('Update user group custom claims', async ({ page }) => {
|
||||
// Add two custom claims
|
||||
await page.getByRole('button', { name: 'Add custom claim' }).click();
|
||||
|
||||
await page.getByPlaceholder('Key').fill('custom_claim_1');
|
||||
await page.getByPlaceholder('Value').fill('custom_claim_1_value');
|
||||
await page.getByPlaceholder('Key').fill('customClaim1');
|
||||
await page.getByPlaceholder('Value').fill('customClaim1_value');
|
||||
|
||||
await page.getByRole('button', { name: 'Add another' }).click();
|
||||
await page.getByPlaceholder('Key').nth(1).fill('custom_claim_2');
|
||||
await page.getByPlaceholder('Value').nth(1).fill('custom_claim_2_value');
|
||||
await page.getByPlaceholder('Key').nth(1).fill('customClaim2');
|
||||
await page.getByPlaceholder('Value').nth(1).fill('customClaim2_value');
|
||||
|
||||
await page.getByRole('button', { name: 'Save' }).nth(2).click();
|
||||
|
||||
@@ -94,10 +94,10 @@ test('Update user group custom claims', async ({ page }) => {
|
||||
await page.reload();
|
||||
|
||||
// Check if custom claims are saved
|
||||
await expect(page.getByPlaceholder('Key').first()).toHaveValue('custom_claim_1');
|
||||
await expect(page.getByPlaceholder('Value').first()).toHaveValue('custom_claim_1_value');
|
||||
await expect(page.getByPlaceholder('Key').nth(1)).toHaveValue('custom_claim_2');
|
||||
await expect(page.getByPlaceholder('Value').nth(1)).toHaveValue('custom_claim_2_value');
|
||||
await expect(page.getByPlaceholder('Key').first()).toHaveValue('customClaim1');
|
||||
await expect(page.getByPlaceholder('Value').first()).toHaveValue('customClaim1_value');
|
||||
await expect(page.getByPlaceholder('Key').nth(1)).toHaveValue('customClaim2');
|
||||
await expect(page.getByPlaceholder('Value').nth(1)).toHaveValue('customClaim2_value');
|
||||
|
||||
// Remove one custom claim
|
||||
await page.getByLabel('Remove custom claim').first().click();
|
||||
@@ -106,6 +106,6 @@ test('Update user group custom claims', async ({ page }) => {
|
||||
await page.reload();
|
||||
|
||||
// Check if custom claim is removed
|
||||
await expect(page.getByPlaceholder('Key').first()).toHaveValue('custom_claim_2');
|
||||
await expect(page.getByPlaceholder('Value').first()).toHaveValue('custom_claim_2_value');
|
||||
await expect(page.getByPlaceholder('Key').first()).toHaveValue('customClaim2');
|
||||
await expect(page.getByPlaceholder('Value').first()).toHaveValue('customClaim2_value');
|
||||
});
|
||||
|
||||
@@ -140,12 +140,12 @@ test('Update user custom claims', async ({ page }) => {
|
||||
// Add two custom claims
|
||||
await page.getByRole('button', { name: 'Add custom claim' }).click();
|
||||
|
||||
await page.getByPlaceholder('Key').fill('custom_claim_1');
|
||||
await page.getByPlaceholder('Value').fill('custom_claim_1_value');
|
||||
await page.getByPlaceholder('Key').fill('customClaim1');
|
||||
await page.getByPlaceholder('Value').fill('customClaim1_value');
|
||||
|
||||
await page.getByRole('button', { name: 'Add another' }).click();
|
||||
await page.getByPlaceholder('Key').nth(1).fill('custom_claim_2');
|
||||
await page.getByPlaceholder('Value').nth(1).fill('custom_claim_2_value');
|
||||
await page.getByPlaceholder('Key').nth(1).fill('customClaim2');
|
||||
await page.getByPlaceholder('Value').nth(1).fill('customClaim2_value');
|
||||
|
||||
await page.getByRole('button', { name: 'Save' }).nth(1).click();
|
||||
|
||||
@@ -154,10 +154,10 @@ test('Update user custom claims', async ({ page }) => {
|
||||
await page.reload();
|
||||
|
||||
// Check if custom claims are saved
|
||||
await expect(page.getByPlaceholder('Key').first()).toHaveValue('custom_claim_1');
|
||||
await expect(page.getByPlaceholder('Value').first()).toHaveValue('custom_claim_1_value');
|
||||
await expect(page.getByPlaceholder('Key').nth(1)).toHaveValue('custom_claim_2');
|
||||
await expect(page.getByPlaceholder('Value').nth(1)).toHaveValue('custom_claim_2_value');
|
||||
await expect(page.getByPlaceholder('Key').first()).toHaveValue('customClaim1');
|
||||
await expect(page.getByPlaceholder('Value').first()).toHaveValue('customClaim1_value');
|
||||
await expect(page.getByPlaceholder('Key').nth(1)).toHaveValue('customClaim2');
|
||||
await expect(page.getByPlaceholder('Value').nth(1)).toHaveValue('customClaim2_value');
|
||||
|
||||
// Remove one custom claim
|
||||
await page.getByLabel('Remove custom claim').first().click();
|
||||
@@ -166,6 +166,6 @@ test('Update user custom claims', async ({ page }) => {
|
||||
await page.reload();
|
||||
|
||||
// Check if custom claim is removed
|
||||
await expect(page.getByPlaceholder('Key').first()).toHaveValue('custom_claim_2');
|
||||
await expect(page.getByPlaceholder('Value').first()).toHaveValue('custom_claim_2_value');
|
||||
await expect(page.getByPlaceholder('Key').first()).toHaveValue('customClaim2');
|
||||
await expect(page.getByPlaceholder('Value').first()).toHaveValue('customClaim2_value');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user