-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SvetoslavTsenov
wants to merge
4
commits into
nativescript-vue:master
Choose a base branch
from
SvetoslavTsenov:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+141
−129
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -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 |
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
template: ` | ||
<StackLayout class="m-20"> | ||
<ActivityIndicator busy="true"/> | ||
<ActivityIndicator busy="true" automationText="ActivityIndicator" /> | ||
</StackLayout> | ||
` | ||
}; |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
template: ` | ||
<StackLayout class="m-20"> | ||
<DatePicker/> | ||
<DatePicker automationText="DatePicker" /> | ||
</StackLayout> | ||
` | ||
}; |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
template: ` | ||
<GridLayout rows="auto" class="m-20"> | ||
<Image src="res://icon" stretch="none"/> | ||
<Image src="res://icon" stretch="none" automationText="Image" /> | ||
</GridLayout> | ||
` | ||
}; |
File renamed without changes.
This file contains hidden or 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 hidden or 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,4 @@ | ||
--timeout 800000 | ||
--recursive e2e | ||
--reporter mocha-multi | ||
--reporter-options spec=-,mocha-junit-reporter=test-results.xml |
Empty file.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+81.6 KB
e2e/resources/images/nativescriptvueuitests/iPhone 8/ActionDialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39 KB
e2e/resources/images/nativescriptvueuitests/iPhone 8/ActivityIndicator.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+64.2 KB
e2e/resources/images/nativescriptvueuitests/iPhone 8/ConfirmDialog.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+58.2 KB
e2e/resources/images/nativescriptvueuitests/iPhone 8/SegmentedBar.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains hidden or 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,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(); | ||
// }); |
This file contains hidden or 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,91 @@ | ||
const assert = require("chai").assert; | ||
const nsAppium = require("nativescript-dev-appium"); | ||
|
||
let driver; | ||
before("reate 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.
Oops, something went wrong.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.