feat(s3): add a copy button for the bucket name
This commit is contained in:
@@ -99,6 +99,19 @@ test('shows an object extension instead of a generic object type', async () => {
|
||||
expect(await screen.findByText('JSON file')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
test('offers a copy action for the AWS bucket name', async () => {
|
||||
apiMocks.listStorageObjects.mockResolvedValue({prefix: '', objects: []})
|
||||
const queryClient = new QueryClient({defaultOptions: {queries: {retry: false}}})
|
||||
|
||||
render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<StorageObjectBrowser cloud="aws" resource={bucket} runtimeReachable capabilities={[]} onSelectObject={() => {}}/>
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(await screen.findByRole('button', {name: 'Copy Bucket name'})).toBeInTheDocument()
|
||||
})
|
||||
|
||||
test('opens the object action with copy selected', async () => {
|
||||
apiMocks.listStorageObjects.mockResolvedValue({prefix: '', objects: [{
|
||||
key: 'orders/order.json', name: 'order.json', type: 'object', size: 10, lastModified: null, metadata: {},
|
||||
|
||||
Reference in New Issue
Block a user