Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6
tests: include e2e smoke tests for all examples#7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
.DS_Store | ||
.idea/ | ||
.vscode | ||
npm-debug.log | ||
package-lock.json | ||
node_modules | ||
platforms/ | ||
app/tns_modules/ | ||
e2e/reports | ||
test-results.xml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
template: ` | ||
<StackLayout class="m-20"> | ||
<ActivityIndicator busy="true" automationText="ActivityIndicator"/> | ||
</StackLayout> | ||
` | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
template: ` | ||
<StackLayout class="m-20"> | ||
<DatePicker automationText="DatePicker"/> | ||
</StackLayout> | ||
` | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
template: ` | ||
<GridLayout rows="auto" class="m-20"> | ||
<Image src="res://icon" stretch="none" automationText="Image"/> | ||
</GridLayout> | ||
` | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--timeout 800000 | ||
--recursive e2e | ||
--reporter mocha-multi | ||
--reporter-options spec=-,mocha-junit-reporter=test-results.xml |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const nsAppium = require("nativescript-dev-appium"); | ||
// In case you need the server to started programatically | ||
// before("start server", async () => { | ||
// await nsAppium.startServer(); | ||
// }); | ||
// after("stop server", async () => { | ||
// await nsAppium.stopServer(); | ||
// }); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
const assert = require("chai").assert; | ||
const nsAppium = require("nativescript-dev-appium"); | ||
let driver; | ||
before("create driver", async () => { | ||
driver = await nsAppium.createDriver(); | ||
}); | ||
afterEach(`navigate back to main page after test`, async () => { | ||
await driver.navBack(); | ||
}); | ||
after('quit driver', async () => { | ||
await driver.quit(); | ||
console.log('Buh-Bye...'); | ||
}); | ||
describe("components", async () => { | ||
const components = [ | ||
'ActivityIndicator', | ||
'Button', | ||
'DatePicker', | ||
'HtmlView', | ||
'Image', | ||
'Label', | ||
'ListPicker', | ||
'ListView', | ||
'Progress', | ||
'ScrollView', | ||
'SearchBar', | ||
'SegmentedBar', | ||
'Slider', | ||
'Switch', | ||
'TabView', | ||
'TextField', | ||
'TextView', | ||
'TimePicker', | ||
'WebView', | ||
]; | ||
for (let component of components) { | ||
it(`load ${component}`, async () => { | ||
await loadComponent(component); | ||
const result = await driver.compareScreen(component, 10, 0.1); | ||
assert.isTrue(result, "Image comparisson has failed!"); | ||
if (component === 'SearchBar' && driver.isAndroid) { | ||
await driver.navBack(); | ||
} | ||
}); | ||
}; | ||
}); | ||
describe("dialogs", async () => { | ||
const dialogs = [ | ||
'ActionDialog', | ||
'AlertDialog', | ||
'ConfirmDialog', | ||
'LoginDialog', | ||
'PromptDialog', | ||
]; | ||
for (let dialog of dialogs) { | ||
it(`load ${dialog}`, async () => { | ||
await loadComponent(dialog); | ||
const result = await driver.compareScreen(dialog, 10, 0.1); | ||
if (driver.isIOS) { | ||
const button = dialog === "ActionDialog" ? "cancel" : "OK"; | ||
const dialogItem = await driver.findElementByTextIfExists(button, nsAppium.SearchOptions.contains); | ||
if (dialogItem) { | ||
await dialogItem.click(); | ||
} else { | ||
console.error(`Could not find ${button} to dismiss the dialog!`); | ||
} | ||
} else { | ||
await driver.navBack(); | ||
} | ||
assert.isTrue(result, "Image comparisson has failed!"); | ||
}); | ||
}; | ||
}); | ||
const loadComponent = async (component) => { | ||
const listItem = await driver.findElementByText(component); | ||
await listItem.click(); | ||
await driver.findElementByTextIfExists(component, nsAppium.SearchOptions.contains); | ||
}; |
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.