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
c65d91c1
Commit
c65d91c1
authored
Jul 29, 2019
by
yogevbd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flaky tests
parent
eae86a37
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
e2e/Notifications.test.js
e2e/Notifications.test.js
+5
-9
No files found.
e2e/Notifications.test.js
View file @
c65d91c1
...
@@ -2,11 +2,11 @@ const Utils = require('./Utils');
...
@@ -2,11 +2,11 @@ const Utils = require('./Utils');
const
{
elementByLabel
}
=
Utils
;
const
{
elementByLabel
}
=
Utils
;
describe
(
'
Notifications
'
,
()
=>
{
describe
(
'
Notifications
'
,
()
=>
{
describe
(
'
Foreground
'
,
()
=>
{
beforeEach
(
async
()
=>
{
beforeEach
(
async
()
=>
{
await
device
.
relaunchApp
({
permissions
:
{
notifications
:
'
YES
'
}});
await
device
.
relaunchApp
({
delete
:
true
,
permissions
:
{
notifications
:
'
YES
'
}});
});
});
describe
(
'
Foreground
'
,
()
=>
{
it
(
'
Receive notification
'
,
async
()
=>
{
it
(
'
Receive 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
();
...
@@ -19,10 +19,6 @@ describe('Notifications', () => {
...
@@ -19,10 +19,6 @@ describe('Notifications', () => {
});
});
describe
(
'
Background
'
,
()
=>
{
describe
(
'
Background
'
,
()
=>
{
beforeEach
(
async
()
=>
{
await
device
.
launchApp
({
newInstance
:
true
,
permissions
:
{
notifications
:
'
YES
'
}});
});
it
(
'
Receive notification
'
,
async
()
=>
{
it
(
'
Receive notification
'
,
async
()
=>
{
device
.
sendToHome
();
device
.
sendToHome
();
await
expect
(
elementByLabel
(
'
background/notification
'
)).
toBeNotVisible
();
await
expect
(
elementByLabel
(
'
background/notification
'
)).
toBeNotVisible
();
...
@@ -33,7 +29,7 @@ describe('Notifications', () => {
...
@@ -33,7 +29,7 @@ describe('Notifications', () => {
describe
(
'
Dead state
'
,
()
=>
{
describe
(
'
Dead state
'
,
()
=>
{
it
(
'
Receive notification
'
,
async
()
=>
{
it
(
'
Receive notification
'
,
async
()
=>
{
await
device
.
launchApp
({
delete
:
true
,
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