From 535da24bac50046a356c83914167678cab112aac Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Tue, 23 Jun 2026 00:17:28 +0900 Subject: [PATCH] test: assert recruiting locators are visible instead of defined The navigator flow checked vacancy and applicant text with expect(locator).toBeDefined(). A Playwright Locator is always defined, so those assertions passed whether or not the text rendered. navigateToVacanciesAndCheckSoftwareEngineer had no other assertion, so a missing "Software Engineer" vacancy or "APP-1" applicant would still pass. Switch the three checks to web-first toBeVisible() so they wait for and verify the text the method name promises to check. --- tests/sanity/tests/model/recruiting/recruiting-page.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sanity/tests/model/recruiting/recruiting-page.ts b/tests/sanity/tests/model/recruiting/recruiting-page.ts index 26fb4051042..69f1b1d6d3a 100644 --- a/tests/sanity/tests/model/recruiting/recruiting-page.ts +++ b/tests/sanity/tests/model/recruiting/recruiting-page.ts @@ -118,7 +118,7 @@ export class RecruitingPage { async checkApplicationsVisibility (): Promise { await this.applicationsLink().click() await expect(this.page.locator('text=Applications >> nth=1')).toBeVisible() - expect(this.page.locator('text="APP-1"')).toBeDefined() + await expect(this.page.locator('text="APP-1"')).toBeVisible() } async verifyTalentSection (): Promise { @@ -129,8 +129,8 @@ export class RecruitingPage { async navigateToVacanciesAndCheckSoftwareEngineer (): Promise { await this.vacanciesLink().click() await this.softwareEngineerLink().click() - expect(this.page.locator('text=Software Engineer')).toBeDefined() - expect(this.page.locator('text="APP-1"')).toBeDefined() + await expect(this.page.locator('text=Software Engineer')).toBeVisible() + await expect(this.page.locator('text="APP-1"')).toBeVisible() } async navigateToGeneralChatAndContacts (): Promise {