Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-notifications
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
冷佳娟
react-native-notifications
Commits
a6fa3809
Commit
a6fa3809
authored
Jul 30, 2019
by
yogevbd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
fea314c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
.circleci/config.yml
.circleci/config.yml
+9
-9
e2e/Notifications.test.js
e2e/Notifications.test.js
+6
-6
No files found.
.circleci/config.yml
View file @
a6fa3809
...
@@ -9,18 +9,18 @@ jobs:
...
@@ -9,18 +9,18 @@ jobs:
-
run
:
-
run
:
name
:
Install Dependencies
name
:
Install Dependencies
command
:
scripts/install.ios.sh
command
:
scripts/install.ios.sh
#
- run:
-
run
:
#
name: Install Android
name
:
Install Android
#
command: scripts/install.android.sh
command
:
scripts/install.android.sh
-
run
:
-
run
:
name
:
npm install
name
:
npm install
command
:
npm install
command
:
npm install
#
- run:
-
run
:
#
name: iOS unit tests
name
:
iOS unit tests
#
command: 'npm run test-unit-ios'
command
:
'
npm
run
test-unit-ios'
#
- run:
-
run
:
#
name: Android unit tests
name
:
Android unit tests
#
command: 'npm run test-unit-android'
command
:
'
npm
run
test-unit-android'
-
run
:
-
run
:
name
:
Detox iOS e2e tests
name
:
Detox iOS e2e tests
command
:
'
npm
run
test-e2e-ios-release'
command
:
'
npm
run
test-e2e-ios-release'
\ No newline at end of file
e2e/Notifications.test.js
View file @
a6fa3809
...
@@ -7,28 +7,28 @@ describe('Notifications', () => {
...
@@ -7,28 +7,28 @@ describe('Notifications', () => {
});
});
describe
(
'
Foreground
'
,
()
=>
{
describe
(
'
Foreground
'
,
()
=>
{
it
(
'
R
eceive notification
'
,
async
()
=>
{
it
(
'
Should r
eceive notification
'
,
async
()
=>
{
await
device
.
sendUserNotification
(
createNotification
({
link
:
'
foreground/notification
'
}));
await
device
.
sendUserNotification
(
createNotification
({
link
:
'
foreground/notification
'
}));
await
expect
(
elementByLabel
(
'
foreground/notification
'
)).
toBeVisible
();
await
expect
(
elementByLabel
(
'
foreground/notification
'
)).
toBeVisible
();
});
});
it
(
'
Click
notification
'
,
async
()
=>
{
it
(
'
Should open
notification
'
,
async
()
=>
{
await
device
.
sendUserNotification
(
createNotification
({
link
:
'
foreground/notification/click
'
,
showAlert
:
true
}));
await
device
.
sendUserNotification
(
createNotification
({
link
:
'
foreground/notification/click
'
,
showAlert
:
true
}));
await
expect
(
elementByLabel
(
'
Notification Clicked: foreground/notification/click
'
)).
toBeVisible
();
await
expect
(
elementByLabel
(
'
Notification Clicked: foreground/notification/click
'
)).
toBeVisible
();
});
});
});
});
describe
(
'
Background
'
,
()
=>
{
describe
(
'
Background
'
,
()
=>
{
it
(
'
Receive
notification
'
,
async
()
=>
{
it
(
'
Should open
notification
'
,
async
()
=>
{
await
device
.
sendToHome
();
await
device
.
sendToHome
();
await
expect
(
elementByLabel
(
'
background/notification
'
)).
toBeNotVisible
();
await
expect
(
elementByLabel
(
'
Notification Clicked:
background/notification
'
)).
toBeNotVisible
();
await
device
.
launchApp
({
newInstance
:
false
,
userNotification
:
createNotification
({
link
:
'
background/notification
'
})});
await
device
.
launchApp
({
newInstance
:
false
,
userNotification
:
createNotification
({
link
:
'
background/notification
'
})});
await
expect
(
elementByLabel
(
'
background/notification
'
)).
toBeVisible
();
await
expect
(
elementByLabel
(
'
Notification Clicked:
background/notification
'
)).
toBeVisible
();
});
});
});
});
describe
(
'
Dead state
'
,
()
=>
{
describe
(
'
Dead state
'
,
()
=>
{
it
(
'
R
eceive notification
'
,
async
()
=>
{
it
(
'
Should r
eceive notification
'
,
async
()
=>
{
await
device
.
launchApp
({
newInstance
:
true
,
userNotification
:
createNotification
({
link
:
'
deadState/notification
'
})});
await
device
.
launchApp
({
newInstance
:
true
,
userNotification
:
createNotification
({
link
:
'
deadState/notification
'
})});
await
expect
(
elementByLabel
(
'
deadState/notification
'
)).
toBeVisible
();
await
expect
(
elementByLabel
(
'
deadState/notification
'
)).
toBeVisible
();
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment