Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1064,10 +1064,13 @@ describe('ConnectionsNavigationTree', function () {
const contextMenu = screen.getByTestId('context-menu');

// Check that write actions are not present in read-only mode
expect(() => within(contextMenu).getByText('Create collection')).to
.throw;
expect(() => within(contextMenu).getByText('Create database')).to.throw;
expect(() => within(contextMenu).getByText('Drop database')).to.throw;
expect(() =>
within(contextMenu).getByText('Create collection')
).to.throw();
expect(() =>
within(contextMenu).getByText('Create database')
).to.throw();
expect(() => within(contextMenu).getByText('Drop database')).to.throw();

// Check that read-only actions are still present
expect(within(contextMenu).getByText('View performance metrics')).to.be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export const databaseContextMenuActions = ({
icon: 'Plus',
label: 'Create database',
},
hasWriteActionsDisabled && canDeleteDatabase
hasWriteActionsDisabled || !canDeleteDatabase
? null
: {
action: 'drop-database',
Expand Down
Loading