mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2022 The Pybricks Authors
|
|
|
|
import React from 'react';
|
|
import { testRender } from '../../test';
|
|
import Toolbar from './Toolbar';
|
|
|
|
describe('toolbar', () => {
|
|
it('should have bluetooth button', () => {
|
|
const [, toolbar] = testRender(<Toolbar />);
|
|
|
|
const runButton = toolbar.getByRole('button', { name: 'Bluetooth' });
|
|
|
|
expect(runButton).toBeDefined();
|
|
});
|
|
|
|
it('should have run button', () => {
|
|
const [, toolbar] = testRender(<Toolbar />);
|
|
|
|
const runButton = toolbar.getByRole('button', { name: 'Run' });
|
|
|
|
expect(runButton).toBeDefined();
|
|
});
|
|
|
|
it('should have stop button', () => {
|
|
const [, toolbar] = testRender(<Toolbar />);
|
|
|
|
const runButton = toolbar.getByRole('button', { name: 'Stop' });
|
|
|
|
expect(runButton).toBeDefined();
|
|
});
|
|
|
|
it('should have repl button', () => {
|
|
const [, toolbar] = testRender(<Toolbar />);
|
|
|
|
const runButton = toolbar.getByRole('button', { name: 'REPL' });
|
|
|
|
expect(runButton).toBeDefined();
|
|
});
|
|
});
|