update the start script

This commit is contained in:
Harsh Gupta 2024-08-26 17:36:54 +05:30
parent 66183d8216
commit 6309cbd7a0
3 changed files with 27 additions and 3 deletions

View File

@ -591,8 +591,30 @@ document.addEventListener('load', handlePageLoad);
);
}
});
try {
console.log('Waiting for Sign Out link');
await page.waitForSelector('a[href="/signout"]', { timeout: 10000 });
console.log('Sign Out link found');
} catch (error) {
this.logger.warn(`Timed out waiting for Sign Out link: ${error}`);
}
try {
console.log('Clicking on #getOwnerDetails');
await page.click('#getOwnerDetails');
console.log('Clicked on #getOwnerDetails');
// console.log('Waiting for Phone No span to appear');
// await page.waitForSelector('span:contains("Phone No :")', { timeout: 10000 });
// console.log('Phone No span appeared');
} catch (error) {
this.logger.warn(`Error during click or wait operation: ${error}`);
}
let waitForPromise: Promise<any> | undefined;
if (options?.waitForSelector) {
console.log('Waiting for selector', options.waitForSelector);
const t0 = Date.now();
waitForPromise = nextSnapshotDeferred.promise.then(() => {
const t1 = Date.now();

View File

@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "ts-node src/server.ts"
"start": "cd backend/functions && npx nodemon --watch ./src --exec \"npm run build && node build/server.js\"",
"build": "tsc"
},
"author": "",
"license": "ISC",
@ -13,7 +14,8 @@
"firebase-tools": "^12.4.2",
"typescript": "^5.1.6",
"@types/express": "^4.17.17",
"ts-node": "^10.9.1"
"ts-node": "^10.9.1",
"nodemon": "^2.0.22"
},
"dependencies": {
"express": "^4.17.1",