Skip to content

Commit

Permalink
fixed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayaktorus committed Jun 10, 2024
1 parent af497ad commit 4449b68
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion index.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const indexConfig: PlaywrightTestConfig = {
// reporter: process.env.CI
// ? [["@reportportal/agent-js-playwright", RPconfig]]
// : [["html"]],
reporter: process.env.CI ? [["html"]] : [["html"]],
//reporter: process.env.CI ? [["html"]] : [["html"]],
use: {
// Emulate browsing in San Francisco, CA, USA
locale: "en-GB",
Expand Down
5 changes: 0 additions & 5 deletions openloginV4/login-with-passwordless/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,9 @@ test.describe.serial("Passwordless Login scenarios", () => {
await page.waitForURL(`${demoAppUrl}`, {
timeout: 3 * 60 * 1000,
});
console.log("step 1");
expect(page.url()).toBe(`${demoAppUrl}`);
console.log("step 1+");
const accountsPage = new AccountsPage(page);
const keys: string | null = await accountsPage.getOpenLoginState();
console.log("step 1++");
if (keys !== null) {
const jsonObject = JSON.parse(keys);
privKey = jsonObject.privKey;
Expand All @@ -150,9 +147,7 @@ test.describe.serial("Passwordless Login scenarios", () => {
expect(idToken).not.toBeUndefined();
expect(privKey).not.toBeNull();
expect(privKey).not.toBeUndefined();
console.log("step 2");
if (platform == "mainnet") {
console.log("step 3");
await page.goto(demoAppUrlV4);
await signInWithEmailWithTestEmailOnDemoApp(
page,
Expand Down
2 changes: 0 additions & 2 deletions openloginV4/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,9 @@ async function signInWithEmailWithTestEmailOnDemoApp(
await page.waitForSelector("text=Verify your email");
await delay(5000);
let inbox;
console.log(1);
// Setup our JSON API endpoint
const ENDPOINT = `https://api.testmail.app/api/json?apikey=${testEmailAppApiKey}&namespace=kelg8`;
const res = await axios.get(`${ENDPOINT}&tag=${tag}&livequery=true`);
console.log(2);
inbox = await res.data;
const href = inbox.emails[0].html.match(/href="([^"]*)/)[1];
const context2 = await browser.newContext();
Expand Down

0 comments on commit 4449b68

Please sign in to comment.