1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Mobile: Resolves #10592: Make mobile plugin settings screen UI closer to desktop (#10598)

This commit is contained in:
Henry Heino
2024-06-15 02:00:21 -07:00
committed by GitHub
parent a4a4170d49
commit e465b45d6e
13 changed files with 248 additions and 186 deletions

View File

@ -47,11 +47,6 @@ const loadMockPlugin = async (id: string, name: string, version: string, pluginS
});
};
const showInstalledTab = async () => {
const installedTab = await screen.findByText('Installed plugins');
await userEvent.press(installedTab);
};
const abcPluginId = 'org.joplinapp.plugins.AbcSheetMusic';
const backlinksPluginId = 'joplin.plugin.ambrt.backlinksToNote';
@ -99,7 +94,6 @@ describe('PluginStates.installed', () => {
store={reduxStore}
/>,
);
await showInstalledTab();
expect(await screen.findByText(/^ABC Sheet Music/)).toBeVisible();
expect(await screen.findByText(/^Backlinks to note/)).toBeVisible();
@ -129,7 +123,6 @@ describe('PluginStates.installed', () => {
store={reduxStore}
/>,
);
await showInstalledTab();
const abcSheetMusicCard = await screen.findByText(/^ABC Sheet Music/);
expect(abcSheetMusicCard).toBeVisible();
@ -150,7 +143,7 @@ describe('PluginStates.installed', () => {
);
// Initially, no plugins should be installed
expect(screen.queryByText(/^You currently have 0 plugins? installed/)).toBeNull();
expect(screen.queryByText('Installed (0):')).toBeNull();
const testPluginId1 = 'org.joplinapp.plugins.AbcSheetMusic';
const testPluginId2 = 'org.joplinapp.plugins.test.plugin.id';
@ -158,8 +151,6 @@ describe('PluginStates.installed', () => {
await act(() => loadMockPlugin(testPluginId2, 'A test plugin', '1.0.0', pluginSettings));
expect(PluginService.instance().plugins[testPluginId1]).toBeTruthy();
await showInstalledTab();
// Should update the list of installed plugins even though the plugin settings didn't change.
expect(await screen.findByText(/^ABC Sheet Music/)).toBeVisible();
expect(await screen.findByText(/^A test plugin/)).toBeVisible();
@ -184,7 +175,6 @@ describe('PluginStates.installed', () => {
store={reduxStore}
/>,
);
await showInstalledTab();
const card = await screen.findByText('ABC Sheet Music');
const user = userEvent.setup();
@ -226,7 +216,6 @@ describe('PluginStates.installed', () => {
store={reduxStore}
/>,
);
await showInstalledTab();
// Open the plugin dialog
const card = await screen.findByText('ABC Sheet Music');
@ -279,7 +268,6 @@ describe('PluginStates.installed', () => {
store={reduxStore}
/>,
);
await showInstalledTab();
// Should be shown as installed.
const card = await screen.findByText('ABC Sheet Music');