Skip to content

Commit

Permalink
test(remix): Skip all firefox tests (#8662)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad authored Jul 27, 2023
1 parent 5c60612 commit 40fe2a0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 38 deletions.
4 changes: 2 additions & 2 deletions packages/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"test:integration:ci": "run-s test:integration:clean test:integration:prepare test:integration:client:ci test:integration:server",
"test:integration:prepare": "(cd test/integration && yarn)",
"test:integration:clean": "(cd test/integration && rimraf .cache node_modules build)",
"test:integration:client": "yarn playwright install-deps && yarn playwright test test/integration/test/client/",
"test:integration:client:ci": "yarn test:integration:client --browser='all' --reporter='line'",
"test:integration:client": "yarn playwright install-deps && yarn playwright test test/integration/test/client/ --project='chromium'",
"test:integration:client:ci": "yarn test:integration:client --reporter='line'",
"test:integration:server": "export NODE_OPTIONS='--stack-trace-limit=25' && jest --config=test/integration/jest.config.js test/integration/test/server/",
"test:unit": "jest",
"test:watch": "jest --watch",
Expand Down
16 changes: 16 additions & 0 deletions packages/remix/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

const config: PlaywrightTestConfig = {
retries: 0,
Expand All @@ -14,6 +15,21 @@ const config: PlaywrightTestConfig = {
command: '(cd test/integration/ && yarn build && yarn start)',
port: 3000,
},
projects: [
{
name: 'chromium',
use: devices['Desktop Chrome'],
},
{
name: 'webkit',
use: devices['Desktop Safari'],
},
{
name: 'firefox',
grep: /@firefox/i,
use: devices['Desktop Firefox'],
},
],
};

export default config;
32 changes: 2 additions & 30 deletions packages/remix/test/integration/test/client/meta-tags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ import { test, expect } from '@playwright/test';
import { getFirstSentryEnvelopeRequest } from './utils/helpers';
import { Event } from '@sentry/types';

test('should inject `sentry-trace` and `baggage` meta tags inside the root page.', async ({ page, browserName }) => {
// This test is flaky on firefox
// https://github.com/getsentry/sentry-javascript/issues/8398
if (browserName === 'firefox') {
test.skip();
}

test('should inject `sentry-trace` and `baggage` meta tags inside the root page.', async ({ page }) => {
await page.goto('/');

const sentryTraceTag = await page.$('meta[name="sentry-trace"]');
Expand All @@ -22,16 +16,7 @@ test('should inject `sentry-trace` and `baggage` meta tags inside the root page.
expect(sentryBaggageContent).toEqual(expect.any(String));
});

test('should inject `sentry-trace` and `baggage` meta tags inside a parameterized route.', async ({
page,
browserName,
}) => {
// This test is flaky on firefox
// https://github.com/getsentry/sentry-javascript/issues/8398
if (browserName === 'firefox') {
test.skip();
}

test('should inject `sentry-trace` and `baggage` meta tags inside a parameterized route.', async ({ page }) => {
await page.goto('/loader-json-response/0');

const sentryTraceTag = await page.$('meta[name="sentry-trace"]');
Expand All @@ -49,12 +34,6 @@ test('should send transactions with corresponding `sentry-trace` and `baggage` i
page,
browserName,
}) => {
// This test is flaky on firefox
// https://github.com/getsentry/sentry-javascript/issues/8398
if (browserName === 'firefox') {
test.skip();
}

const envelope = await getFirstSentryEnvelopeRequest<Event>(page, '/');

const sentryTraceTag = await page.$('meta[name="sentry-trace"]');
Expand All @@ -71,14 +50,7 @@ test('should send transactions with corresponding `sentry-trace` and `baggage` i

test('should send transactions with corresponding `sentry-trace` and `baggage` inside a parameterized route', async ({
page,
browserName,
}) => {
// This test is flaky on firefox
// https://github.com/getsentry/sentry-javascript/issues/8398
if (browserName === 'firefox') {
test.skip();
}

const envelope = await getFirstSentryEnvelopeRequest<Event>(page, '/loader-json-response/0');

const sentryTraceTag = await page.$('meta[name="sentry-trace"]');
Expand Down
7 changes: 1 addition & 6 deletions packages/remix/test/integration/test/client/pageload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { getFirstSentryEnvelopeRequest } from './utils/helpers';
import { test, expect } from '@playwright/test';
import { Event } from '@sentry/types';

test('should add `pageload` transaction on load.', async ({ page, browserName }) => {
// This test is flaky on firefox
if (browserName === 'firefox') {
test.skip();
}

test('should add `pageload` transaction on load.', async ({ page }) => {
const envelope = await getFirstSentryEnvelopeRequest<Event>(page, '/');

expect(envelope.contexts?.trace.op).toBe('pageload');
Expand Down

0 comments on commit 40fe2a0

Please sign in to comment.