///////////////////////////////////////////////////////////// // // pgAdmin 4 - PostgreSQL Tools // // Copyright (C) 2013 - 2025, The pgAdmin Development Team // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// import React from 'react'; import ConnectionBar, {STATUS} from 'pgadmin.tools.erd/erd_tool/components/ConnectionBar'; import Theme from '../../../../pgadmin/static/js/Theme'; import { render, screen } from '@testing-library/react'; describe('ERD ConnectionBar', ()=>{ it(' comp', ()=>{ const connBar = render(); expect(screen.getAllByRole('button').at(1).textContent).toBe('test title'); connBar.rerender( ); expect(screen.getAllByRole('button').at(1).textContent).toBe('(Obtaining connection...) test title'); connBar.rerender( ); const styles = screen.getAllByRole('button').at(1).style; expect(styles.backgroundColor).toBe('rgb(0, 0, 0)'); expect(styles.color).toBe('rgb(255, 255, 255)'); }); });