Skip to content

Commit

Permalink
test: Update ios simulator to iphone 15 (#10636)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

We want to update the simulator where the E2E tests run from iphone 13
pro to iphone 15.

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**


https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/64f5e6fd-01a5-434c-9574-f7775df2998e

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Curtis David <[email protected]>
  • Loading branch information
SamuelSalas and cortisiko authored Aug 20, 2024
1 parent 6817816 commit 002522d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = {
'ios.simulator': {
type: 'ios.simulator',
device: {
type: 'iPhone 13 Pro',
type: 'iPhone 15 Pro',
},
},
'android.bitrise.emulator': {
Expand Down
11 changes: 11 additions & 0 deletions e2e/api-specs/ConfirmationsRejectionRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Matchers from '../utils/Matchers';
import Gestures from '../utils/Gestures';
import ConnectModal from '../pages/modals/ConnectModal';
import AssetWatchModal from '../pages/modals/AssetWatchModal';
import SpamFilterModal from '../pages/modals/SpamFilterModal';

// eslint-disable-next-line import/no-nodejs-modules
import fs from 'fs';
Expand Down Expand Up @@ -62,6 +63,16 @@ export default class ConfirmationsRejectRule {
await ConnectModal.tapConnectButton();
await Assertions.checkIfNotVisible(ConnectModal.container);
await TestHelpers.delay(3000);

try {
await Assertions.checkIfVisible(SpamFilterModal.title);
await SpamFilterModal.tapCloseButton();
await Assertions.checkIfNotVisible(SpamFilterModal.title);
} catch {
/* eslint-disable no-console */

console.log('The spam modal is not visible');
}
}

// we need this because mobile doesnt support just raw json signTypedData, it requires a stringified version
Expand Down
19 changes: 19 additions & 0 deletions e2e/pages/modals/SpamFilterModal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Matchers from '../../utils/Matchers';
import Gestures from '../../utils/Gestures';
import { SpamFilterModalSelectorText } from '../../selectors/Modals/SpamFilterModal.selectors';

class SpamFilterModal {
get title() {
return Matchers.getElementByText(SpamFilterModalSelectorText.TITLE);
}

get cancelButtonText() {
return Matchers.getElementByText(SpamFilterModalSelectorText.CANCEL_BUTTON);
}

async tapCloseButton() {
await Gestures.waitAndTap(this.cancelButtonText);
}
}

export default new SpamFilterModal();
7 changes: 7 additions & 0 deletions e2e/selectors/Modals/SpamFilterModal.selectors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import enContent from '../../../locales/languages/en.json';

// eslint-disable-next-line import/prefer-default-export
export const SpamFilterModalSelectorText = {
TITLE: enContent.spam_filter.title,
CANCEL_BUTTON: enContent.spam_filter.cancel,
};

0 comments on commit 002522d

Please sign in to comment.