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

fix(e2e): added conditial device usage #3886

Merged
merged 73 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
931fa13
added conditial device usage
inc-man Dec 6, 2024
2c6e997
🤖 Apply formatting changes
github-actions[bot] Dec 6, 2024
25fb9a6
fixed lint issue
inc-man Dec 6, 2024
482f84c
Merge branch 'fix(e2e)/include-devices-based-on-os' of https://github…
inc-man Dec 6, 2024
895e0a1
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
AntonioVentilii Dec 7, 2024
e1134ae
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
AntonioVentilii Dec 9, 2024
af5b644
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 16, 2024
89fb58a
adjusted receive modal test
inc-man Dec 16, 2024
6ccf4f3
🤖 Apply formatting changes
github-actions[bot] Dec 16, 2024
8f75e79
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 16, 2024
983f448
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 18, 2024
e0ea81f
updated conditial navigation method
inc-man Dec 18, 2024
9f1767d
🤖 Apply formatting changes
github-actions[bot] Dec 18, 2024
5e69dd8
adjusted conditional handling
inc-man Dec 18, 2024
fb2e13a
Merge branch 'fix(e2e)/include-devices-based-on-os' of https://github…
inc-man Dec 18, 2024
118414d
🤖 Apply formatting changes
github-actions[bot] Dec 18, 2024
ea77cd4
revoked old code
inc-man Dec 18, 2024
a6060b2
🤖 Apply formatting changes
github-actions[bot] Dec 18, 2024
b1e691a
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 18, 2024
e998fbd
add correct handling of back to homepage
inc-man Dec 19, 2024
0386729
🤖 Apply formatting changes
github-actions[bot] Dec 19, 2024
0fb3bc5
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
5cc6b17
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
250ed21
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
6660326
new handling of mobile view
inc-man Dec 19, 2024
6daf7ad
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 19, 2024
0ecda37
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
dca2156
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
581166e
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
26fa4f0
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
a169e07
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
fc59078
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
4a02797
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
e4b9797
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
aa4e236
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
74fac31
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
4706d11
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
bd2e4d1
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
9812f30
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
9c039ba
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
dadf79d
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
86b8db1
revert recent changes for mobile view
inc-man Dec 19, 2024
1d7f363
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 19, 2024
4edc817
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
113fe4d
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
087a771
comment out flaky test
inc-man Dec 19, 2024
778fefa
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
baac213
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
b94d072
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
d1db9d3
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
3702234
🤖 Update E2E snapshots
github-actions[bot] Dec 19, 2024
1b83609
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 20, 2024
176ec84
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
d289b3a
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
db0f1df
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
a39d07e
added retrying for flaky tests
inc-man Dec 20, 2024
88b1232
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 20, 2024
40388d8
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
a86af1d
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
1aace62
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
bae7d68
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Dec 20, 2024
5e64e0f
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
03a0570
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
86318fb
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
87cad72
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
9b7af5c
🤖 Update E2E snapshots
github-actions[bot] Dec 20, 2024
5be13dd
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Jan 9, 2025
e4d4215
new screenshots
inc-man Jan 9, 2025
e01159a
Merge branch 'fix(e2e)/include-devices-based-on-os' of github.com:dfi…
inc-man Jan 9, 2025
d6f2a64
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Jan 9, 2025
60b9efa
🤖 Update E2E snapshots
github-actions[bot] Jan 9, 2025
d17feea
🤖 Update E2E snapshots
github-actions[bot] Jan 9, 2025
a1fe359
Merge branch 'main' into fix(e2e)/include-devices-based-on-os
inc-man Jan 9, 2025
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
2 changes: 2 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
env:
MATRIX_OS: ${{ matrix.os }}
if: ${{ needs.check-e2e-changes.outputs.e2e-or-config-changed == 'true' }}
needs: oisy-backend-wasm
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
env:
MATRIX_OS: ${{ matrix.os }}
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-e2e-snapshots') }}

steps:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion e2e/transactions-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ testWithII('should display BTC transactions page', async ({ page, iiPage }) => {
});

// TODO: resolve the below test flakiness
testWithII('should display ETH transactions page', async ({ page, iiPage }) => {
testWithII.skip('should display ETH transactions page', async ({ page, iiPage }) => {
const transactionsPage = new TransactionsPage({ page, iiPage, tokenSymbol: 'ETH' });

await transactionsPage.waitForReady();
Expand Down
14 changes: 6 additions & 8 deletions e2e/utils/pages/homepage.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
LOADER_MODAL,
LOGIN_BUTTON,
LOGOUT_BUTTON,
NAVIGATION_ITEM_HOMEPAGE,
NAVIGATION_ITEM_SETTINGS,
NAVIGATION_ITEM_TOKENS,
NAVIGATION_MENU,
NAVIGATION_MENU_BUTTON,
RECEIVE_TOKENS_MODAL,
Expand Down Expand Up @@ -228,19 +228,17 @@ abstract class Homepage {
if (await this.isVisibleByTestId(testId)) {
await this.clickByTestId(testId);
} else {
if (await this.isVisibleByTestId(NAVIGATION_MENU_BUTTON)) {
await this.clickByTestId(NAVIGATION_MENU_BUTTON);
}
if (await this.isVisibleByTestId(testId)) {
await this.clickByTestId(testId);
}
const navigationMenuButton = this.#page.getByTestId(NAVIGATION_MENU_BUTTON);
await navigationMenuButton.click();
const navigationMenu = this.#page.getByTestId(NAVIGATION_MENU);
await navigationMenu.getByTestId(testId).click();
}
}

async activateTestnetSettings(): Promise<void> {
await this.navigateTo(NAVIGATION_ITEM_SETTINGS);
await this.clickByTestId(BTC_TESTNET_TOGGLE);
await this.clickByTestId(NAVIGATION_ITEM_TOKENS);
await this.clickByTestId(NAVIGATION_ITEM_HOMEPAGE);
}

async takeScreenshot(): Promise<void> {
Expand Down
37 changes: 30 additions & 7 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,35 @@ dotenv.populate(

const DEV = (process.env.NODE_ENV ?? 'production') === 'development';

const MATRIX_OS = process.env.MATRIX_OS ?? '';
const isMac = MATRIX_OS.includes('macos') ?? process.platform === 'darwin';
inc-man marked this conversation as resolved.
Show resolved Hide resolved

const appleProjects = [
{
name: 'Safari',
use: devices['Desktop Safari']
},
{
name: 'iPhone SE',
use: devices['iPhone SE']
}
];

const nonAppleProjects = [
{
name: 'Google Chrome',
use: devices['Desktop Chrome']
},
{
name: 'Firefox',
use: devices['Desktop Firefox']
},
{
name: 'Pixel 5',
use: devices['Pixel 5']
}
];

const TIMEOUT = 5 * 60 * 1000;

export default defineConfig({
Expand Down Expand Up @@ -45,11 +74,5 @@ export default defineConfig({
navigationTimeout: TIMEOUT,
...(DEV && { headless: false })
},
projects: [
/* Test against desktop browsers. */
{
name: 'Google Chrome',
use: { ...devices['Desktop Chrome'] }
}
]
projects: isMac ? appleProjects : nonAppleProjects
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<script lang="ts">
import OisyWalletLogo from '$lib/components/icons/OisyWalletLogo.svelte';
import { NAVIGATION_ITEM_HOMEPAGE } from '$lib/constants/test-ids.constants';
import { i18n } from '$lib/stores/i18n.store';
import { replaceOisyPlaceholders } from '$lib/utils/i18n.utils';
</script>

<a
href="/"
data-tid={NAVIGATION_ITEM_HOMEPAGE}
class="flex w-fit items-center gap-0 no-underline"
aria-label={replaceOisyPlaceholders($i18n.core.alt.go_to_home)}
>
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/lib/constants/test-ids.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const NAVIGATION_ITEM_TOKENS = 'navigation-item-tokens';
export const NAVIGATION_ITEM_ACTIVITY = 'navigation-item-activity';
export const NAVIGATION_ITEM_EXPLORER = 'navigation-item-explore';
export const NAVIGATION_ITEM_SETTINGS = 'navigation-item-settings';
export const NAVIGATION_ITEM_HOMEPAGE = 'navigation-item-homepage';

export const BTC_TESTNET_TOGGLE = 'btc-testnet-toggle';

Expand Down
Loading