PressBtnCopy() private method

private PressBtnCopy ( ) : bool
return bool
示例#1
0
 public void General_CopyWs_OK()
 {
     m_dlg.ShowDialog(m_wsKalabaIpa);
     m_dlg.VerifyLoadedForListBoxSelection("Kalaba (International Phonetic Alphabet)");
     m_dlg.VerifyListBox(new[] { "Kalaba", "Kalaba (International Phonetic Alphabet)" });
     // Switch tabs, so we can test that Add New Ws will switch to General Tab.
     m_dlg.SwitchTab(FwWritingSystemSetupDlg.kWsFonts);
     m_dlg.VerifyTab(FwWritingSystemSetupDlg.kWsFonts);
     // Click on Copy Button
     m_dlg.PressBtnCopy();
     // Verify WsList has new item and it is selected
     m_dlg.VerifyListBox(new[] { "Kalaba", "Kalaba (International Phonetic Alphabet)", "Kalaba (International Phonetic Alphabet)" });
     m_dlg.VerifyLoadedForListBoxSelection("Kalaba (International Phonetic Alphabet)");
     m_dlg.VerifyWritingSystemsAreEqual(1, 2);
     // verify we automatically switched back to General Tab.
     m_dlg.VerifyTab(FwWritingSystemSetupDlg.kWsGeneral);
     // Verify Switching context is not OK (force user to make unique Ws)
     m_dlg.SwitchTab(FwWritingSystemSetupDlg.kWsFonts,
                     DummyWritingSystemPropertiesDialog.ShowMsgBoxStatus.CheckCantCreateDuplicateWs,
                     DialogResult.OK);
     m_dlg.VerifyTab(FwWritingSystemSetupDlg.kWsGeneral);
     // Change Region or Variant info.
     m_dlg.SetVariantName("Phonetic");
     m_dlg.VerifyListBox(new[] { "Kalaba", "Kalaba (International Phonetic Alphabet)", "Kalaba (Phonetic)" });
     // Do OK
     m_dlg.PressOk();
     Cache.ServiceLocator.WritingSystemManager.Save();
     // Verify dialog indicates a list to add to current (vernacular) ws list
     VerifyNewlyAddedWritingSystems(new[] { "qaa-fonipa-x-kal-etic" });
     // Verify we've actually created the new ws.
     VerifyWsNames(
         new[] { "Kalaba", "Kalaba (International Phonetic Alphabet)", "Kalaba (Phonetic)" },
         new[] { "qaa-x-kal", "qaa-fonipa-x-kal", "qaa-fonipa-x-kal-etic" });
 }