Skip to content

Commit 3ff7c79

Browse files
committed
fixed an issue where testcases wouldnt migrate if baseUrl was empty
1 parent ab80d9b commit 3ff7c79

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/selenium-ide/src/neo/IO/filesystem.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,19 @@ export function loadProject(project, file) {
140140
});
141141
} else if (type === FileTypes.TestCase) {
142142
const { test, baseUrl } = migrateTestCase(contents);
143-
if (project.url && project.url !== baseUrl) {
143+
if (!project.urls.includes(baseUrl)) {
144144
ModalState.showAlert({
145145
title: "Migrate test case",
146146
description: `The test case you're trying to migrate has a different base URL (${baseUrl}) than the project's one. \nIn order to migrate the test case URLs will be made absolute.`,
147147
confirmLabel: "Migrate",
148148
cancelLabel: "Discard"
149-
}, (choseDownload) => {
150-
if (choseDownload) {
149+
}, (choseMigration) => {
150+
if (choseMigration) {
151151
project.addTestCase(TestCase.fromJS(migrateUrls(test, baseUrl)));
152152
}
153153
});
154+
} else {
155+
project.addTestCase(TestCase.fromJS(test, baseUrl));
154156
}
155157
}
156158
} catch (error) {

0 commit comments

Comments
 (0)