Skip to content

Commit 34aa60d

Browse files
committed
coveragePathIgnorePatternspageInteractor 추가
1 parent 691f21e commit 34aa60d

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"preset": "jest-puppeteer",
2222
"coveragePathIgnorePatterns": [
2323
"dist/",
24-
"elementParser.ts"
24+
"elementParser.ts",
25+
"pageInteractor.ts"
2526
],
2627
"testPathIgnorePatterns": [
2728
"dist/"

src/app/naver/pageInteractor.test.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,12 @@ describe("Login", () => {
516516
const module = ModuleFactory.create(page);
517517
const pageInteractor = module.pageInteractor;
518518

519+
module.urlChanger.loginURL = "https://example.com";
519520
await module.urlChanger.moveToLoginURL();
520521
await page.setContent(loginHTML);
521522

523+
await page.waitForSelector("#log\\.login");
524+
522525
await page.evaluate((loginURL: string) => {
523526
// make login button to do nothing
524527
const loginButton = document.querySelector("#log\\.login");
@@ -538,12 +541,7 @@ describe("Login", () => {
538541
await page.setContent(manualOTPHTML);
539542

540543
// when
541-
const loginStatus$ = interval(500).pipe(
542-
mergeMap(() => pageInteractor.getLoginStatus())
543-
);
544-
const firstEvent = await firstValueFrom(loginStatus$);
545-
546-
// then
547-
expect(firstEvent).toEqual("manual-otp-required");
544+
const status = await pageInteractor.getLoginStatus();
545+
expect(status).toBe("manual-otp-required");
548546
});
549547
});

0 commit comments

Comments
 (0)