-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for ecore toolbar, and fixes to exporting code. (#69)
* Add test for ecore toolbar, and fixes to exporting code. * Note: Does not check for successful creation of the file
- Loading branch information
1 parent
51ddc9b
commit 7e9d54a
Showing
3 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
let test_utils = require('./test_utils'); | ||
let model_building_utils = require('./model_building_utils'); | ||
let user = "./users/testuser/"; | ||
|
||
let fs = require('fs'); | ||
|
||
let ecore_dir = "./exported_to_ecore/"; | ||
|
||
// tests the ecore toolbar | ||
module.exports = { | ||
|
||
beforeEach : function (client) { | ||
client.url('http://localhost:8124/atompm').pause(1000); | ||
}, | ||
|
||
'Login' : function (client) { | ||
test_utils.login(client); | ||
}, | ||
|
||
|
||
'Export MM test': function (client) { | ||
model_building_utils.load_model(client, "autotest", "autotest.model"); | ||
|
||
test_utils.load_toolbar(client, ["Toolbars/Ecore/Export2Ecore.buttons.model"]); | ||
|
||
let MMbutton = "#Toolbars\\2f Ecore\\2f Export2Ecore\\2e buttons\\2e model\\2f ExportMM2Ecore"; | ||
client.waitForElementPresent(MMbutton, 2000, "Load MM Button"); | ||
client.click(MMbutton); | ||
|
||
let dialog_btn = "#dialog_btn"; | ||
client.waitForElementPresent(dialog_btn, 2000, "Load MM Menu"); | ||
client.click(dialog_btn); | ||
|
||
// client.pause(3000); | ||
|
||
// let ecore_path = ecore_dir + "autotestMetamodel.ecore"; | ||
// client.verify.ok(fs.existsSync(ecore_dir), "Check folder existance: '" + ecore_dir + "'"); | ||
// client.verify.ok(fs.existsSync(ecore_path), "Check file existance: '" + ecore_path + "'"); | ||
|
||
}, | ||
|
||
'Export M test': function (client) { | ||
model_building_utils.load_model(client, "autotest", "autotest_instance.model"); | ||
|
||
test_utils.load_toolbar(client, ["Toolbars/Ecore/Export2Ecore.buttons.model"]); | ||
|
||
let Mbutton = "#Toolbars\\2f Ecore\\2f Export2Ecore\\2e buttons\\2e model\\2f ExportM2Ecore"; | ||
client.waitForElementPresent(Mbutton, 2000, "Load M Button"); | ||
client.click(Mbutton); | ||
|
||
let dialog_btn = "#dialog_btn"; | ||
client.waitForElementPresent(dialog_btn, 2000, "Load M Menu"); | ||
client.click(dialog_btn); | ||
|
||
// client.pause(3000); | ||
// | ||
// let ecore_path = ecore_dir + "autotest_instanceModel.xmi"; | ||
// client.verify.ok(fs.existsSync(ecore_dir), "Check folder existance: '" + ecore_dir + "'"); | ||
// client.verify.ok(fs.existsSync(ecore_path), "Check file existance: '" + ecore_path + "'"); | ||
|
||
}, | ||
|
||
after : function (client) { | ||
client.end(); | ||
}, | ||
|
||
|
||
}; |