Skip to content

Commit

Permalink
the url argument is not required
Browse files Browse the repository at this point in the history
  • Loading branch information
kkalev committed Nov 27, 2023
1 parent 621359c commit fb37262
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions gunet.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ exports.assertNoTicketGrantingCookie = async (page) => {
assert(tgc.length === 0);
}

exports.casLogin = async (page, url, user, password, cas_type = "cas") => {
console.log(`Going to ${url}`);
await page.goto(url);
exports.casLogin = async (page, user, password, cas_type = "cas") => {
await page.waitForTimeout(1000)
await this.loginWith(page, user, password);
await this.assertTicketGrantingCookie(page);
Expand Down
3 changes: 2 additions & 1 deletion login.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ console.log(url[0]);
(async () => {
const browser = await puppeteer.launch(gunet.browserOptions());
const page = await gunet.newPage(browser);
await gunet.casLogin(page, url[0], `${process.env.CAS_USER}`,
await page.goto(url);
await gunet.casLogin(page, `${process.env.CAS_USER}`,
`${process.env.CAS_PASSWORD}`,`${process.env.CAS_TYPE}`);
await browser.close();
})();

0 comments on commit fb37262

Please sign in to comment.