Closed Chaitanyabsprip closed 1 year ago
Hm, I am not able to reproduce it. Could you provide full test file content?
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:minesweeper/minesweeper/pages/game_menu.dart';
void main() {
group('menu', () {
testWidgets('should show new game button', (tester) async {
await const GameMenu().pump(tester);
expect(find.text('New Game'), findsOneWidget);
});
});
}
extension MaterialTest on Widget {
Future<void> pump(WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: this));
}
}
I have use_lsp on and my command is fvm flutter
Hm, I am unable to reproduce it:
But I see that the menu
group is not visible in the summary (but it is visible in text output).
Did you provide a full test file? Also, maybe it is related to the flutter version - which flutter version you are using?
I somehow fixed the error that I was having, it seems to have been an issue in setting up keymaps with lazy.nvim(Probably something to do with how lazy.nvim lazy loads the dependencies of neotest). Not sure what the exact error is, but I'll try to reproduce and either add it to lazy.nvim discussions or comment on this issue itself, in-case someone else faces a similar issue.
Also I can see the menu group in the summary. Answering your question anyway, I did provide the complete test file that could reproduce error on my setup. I am on the latest flutter version.
when I run
require('neotest').run.run()
on this test, I get a notification sayingno tests found
.however when I run the tests from the summary window, I get the following output