Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
- Some test fixes to match new elements because of updated localizations
  • Loading branch information
rottabonus committed Oct 29, 2023
1 parent 6228470 commit 55c0545
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions e2e/archiveTest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Archiving', () => {
await element(by.text(mentee.displayName)).atIndex(0).tap();
await element(by.id('main.chat.title.kebabicon')).tap();
await element(by.text('Archive chat')).tap();
await element(by.text('OK')).tap();
await element(by.text('Archive')).tap();

await expect(element(by.text(mentee.displayName))).not.toBeVisible();

Expand Down Expand Up @@ -126,7 +126,7 @@ describe('Archiving', () => {
await element(by.id('main.chat.title.kebabicon')).tap();
await element(by.text('Restore chat')).tap();

await element(by.text('OK')).tap();
await element(by.text('Restore')).tap();

await waitFor(element(by.id('main.folderedlist.back.button')))
.toBeVisible()
Expand Down Expand Up @@ -170,7 +170,7 @@ describe('Archiving', () => {
await element(by.id('main.chat.title.kebabicon')).tap();
await element(by.text('Delete chat')).tap();

await element(by.text('OK')).tap();
await element(by.text('Delete')).tap();

// mentor should not see mentee's name in archived list
await expect(element(by.text(mentee.displayName))).not.toBeVisible();
Expand Down
8 changes: 4 additions & 4 deletions e2e/banTest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Banning', () => {
await element(by.text(mentee.displayName)).atIndex(0).tap();
await element(by.id('main.chat.title.kebabicon')).tap();
await element(by.text('Ban chat')).tap();
await element(by.text('OK')).tap();
await element(by.text('Ban')).tap();

await expect(element(by.text(mentee.displayName))).not.toBeVisible();

Expand Down Expand Up @@ -122,7 +122,7 @@ describe('Banning', () => {
await element(by.id('main.chat.title.kebabicon')).tap();
await element(by.text('Restore chat')).tap();

await element(by.text('OK')).tap();
await element(by.text('Restore')).tap();

await waitFor(element(by.id('main.folderedlist.back.button')))
.toBeVisible()
Expand Down Expand Up @@ -167,7 +167,7 @@ describe('Banning', () => {
await element(by.id('main.chat.title.kebabicon')).tap();
await element(by.text('Delete chat')).tap();

await element(by.text('OK')).tap();
await element(by.text('Delete')).tap();

// mentor should not see mentee's name in banned list
await expect(element(by.text(mentee.displayName))).not.toBeVisible();
Expand Down Expand Up @@ -253,7 +253,7 @@ describe('Banning', () => {
await element(by.id('main.folderedlist.kebabicon')).tap();
await element(by.text('Delete all')).tap();

await element(by.text('OK')).tap();
await element(by.text('Delete')).tap();

// mentor should not see mentees' names in banned list
await expect(element(by.text(mentee.displayName))).not.toBeVisible();
Expand Down
2 changes: 1 addition & 1 deletion e2e/browseMentorsTest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('Browse mentors', () => {
await signIn(mentee);

await expect(element(by.text(mentor1.displayName))).toBeVisible();
await element(by.text('Read more')).tap();
await element(by.text('Show mentor')).tap();
await element(by.id('components.mentorTitle.chevronLeft')).tap();

await expect(element(by.id('components.mentorList'))).toBeVisible();
Expand Down
2 changes: 1 addition & 1 deletion e2e/chatTest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Chat', () => {

await signIn(mentee);

await element(by.text('Read more')).tap();
await element(by.text('Show mentor')).tap();
await element(by.text('Chat')).tap();

await waitAndTypeText('main.chat.input.input', message_from_mentee, true);
Expand Down
4 changes: 2 additions & 2 deletions e2e/userReportTest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('reportUser', () => {
await waitAndTypeText(descriptionTestId, reportReason);
await waitAndTypeText(contactTestId, contactInfo);

await element(by.text('Send')).tap();
await element(by.id('main.userreport.send.button')).tap();

// After sending we are back at the chat-view
await expect(element(by.text(mentor.displayName))).toBeVisible();
Expand Down Expand Up @@ -171,7 +171,7 @@ describe('reportUser', () => {
).toBeVisible();

// If no reason, sending is disabled
await element(by.text('Send')).tap();
await element(by.id('main.userreport.send.button')).tap();
await expect(element(by.text('Reason for reporting *'))).toBeVisible();
});

Expand Down
2 changes: 1 addition & 1 deletion src/Screens/Main/BuddyList/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const styles = RN.StyleSheet.create({
position: 'absolute',
top: 16,
right: 16,
backgroundColor: 'yellow',
backgroundColor: colors.yellow,
},
icon: {
tintColor: colors.purple,
Expand Down
2 changes: 1 addition & 1 deletion src/Screens/Main/Chat/MessageList/DateBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const styles = RN.StyleSheet.create({
marginVertical: 16,
padding: 8,
paddingHorizontal: 16,
...shadow(2),
...shadow(4),
},
text: {
...fonts.regular,
Expand Down
2 changes: 1 addition & 1 deletion src/Screens/Main/Chat/MessageList/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const styles = RN.StyleSheet.create({
paddingHorizontal: 16,
flexDirection: 'row',
flexWrap: 'wrap',
...shadow(2),
...shadow(4),
},
text: {
...fonts.regular,
Expand Down
1 change: 1 addition & 0 deletions src/Screens/Main/UserReport/BottomActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const BottomActions = ({ onBack, onSend, isSendDisabled }: Props) => (
style={styles.sendButton}
onPress={onSend}
messageId="main.userreport.send.button"
testID="main.userreport.send.button"
disabled={isSendDisabled}
/>
</RN.View>
Expand Down
1 change: 0 additions & 1 deletion src/state/reducers/changePassword.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const reducer: automaton.Reducer<
);

case 'changePassword/completed':
console.log(action.payload);
return remoteData.fromEither(action.payload);

case 'changePassword/reset':
Expand Down

0 comments on commit 55c0545

Please sign in to comment.