Also remove apply button from auto-replace settings

This commit is contained in:
Veronica Berglyd Olsen
2024-12-30 16:50:34 +01:00
parent c08eca7c3b
commit 6448f05557
2 changed files with 25 additions and 31 deletions
@@ -349,7 +349,6 @@ def testDlgProjSettings_Replace(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
# Nothing to save or delete
replace.listBox.clearSelection()
replace._applyChanges()
replace._delEntry()
assert replace.listBox.topLevelItemCount() == 2
@@ -361,13 +360,8 @@ def testDlgProjSettings_Replace(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
# Edit the entry
replace.listBox.setCurrentItem(replace.listBox.topLevelItem(2))
replace.editKey.setText("")
for c in "Th is ":
qtbot.keyClick(replace.editKey, c, delay=KEY_DELAY)
replace.editValue.setText("")
for c in "With This Stuff ":
qtbot.keyClick(replace.editValue, c, delay=KEY_DELAY)
qtbot.mouseClick(replace.applyButton, QtMouseLeft)
replace._onKeyEdit("Th is ")
replace._onValueEdit("With This Stuff ")
assert replace.listBox.topLevelItem(2).text(0) == "<This>" # type: ignore
assert replace.listBox.topLevelItem(2).text(1) == "With This Stuff " # type: ignore