From 903efc54009367868303715735e6b68f77907e5f Mon Sep 17 00:00:00 2001 From: Anna No Date: Thu, 2 Jun 2022 23:54:27 +0700 Subject: [PATCH] Add recruit contact info ut (#1987) Signed-off-by: Anna No --- .../src/components/Activity.svelte | 4 ++-- tests/sanity/tests/recruit.spec.ts | 20 ++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/plugins/activity-resources/src/components/Activity.svelte b/plugins/activity-resources/src/components/Activity.svelte index 94f97d8881..45f8f898db 100644 --- a/plugins/activity-resources/src/components/Activity.svelte +++ b/plugins/activity-resources/src/components/Activity.svelte @@ -71,7 +71,7 @@ {/if}
-
+
{#if txes} {#each txes as tx} @@ -101,7 +101,7 @@
{/if} -
+
{#if txes} {#each txes as tx} diff --git a/tests/sanity/tests/recruit.spec.ts b/tests/sanity/tests/recruit.spec.ts index eae41654cb..d6e9c07e28 100644 --- a/tests/sanity/tests/recruit.spec.ts +++ b/tests/sanity/tests/recruit.spec.ts @@ -19,6 +19,8 @@ test.describe('recruit tests', () => { const first = 'Elton-' + generateId(4) const last = 'John-' + generateId(4) + const loc = 'Cupertino' + const email = 'ej@test.com' const firstName = page.locator('[placeholder="John"]') await firstName.click() @@ -34,9 +36,25 @@ test.describe('recruit tests', () => { const location = page.locator('[placeholder="Location"]') await location.click() - await location.fill('Cupertino') + await location.fill(loc) + + await page.locator('[id="presentation\\:string\\:AddSocialLinks"]').click() + await page.locator('.antiPopup').locator('text=Email').click() + const emailInput = page.locator('[placeholder="john\\.appleseed@apple\\.com"]') + await emailInput.fill(email) + await emailInput.press('Enter') await page.locator('.antiCard').locator('button:has-text("Create")').click() + + await page.click(`text="${first} ${last}"`) + + await expect(page.locator(`text=${first}`).first()).toBeVisible() + await expect(page.locator(`text=${last}`).first()).toBeVisible() + await expect(page.locator(`text=${loc}`).first()).toBeVisible() + + const activity = page.locator('[id="activity\\:string\\:Activity"]') + await activity.locator('[id="gmail\\:string\\:Email"]').hover() + await expect(page.locator(`text=${email}`).first()).toBeVisible() }) test('create-application', async ({ page }) => {