mirror of
https://github.com/standardnotes/mobile.git
synced 2026-05-24 06:24:31 -04:00
More e2e testing on the Export Data feature
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const moment = require('moment');
|
||||
|
||||
describe('Export Data', () => {
|
||||
beforeEach(async () => {
|
||||
await device.reloadReactNative();
|
||||
@@ -18,4 +20,20 @@ describe('Export Data', () => {
|
||||
await device.pressBack();
|
||||
await expect(element(by.id('exportData-title'))).toHaveText('Export Data');
|
||||
});
|
||||
|
||||
it('should export decrypted notes', async () => {
|
||||
await expect(element(by.id('exportData-option-decrypted'))).toBeVisible();
|
||||
await element(by.id('exportData-option-decrypted')).tap();
|
||||
await element(by.text('SAVE TO DISK')).tap();
|
||||
|
||||
const lastExportDate = new Date();
|
||||
|
||||
await element(by.text('DONE')).tap();
|
||||
await expect(element(by.id('exportData-title'))).toHaveText('Export Data');
|
||||
|
||||
const formattedDate = moment(lastExportDate).format('lll');
|
||||
const lastExportString = `Last exported on ${formattedDate}`;
|
||||
|
||||
await expect(element(by.id('lastExportDate-text'))).toHaveText(lastExportString);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user