const fs = require('node:fs'); describe('Profile', () => { it('loads profile details', async () => { await device.launchApp({newInstance: true}); await element(by.id('profileTab')).tap(); await expect(element(by.id('profileName'))).toBeVisible(); const screenshotPath = await device.takeScreenshot('profile-ready'); expect(fs.existsSync(screenshotPath)).toBe(true); }); });