Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: skip onramp onboarding for returning user #11591

Merged
merged 25 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5c4ea7a
test: initial ramps tests
bkirb Sep 6, 2024
a983288
test: select elements until the build quote screen
bkirb Sep 13, 2024
2a71fdb
test: verify build quote screen appears
bkirb Sep 13, 2024
d31c85b
test: remove offramp test
bkirb Sep 13, 2024
271c11f
chore: cleanup
bkirb Sep 13, 2024
fbb7963
test: rename test
bkirb Sep 13, 2024
cd9ec29
Merge branch 'main' into bkirby/rampsTest
bkirb Sep 13, 2024
7dc6c19
chore: cleanup
bkirb Sep 13, 2024
93e8421
Merge branch 'bkirby/rampsTest' of https://github.com/MetaMask/metama…
bkirb Sep 13, 2024
fbad38b
chore: cleanup
bkirb Sep 13, 2024
81a53dd
Merge branch 'main' into bkirby/rampsTest
bkirb Sep 17, 2024
1a20232
Merge branch 'main' into bkirby/rampsTest
legobeat Sep 30, 2024
7094253
chore: use SmokeAssets tag
bkirb Oct 1, 2024
f1e481b
Merge branch 'main' into bkirby/rampsTest
bkirb Oct 2, 2024
e23ea0a
test: move assertions to test file
bkirb Oct 3, 2024
b483986
Merge branch 'main' into bkirby/rampsTest
bkirb Oct 3, 2024
3f8b687
test: fix test for returning user
bkirb Oct 3, 2024
b1401a2
Merge branch 'main' into bkirby/returningUserTest
bkirb Oct 4, 2024
22c14d5
Merge branch 'main' into bkirby/returningUserTest
bkirb Oct 8, 2024
2f85d6b
chore: cleanup based on feedback
bkirb Oct 21, 2024
277ed03
Merge branch 'main' into bkirby/returningUserTest
bkirb Oct 21, 2024
c6e3865
Merge branch 'main' into bkirby/returningUserTest
bkirb Oct 22, 2024
c3e66e9
Merge branch 'main' into bkirby/returningUserTest
bkirb Oct 22, 2024
fefb7d4
chore: cleanup
bkirb Oct 28, 2024
eeeab87
chore: cleanup
bkirb Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions e2e/pages/Ramps/BuildQuoteView.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import Matchers from '../../utils/Matchers';
import Gestures from '../../utils/Gestures';
import { BuildQuoteSelectors } from '../../selectors/Ramps/BuildQuote.selectors';

class BuildQuoteView {
get amountToBuyLabel() {
return Matchers.getElementByText(BuildQuoteSelectors.AMOUNT_TO_BUY_LABEL);
}

Check warning on line 9 in e2e/pages/Ramps/BuildQuoteView.js

View workflow job for this annotation

GitHub Actions / scripts (lint)

Trailing spaces not allowed
get getQuotesButton() {
return Matchers.getElementByText(BuildQuoteSelectors.GET_QUOTES_BUTTON);
}

get cancelButton() {
return Matchers.getElementByText(BuildQuoteSelectors.CANCEL_BUTTON_TEXT);
}

async tapCancelButton() {
await Gestures.waitAndTap(this.cancelButton);
}
}

export default new BuildQuoteView();
1 change: 1 addition & 0 deletions e2e/selectors/Ramps/BuildQuote.selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import enContent from '../../../locales/languages/en.json';
export const BuildQuoteSelectors = {
AMOUNT_TO_BUY_LABEL: enContent.fiat_on_ramp_aggregator.amount_to_buy,
GET_QUOTES_BUTTON: enContent.fiat_on_ramp_aggregator.get_quotes,
CANCEL_BUTTON_TEXT: enContent.navigation.cancel,
};
8 changes: 8 additions & 0 deletions e2e/specs/ramps/onramp.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,13 @@
await SelectPaymentMethodView.tapContinueButton();
await Assertions.checkIfVisible(BuildQuoteView.amountToBuyLabel);
await Assertions.checkIfVisible(BuildQuoteView.getQuotesButton);
await BuildQuoteView.tapCancelButton()

Check warning on line 57 in e2e/specs/ramps/onramp.spec.js

View workflow job for this annotation

GitHub Actions / scripts (lint)

Missing semicolon
});

it('should skip to the Build Quote screen for returning user', async () => {
await TabBarComponent.tapActions();
await WalletActionsModal.tapBuyButton();
await Assertions.checkIfVisible(BuildQuoteView.amountToBuyLabel);
await Assertions.checkIfVisible(BuildQuoteView.getQuotesButton);
});
});
Loading