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

E2e test fixtures #16061

Merged
merged 44 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9bb3c12
remove state.json files
Oct 3, 2022
a01b109
move file
Oct 3, 2022
001c645
Update Readme
Oct 3, 2022
17e33a6
Create fixture builder
Oct 3, 2022
b05de59
load test fixture
Oct 3, 2022
430ac3e
remove redundant method
Oct 3, 2022
139177e
update snap tests
Oct 3, 2022
6911b75
update stats tests
Oct 3, 2022
8f5b1f7
update extension tests
Oct 3, 2022
4cea5a4
update extension tests
Oct 3, 2022
ea20e0c
Update fixture data
Oct 3, 2022
4ca9412
snap test dapp connection
Oct 4, 2022
68cd31c
Update fixture data
Oct 4, 2022
94fd0bf
add onboarding fixture
Oct 11, 2022
7ffd3bf
use onboarding fixture
Oct 11, 2022
368cf37
reuse import account vault
Oct 11, 2022
0713ade
remove unnecessary use of class
Oct 11, 2022
fe08920
use fixture builder in new tests
Oct 11, 2022
919ae4b
switch to function
Oct 12, 2022
a9bdabd
update default fixture
Oct 12, 2022
2421448
update default fixture
Oct 12, 2022
7ca43ca
update test
Oct 12, 2022
b7f2c5d
update 1559 test fixttures
Oct 12, 2022
440e455
update 1559 test fixtures
Oct 12, 2022
bef7208
update 1559 test fixtures
Oct 12, 2022
0eca839
dismiss 3box whats new
Oct 12, 2022
360e487
remove redundant code
Oct 13, 2022
165a4b0
move docs
Oct 13, 2022
3e87c44
remove unused code
Oct 13, 2022
5ffddaa
token detection
Oct 13, 2022
4fe7963
use default timeout
Oct 13, 2022
2451231
remove redundant code
Oct 13, 2022
9d84f8a
Update fixture builder
Oct 14, 2022
3b5fda3
add token to tokencontroller
Oct 14, 2022
2151515
remove network details
Oct 14, 2022
fb7de3a
add missing identities to preference controller
Oct 14, 2022
abeb5e8
remove duplicate properties
Oct 14, 2022
5caaf10
update bip-32 to use fixturebuilder
Oct 14, 2022
09004ff
alphabetise snap permissions
Oct 14, 2022
9e96ec2
update get snaps to use fixturebuilder
Oct 14, 2022
c77c8cc
Update test-snap-bip-32.spec.js
Oct 24, 2022
ce88224
add popular network state
Oct 27, 2022
5af2a41
update test
Oct 27, 2022
2327778
lint
Oct 27, 2022
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
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# End-to-end tests

This directory contains the fixture data used to bootstrap the individual e2e tests. Each sub-directory contains
one thing:

1. A `state.json` file that represents a the saved state for the extension (see _Generating fixture data_ below)

## Generating fixture data

Fixture data can be generated by following these steps:
Expand Down
24 changes: 14 additions & 10 deletions test/e2e/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@ const {
} = require('../helpers/file');
const { withFixtures, tinyDelayMs } = require('./helpers');
const { PAGES } = require('./webdriver/driver');
const FixtureBuilder = require('./fixture-builder');

const DEFAULT_NUM_SAMPLES = 20;
const ALL_PAGES = Object.values(PAGES);

async function measurePage(pageName) {
let metrics;
await withFixtures({ fixtures: 'imported-account' }, async ({ driver }) => {
await driver.delay(tinyDelayMs);
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
await driver.findElement('.selected-account__name');
await driver.navigate(pageName);
await driver.delay(1000);
metrics = await driver.collectMetrics();
});
await withFixtures(
{ fixtures: new FixtureBuilder().build() },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the fixture has changed, the rest is just lint formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the fixture has changed, the rest is just lint formatting

async ({ driver }) => {
await driver.delay(tinyDelayMs);
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
await driver.findElement('.selected-account__name');
await driver.navigate(pageName);
await driver.delay(1000);
metrics = await driver.collectMetrics();
},
);
return metrics;
}

Expand Down
Loading