Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
176
Merge Requests
13
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Commits
ef51c010
Commit
ef51c010
authored
20 minutes ago
by
Juan Manuel Solaro
Browse files
Options
Download
(feat) post flow
parent
69cadb18
new-e2e-tests-for-mobile
1 merge request
!426
WIP: New e2e tests for mobile
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
5 deletions
+61
-5
e2e/post.spec.js
View file @
ef51c010
...
...
@@ -36,4 +36,60 @@ describe('Post Flow', () => {
await
deletePost
();
});
it
(
'
should be able to create a nsfw post with text
'
,
async
()
=>
{
const
text
=
'
e2eTest
'
;
// create post
await
waitForAndType
(
by
.
id
,
'
PostInput
'
,
text
);
await
tapElement
(
by
.
id
,
'
NsfwToggle
'
);
await
tapElement
(
by
.
id
,
'
NsfwToggle
'
);
await
waitForAndTap
(
by
.
id
,
'
NsfwReasonNudity
'
);
await
tapElement
(
by
.
id
,
'
NsfwToggle
'
);
await
tapElement
(
by
.
id
,
'
CapturePostButton
'
);
// wait for newsfeed
await
waitForElement
(
by
.
id
,
'
NewsfeedScreen
'
);
await
deletePost
();
});
it
(
'
should be able to create a text and image post
'
,
async
()
=>
{
const
text
=
'
e2eTest
'
;
// create post
await
waitForAndType
(
by
.
id
,
'
PostInput
'
,
text
);
await
tapElement
(
by
.
id
,
'
GalleryImage0
'
);
await
tapElement
(
by
.
id
,
'
GalleryImage0
'
);
await
waitFor
(
element
(
by
.
id
(
'
CapturePostButton
'
))).
toBeVisible
().
withTimeout
(
120000
);
await
tapElement
(
by
.
id
,
'
CapturePostButton
'
);
// wait for newsfeed
await
waitForElement
(
by
.
id
,
'
NewsfeedScreen
'
);
await
deletePost
();
});
it
(
'
should be able to cancel image upload and then post
'
,
async
()
=>
{
const
text
=
'
e2eTest
'
;
// create post
await
waitForAndType
(
by
.
id
,
'
PostInput
'
,
text
);
await
tapElement
(
by
.
id
,
'
GalleryImage0
'
);
await
tapElement
(
by
.
id
,
'
GalleryImage0
'
);
await
waitForAndTap
(
by
.
id
,
'
AttachmentDeleteButton
'
);
await
tapElement
(
by
.
id
,
'
CapturePostButton
'
);
// wait for newsfeed
await
waitForElement
(
by
.
id
,
'
NewsfeedScreen
'
);
await
deletePost
();
});
});
This diff is collapsed.
src/capture/CaptureGallery.js
View file @
ef51c010
...
...
@@ -159,7 +159,7 @@ export default class CaptureGallery extends PureComponent {
});
}
}
{...
testID
(
`Gallery
${
node
.
type
}
`
)
}
testID
=
{
`GalleryImage
${
item
.
index
}
`
}
>
<
Image
source
=
{{
uri
:
node
.
image
.
uri
}}
...
...
This diff is collapsed.
src/capture/CapturePoster.js
View file @
ef51c010
...
...
@@ -293,7 +293,7 @@ export default class CapturePoster extends Component {
uri
=
{
attachment
.
uri
}
type
=
{
attachment
.
type
}
/
>
<
Icon
raised
name
=
"
md-close
"
type
=
"
ionicon
"
color
=
'
#fff
'
size
=
{
22
}
containerStyle
=
{
styles
.
deleteAttachment
}
onPress
=
{()
=>
this
.
deleteAttachment
()}
{...
testID
(
'
Attachment Delete Button
'
)}
/
>
<
Icon
raised
name
=
"
md-close
"
type
=
"
ionicon
"
color
=
'
#fff
'
size
=
{
22
}
containerStyle
=
{
styles
.
deleteAttachment
}
onPress
=
{()
=>
this
.
deleteAttachment
()}
testID
=
"
AttachmentDeleteButton
"
/>
<
/View>
}
<
CaptureTabs
onSelectedMedia
=
{
this
.
onAttachedMedia
}
/
>
<
/React.Fragment
>
...
...
This diff is collapsed.
src/capture/CapturePosterFlags.js
View file @
ef51c010
...
...
@@ -361,7 +361,7 @@ export default class CapturePosterFlags extends Component {
}
renderNsfw
()
{
if
(
GOOGLE_PLAY_STORE
||
Platform
.
OS
===
'
ios
'
)
return
null
;
//
if (GOOGLE_PLAY_STORE || Platform.OS === 'ios') return null;
return
(
<
NsfwToggle
containerStyle
=
{
styles
.
cell
}
...
...
This diff is collapsed.
src/common/components/nsfw/NsfwToggle.js
View file @
ef51c010
...
...
@@ -58,7 +58,7 @@ export default class NsfwToggle extends Component {
render
()
{
const
isActive
=
Boolean
(
this
.
props
.
value
&&
this
.
props
.
value
.
length
);
const
button
=
(
<
Touchable
style
=
{
this
.
props
.
containerStyle
}
onPress
=
{
this
.
showDropdown
}
{...
testID
(
'
NSFW button
'
)}
>
<
Touchable
style
=
{
this
.
props
.
containerStyle
}
onPress
=
{
this
.
showDropdown
}
testID
=
"
NsfwToggle
"
>
<
MdIcon
name
=
"
explicit
"
color
=
{
isActive
?
Colors
.
explicit
:
Colors
.
darkGreyed
}
...
...
@@ -80,7 +80,7 @@ export default class NsfwToggle extends Component {
key
=
{
i
}
onPress
=
{()
=>
this
.
toggleDropdownOption
(
reason
)}
textStyle
=
{[
styles
.
menuItemText
,
this
.
isReasonActive
(
reason
)
&&
styles
.
menuItemTextActive
]}
{...
testID
(
`NSFW
${
reason
.
label
}
`
)
}
testID
=
{
`NsfwReason
${
reason
.
label
}
`
}
>
{
this
.
isReasonActive
(
reason
)
&&
<
MdIcon
name
=
"
check
"
/>
}
{
reason
.
label
}
<
/MenuItem
>
))}
<
/Menu
>
...
...
This diff is collapsed.
Please
register
or
sign in
to comment