Skip to content

Commit 1ef79a0

Browse files
committed
Updated Tests
1 parent 2f0a921 commit 1ef79a0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/workspaces/dashboard/CloudInformation.test.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ describe('CloudInformation', () => {
108108
// Assert
109109
expect(screen.getByTitle('Google Cloud Platform')).not.toBeNull;
110110
// Cost estimate
111+
expect(screen.getByText('Estimated Bucket Cost')).not.toBeNull();
111112
expect(screen.getAllByText('Updated on 12/1/2023')).not.toBeNull();
112113
expect(screen.getByText('$1,000,000.00')).not.toBeNull();
113114
// Bucket usage
@@ -195,7 +196,14 @@ describe('CloudInformation', () => {
195196
await user.click(screen.getByLabelText('More info'));
196197

197198
// Assert
198-
expect(screen.getAllByText('Based on list price. Does not include discounts.')).not.toBeNull();
199+
expect(screen.getByText(/Only shows object storage costs/i)).toBeInTheDocument();
200+
expect(screen.getByText(/Based on GCP list prices/i)).toBeInTheDocument();
201+
202+
// Clicking the info button again should hide the tooltip
203+
await user.click(screen.getByLabelText('More info'));
204+
205+
// Expect the tooltip content to disappear
206+
expect(screen.queryByText(/Only shows object storage costs/i)).not.toBeInTheDocument();
199207
});
200208

201209
it('displays bucket size for users with reader access', async () => {

0 commit comments

Comments
 (0)