mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
e2e: add test ids
This commit is contained in:
@@ -129,11 +129,13 @@ export class AddTopicDialog extends React.Component {
|
||||
<Seperator half />
|
||||
<View
|
||||
style={{
|
||||
paddingHorizontal: 12
|
||||
paddingHorizontal: 12,
|
||||
zIndex: 10
|
||||
}}
|
||||
>
|
||||
<Input
|
||||
fwdRef={this.titleRef}
|
||||
testID="input-title"
|
||||
onChangeText={value => {
|
||||
this.title = value;
|
||||
}}
|
||||
|
||||
@@ -334,6 +334,7 @@ export class VaultDialog extends Component {
|
||||
});
|
||||
try {
|
||||
let verified = await db.user.verifyPassword(this.password);
|
||||
if (!(await db.user.getUser())) verified = true;
|
||||
if (verified) {
|
||||
await db.vault.delete(this.state.deleteAll);
|
||||
eSendEvent('vaultUpdated');
|
||||
@@ -541,7 +542,7 @@ export class VaultDialog extends Component {
|
||||
|
||||
_openInEditor(note) {
|
||||
this.close();
|
||||
InteractionManager.runAfterInteractions(() => {
|
||||
InteractionManager.runAfterInteractions(async () => {
|
||||
eSendEvent(eOnLoadNote, note);
|
||||
if (!DDS.isTab) {
|
||||
tabBarRef.current?.goToPage(1);
|
||||
|
||||
@@ -364,6 +364,7 @@ export class AddNotebookSheet extends React.Component {
|
||||
}}
|
||||
blurOnSubmit={false}
|
||||
button={{
|
||||
testID: 'topic-add-button',
|
||||
icon: this.state.editTopic ? 'check' : 'plus',
|
||||
onPress: this.onSubmit,
|
||||
color: topicInputFocused ? colors.accent : colors.icon
|
||||
|
||||
@@ -95,6 +95,7 @@ export const MoveNotes = ({
|
||||
const renderItem = ({ item, index }) => {
|
||||
return (
|
||||
<PressableButton
|
||||
testID="listitem.select"
|
||||
onPress={() => {
|
||||
if (item.type == 'topic') {
|
||||
setTopic(topic ? null : item);
|
||||
|
||||
@@ -37,6 +37,7 @@ interface InputProps extends TextInputProps {
|
||||
icon: string;
|
||||
color: ColorValue;
|
||||
onPress: () => void;
|
||||
testID?: string;
|
||||
};
|
||||
buttons?: React.ReactNode;
|
||||
onBlurInput?: () => void;
|
||||
@@ -257,6 +258,7 @@ const Input = ({
|
||||
|
||||
{button && (
|
||||
<IconButton
|
||||
testID={button.testID}
|
||||
name={button.icon}
|
||||
size={SIZE.xl}
|
||||
top={10}
|
||||
|
||||
@@ -60,6 +60,7 @@ const SheetWrapper = ({
|
||||
return (
|
||||
<ActionSheet
|
||||
ref={fwdRef}
|
||||
sheetBackdropId={'sheet-backdrop'}
|
||||
drawUnderStatusBar={false}
|
||||
containerStyle={style}
|
||||
gestureEnabled={gestureEnabled}
|
||||
|
||||
@@ -44,6 +44,7 @@ export const EditorWrapper = ({ width }) => {
|
||||
|
||||
return (
|
||||
<View
|
||||
testID="editor-wrapper"
|
||||
ref={editorRef}
|
||||
style={{
|
||||
width: width[deviceMode].c,
|
||||
|
||||
Reference in New Issue
Block a user