2022-03-29 21:53:07 +08:00
|
|
|
const { default: test } = require('@playwright/test');
|
2021-11-30 02:39:52 +08:00
|
|
|
const Page = require('../core/page');
|
2022-03-29 21:53:07 +08:00
|
|
|
const { getSettings } = require('../core/settings');
|
2021-12-02 12:12:14 +08:00
|
|
|
const { startSharedNotes } = require('./util');
|
2021-11-30 02:39:52 +08:00
|
|
|
|
|
|
|
class SharedNotes extends Page {
|
|
|
|
constructor(browser, page) {
|
|
|
|
super(browser, page);
|
|
|
|
}
|
|
|
|
|
|
|
|
async openSharedNotes() {
|
2022-03-29 21:53:07 +08:00
|
|
|
const { sharedNotesEnabled } = getSettings();
|
|
|
|
test.fail(!sharedNotesEnabled, 'Shared notes is disabled');
|
2021-12-02 12:12:14 +08:00
|
|
|
await startSharedNotes(this);
|
2021-11-30 02:39:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-04 01:01:36 +08:00
|
|
|
exports.SharedNotes = SharedNotes;
|