mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 01:45:59 +00:00
filter model test
This commit is contained in:
@@ -8,4 +8,18 @@ describe('Data browser data', () => {
|
|||||||
cy.contains('Let There Be Rock');
|
cy.contains('Let There Be Rock');
|
||||||
cy.contains('Rows: 347');
|
cy.contains('Rows: 347');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Filter model', () => {
|
||||||
|
cy.visit('http://localhost:3000');
|
||||||
|
|
||||||
|
cy.contains('MySql-connection').click();
|
||||||
|
cy.contains('Chinook').click();
|
||||||
|
cy.testid('SqlObjectList_search').clear().type('album');
|
||||||
|
cy.contains('347 rows, InnoDB');
|
||||||
|
cy.testid('SqlObjectList_searchMenuDropDown').click();
|
||||||
|
cy.contains('Column name').click();
|
||||||
|
cy.contains('AlbumId');
|
||||||
|
cy.contains('Column name').click();
|
||||||
|
cy.contains('AlbumId').should('not.exist');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,6 +33,13 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<InlineButton {square} {narrow} on:click={handleClick} bind:this={domButton} {disabled}>
|
<InlineButton
|
||||||
|
{square}
|
||||||
|
{narrow}
|
||||||
|
on:click={handleClick}
|
||||||
|
bind:this={domButton}
|
||||||
|
{disabled}
|
||||||
|
data-testid={$$props['data-testid']}
|
||||||
|
>
|
||||||
<FontIcon icon={isLoading ? 'icon loading' : icon} />
|
<FontIcon icon={isLoading ? 'icon loading' : icon} />
|
||||||
</InlineButton>
|
</InlineButton>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
on:keydown={handleKeyDown}
|
on:keydown={handleKeyDown}
|
||||||
bind:this={domInput}
|
bind:this={domInput}
|
||||||
on:focus={e => domInput.select()}
|
on:focus={e => domInput.select()}
|
||||||
|
data-testid={$$props['data-testid']}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -215,6 +215,7 @@
|
|||||||
onFocusFilteredList={() => {
|
onFocusFilteredList={() => {
|
||||||
domListHandler?.focusFirst();
|
domListHandler?.focusFirst();
|
||||||
}}
|
}}
|
||||||
|
data-testid="ConnectionList_search"
|
||||||
/>
|
/>
|
||||||
<CloseSearchButton bind:filter />
|
<CloseSearchButton bind:filter />
|
||||||
<DropDownButton
|
<DropDownButton
|
||||||
|
|||||||
@@ -214,6 +214,7 @@
|
|||||||
onFocusFilteredList={() => {
|
onFocusFilteredList={() => {
|
||||||
domListHandler?.focusFirst();
|
domListHandler?.focusFirst();
|
||||||
}}
|
}}
|
||||||
|
data-testid="SqlObjectList_search"
|
||||||
/>
|
/>
|
||||||
<CloseSearchButton bind:filter />
|
<CloseSearchButton bind:filter />
|
||||||
<DropDownButton
|
<DropDownButton
|
||||||
@@ -221,6 +222,7 @@
|
|||||||
menu={createSearchMenu}
|
menu={createSearchMenu}
|
||||||
square={!!filter}
|
square={!!filter}
|
||||||
narrow={false}
|
narrow={false}
|
||||||
|
data-testid="SqlObjectList_searchMenuDropDown"
|
||||||
/>
|
/>
|
||||||
{#if !filter}
|
{#if !filter}
|
||||||
<DropDownButton icon="icon plus-thick" menu={createAddMenu} />
|
<DropDownButton icon="icon plus-thick" menu={createAddMenu} />
|
||||||
|
|||||||
Reference in New Issue
Block a user