Skip to content
Snippets Groups Projects
Commit 4f56712c authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk
Browse files

wizardviewstepmodel: remove profile page flow from imported accounts

Gitlab: #470

Change-Id: I9dd65e83885e89b447d6354c984d3d707e9f7061
parent 4884708a
No related branches found
No related tags found
No related merge requests found
...@@ -36,10 +36,13 @@ WizardViewStepModel::WizardViewStepModel(LRCInstance* lrcInstance, ...@@ -36,10 +36,13 @@ WizardViewStepModel::WizardViewStepModel(LRCInstance* lrcInstance,
accountAdapter_->changeAccount(index); accountAdapter_->changeAccount(index);
auto accountCreationOption = get_accountCreationOption(); auto accountCreationOption = get_accountCreationOption();
if (accountCreationOption == AccountCreationOption::ConnectToAccountManager if (accountCreationOption == AccountCreationOption::ConnectToAccountManager)
|| accountCreationOption == AccountCreationOption::ImportFromBackup
|| accountCreationOption == AccountCreationOption::ImportFromDevice)
set_mainStep(MainSteps::Profile); set_mainStep(MainSteps::Profile);
else if (accountCreationOption == AccountCreationOption::ImportFromBackup
|| accountCreationOption == AccountCreationOption::ImportFromDevice) {
Q_EMIT closeWizardView();
reset();
}
Q_EMIT accountIsReady(accountId); Q_EMIT accountIsReady(accountId);
}); });
......
...@@ -29,6 +29,14 @@ import "qrc:/src/wizardview" ...@@ -29,6 +29,14 @@ import "qrc:/src/wizardview"
WizardView { WizardView {
id: uut id: uut
function clearSignalSpy() {
spyAccountIsReady.clear()
spyAccountIsRemoved.clear()
spyAccountConfigFinalized.clear()
spyReportFailure.clear()
spyCloseWizardView.clear()
}
SignalSpy { SignalSpy {
id: spyAccountIsReady id: spyAccountIsReady
...@@ -64,6 +72,13 @@ WizardView { ...@@ -64,6 +72,13 @@ WizardView {
signalName: "reportFailure" signalName: "reportFailure"
} }
SignalSpy {
id: spyCloseWizardView
target: WizardViewStepModel
signalName: "closeWizardView"
}
TestCase { TestCase {
name: "WelcomePage to different account creation page and return back" name: "WelcomePage to different account creation page and return back"
when: windowShown when: windowShown
...@@ -195,10 +210,7 @@ WizardView { ...@@ -195,10 +210,7 @@ WizardView {
when: windowShown when: windowShown
function test_createJamiAccountUiFlow() { function test_createJamiAccountUiFlow() {
spyAccountIsReady.clear() uut.clearSignalSpy()
spyAccountIsRemoved.clear()
spyAccountStatusChanged.clear()
spyAccountConfigFinalized.clear()
var controlPanelStackView = findChild(uut, "controlPanelStackView") var controlPanelStackView = findChild(uut, "controlPanelStackView")
...@@ -265,6 +277,9 @@ WizardView { ...@@ -265,6 +277,9 @@ WizardView {
WizardViewStepModel.nextStep() WizardViewStepModel.nextStep()
} }
spyCloseWizardView.wait()
compare(spyCloseWizardView.count, 1)
// Check alias text // Check alias text
compare(SettingsAdapter.getCurrentAccount_Profile_Info_Alias(), aliasText) compare(SettingsAdapter.getCurrentAccount_Profile_Info_Alias(), aliasText)
...@@ -286,10 +301,7 @@ WizardView { ...@@ -286,10 +301,7 @@ WizardView {
} }
function test_createRendezVousAccountUiFlow() { function test_createRendezVousAccountUiFlow() {
spyAccountIsReady.clear() uut.clearSignalSpy()
spyAccountIsRemoved.clear()
spyAccountStatusChanged.clear()
spyAccountConfigFinalized.clear()
var controlPanelStackView = findChild(uut, "controlPanelStackView") var controlPanelStackView = findChild(uut, "controlPanelStackView")
...@@ -359,6 +371,9 @@ WizardView { ...@@ -359,6 +371,9 @@ WizardView {
WizardViewStepModel.nextStep() WizardViewStepModel.nextStep()
} }
spyCloseWizardView.wait()
compare(spyCloseWizardView.count, 1)
// Check alias text // Check alias text
compare(SettingsAdapter.getCurrentAccount_Profile_Info_Alias(), aliasText) compare(SettingsAdapter.getCurrentAccount_Profile_Info_Alias(), aliasText)
...@@ -385,10 +400,7 @@ WizardView { ...@@ -385,10 +400,7 @@ WizardView {
when: windowShown when: windowShown
function test_createSipAccountUiFlow() { function test_createSipAccountUiFlow() {
spyAccountIsReady.clear() uut.clearSignalSpy()
spyAccountIsRemoved.clear()
spyAccountStatusChanged.clear()
spyAccountConfigFinalized.clear()
var controlPanelStackView = findChild(uut, "controlPanelStackView") var controlPanelStackView = findChild(uut, "controlPanelStackView")
...@@ -445,6 +457,9 @@ WizardView { ...@@ -445,6 +457,9 @@ WizardView {
WizardViewStepModel.nextStep() WizardViewStepModel.nextStep()
spyCloseWizardView.wait()
compare(spyCloseWizardView.count, 1)
AccountAdapter.deleteCurrentAccount() AccountAdapter.deleteCurrentAccount()
// Wait until the account removal is finished // Wait until the account removal is finished
...@@ -458,10 +473,7 @@ WizardView { ...@@ -458,10 +473,7 @@ WizardView {
when: windowShown when: windowShown
function test_createJamiAccountFromBackupUiFlow() { function test_createJamiAccountFromBackupUiFlow() {
spyAccountIsReady.clear() uut.clearSignalSpy()
spyAccountIsRemoved.clear()
spyAccountConfigFinalized.clear()
spyReportFailure.clear()
var controlPanelStackView = findChild(uut, "controlPanelStackView") var controlPanelStackView = findChild(uut, "controlPanelStackView")
...@@ -506,8 +518,8 @@ WizardView { ...@@ -506,8 +518,8 @@ WizardView {
compare(spyAccountIsReady.count, 1) compare(spyAccountIsReady.count, 1)
spyAccountConfigFinalized.wait() spyAccountConfigFinalized.wait()
compare(spyAccountConfigFinalized.count, 1) compare(spyAccountConfigFinalized.count, 1)
spyCloseWizardView.wait()
WizardViewStepModel.nextStep() compare(spyCloseWizardView.count, 1)
AccountAdapter.deleteCurrentAccount() AccountAdapter.deleteCurrentAccount()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment