File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ describe("Login", () => {
10
10
await urlChanger . moveToLoginURL ( ) ;
11
11
12
12
// then
13
- expect ( pageSpy ) . toHaveBeenCalledWith (
14
- "https://nid.naver.com/nidlogin.login"
15
- ) ;
13
+ expect ( pageSpy ) . toHaveBeenCalledWith ( urlChanger . loginURL ) ;
16
14
} ) ;
17
15
} ) ;
18
16
@@ -28,8 +26,6 @@ describe("PaymentHistory", () => {
28
26
await urlChanger . moveToPaymentHistoryURL ( ) ;
29
27
30
28
// then
31
- expect ( pageSpy ) . toHaveBeenCalledWith (
32
- "https://new-m.pay.naver.com/historybenefit/paymenthistory"
33
- ) ;
29
+ expect ( pageSpy ) . toHaveBeenCalledWith ( urlChanger . paymentHistoryURL ) ;
34
30
} ) ;
35
31
} ) ;
Original file line number Diff line number Diff line change @@ -2,19 +2,20 @@ import puppeteer from "puppeteer";
2
2
3
3
export default class URLChanger {
4
4
private readonly page : puppeteer . Page ;
5
+ loginURL = "https://nid.naver.com/nidlogin.login" ;
6
+ paymentHistoryURL =
7
+ "https://new-m.pay.naver.com/historybenefit/paymenthistory" ;
5
8
6
9
constructor ( page : puppeteer . Page ) {
7
10
this . page = page ;
8
11
}
9
12
10
13
async moveToLoginURL ( ) {
11
- await this . page . goto ( "https://nid.naver.com/nidlogin.login" ) ;
14
+ await this . page . goto ( this . loginURL ) ;
12
15
}
13
16
14
17
async moveToPaymentHistoryURL ( ) {
15
- await this . page . goto (
16
- "https://new-m.pay.naver.com/historybenefit/paymenthistory"
17
- ) ;
18
+ await this . page . goto ( this . paymentHistoryURL ) ;
18
19
await this . page . waitForSelector ( "div[class^='paymentHistory_section__']" ) ;
19
20
}
20
21
}
You can’t perform that action at this time.
0 commit comments