| 652 | } |
| 653 | |
| 654 | void EditorTest::HaveMapEditsOrNotesToUploadTest() |
| 655 | { |
| 656 | auto & editor = osm::Editor::Instance(); |
| 657 | |
| 658 | auto const mwmId = ConstructTestMwm([](TestMwmBuilder & builder) |
| 659 | { |
| 660 | TestCafe cafe(m2::PointD(1.0, 1.0), "London Cafe", "en"); |
| 661 | builder.Add(cafe); |
| 662 | }); |
| 663 | |
| 664 | TEST(!editor.HaveMapEditsOrNotesToUpload(), ()); |
| 665 | |
| 666 | ForEachCafeAtPoint(m_dataSource, m2::PointD(1.0, 1.0), [](FeatureType & ft) { SetBuildingLevelsToOne(ft); }); |
| 667 | |
| 668 | TEST(editor.HaveMapEditsOrNotesToUpload(), ()); |
| 669 | editor.ClearAllLocalEdits(); |
| 670 | TEST(!editor.HaveMapEditsOrNotesToUpload(), ()); |
| 671 | |
| 672 | ScopedFile sf("test_notes.xml", ScopedFile::Mode::DoNotCreate); |
| 673 | |
| 674 | editor.m_notes = Notes::MakeNotes(sf.GetFullPath(), true); |
| 675 | |
| 676 | ForEachCafeAtPoint(m_dataSource, m2::PointD(1.0, 1.0), [&editor](FeatureType & ft) |
| 677 | { |
| 678 | using NoteType = osm::Editor::NoteProblemType; |
| 679 | feature::TypesHolder typesHolder; |
| 680 | std::string defaultName; |
| 681 | editor.CreateNote({1.0, 1.0}, ft.GetID(), typesHolder, defaultName, NoteType::PlaceDoesNotExist, "exploded"); |
| 682 | }); |
| 683 | |
| 684 | TEST(editor.HaveMapEditsOrNotesToUpload(), ()); |
| 685 | } |
| 686 | |
| 687 | void EditorTest::HaveMapEditsToUploadTest() |
| 688 | { |
nothing calls this directly
no test coverage detected