Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4333e6a
Setup first test for e2e first page basic standard onboarding flow
May 11, 2026
d72ee99
reorganize e2e fill form helpers + add first step
May 12, 2026
acc5ec1
complete basic onboarding e2e test
May 13, 2026
7b1d4ef
fix format errors
May 13, 2026
5287bfd
Add Spain scenario (and keep the first one in case of we need it)
May 15, 2026
be81292
chore: prepare release v1.32.0 (#1004)
gabrielseco May 11, 2026
f64ebb6
fix(zizmor) - static analyze github actions (#1005)
gabrielseco May 12, 2026
f03e986
feat(htmltocomponents) - add example and expose props (#993)
gabrielseco May 12, 2026
d0a5a6c
docs(transformHTMLToComponents) - Add some docs (#994)
gabrielseco May 12, 2026
2be999d
1.33.0 (#1006)
gabrielseco May 12, 2026
b3a97dc
chore(oxlint) - migrate comments (#1008)
gabrielseco May 13, 2026
4673465
chore(prettier) - remove stale files (#1007)
gabrielseco May 13, 2026
3193595
fix(contractor-onboarding) - handle not nested errors (#1012)
gabrielseco May 14, 2026
8637e3e
fix(saudi-arabia) - fix submission (#1017)
gabrielseco May 14, 2026
5a8b4e0
fix(contractor-onboarding) - fix eor card appear when subscriptions r…
gabrielseco May 14, 2026
39c0674
1.33.1 (#1018)
gabrielseco May 14, 2026
a54c62b
fix(contractor-onboarding) - handle empty contractor subscriptions (#…
gabrielseco May 14, 2026
b7227bc
docs(openapi) - regenerate openapi spec and fix imports (#1019)
gabrielseco May 14, 2026
1b21078
chore(deps-dev): update dependency oxlint to v1.63.0 (#999)
renovate[bot] May 15, 2026
7236766
chore(deps-dev): update dependency filesize to v11.0.17 (#997)
renovate[bot] May 15, 2026
c34647a
chore(deps-dev): update dependency jsdom to v29.1.1 (#989)
renovate[bot] May 15, 2026
a013bc0
chore(deps): update dependency @tanstack/react-query to v5.100.9 (#967)
renovate[bot] May 15, 2026
f1f373f
chore(deps-dev): update dependency @types/node to v24.12.3 (#1020)
renovate[bot] May 15, 2026
916af69
chore(deps-dev): update dependency oxfmt to v0.48.0 (#998)
renovate[bot] May 15, 2026
a26543f
chore(deps-dev): update dependency vite to v8.0.11 (#1021)
renovate[bot] May 15, 2026
de8ddc3
chore(deps-dev): update dependency msw to v2.14.5 (#985)
renovate[bot] May 15, 2026
a9dd8bf
chore(deps): update dependency axios to v1.16.0 (#1027)
renovate[bot] May 15, 2026
5c5c39a
chore(deps): update amondnet/vercel-action action to v42.3.0 (#1026)
renovate[bot] May 15, 2026
4b78697
Wait for loading before testing next page
May 15, 2026
a5dbffc
back to only one test for basic employee
May 15, 2026
24a7e50
Format code
May 15, 2026
e770ba3
reorganize order of filling fields
May 15, 2026
b0707e1
new email to avoid force France
May 15, 2026
4d971e0
remove unusued import
May 15, 2026
e02e9b3
Fix country selection bug with webkit and use specific company for th…
May 15, 2026
f0e4966
fix bug with hidden button in the viewport
May 15, 2026
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
3 changes: 2 additions & 1 deletion example/e2e/add-estimation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test, expect } from '@playwright/test';
import { fillEstimationForm, setupVercelBypass } from './helpers';
import { setupVercelBypass } from './helpers/general';
import { fillEstimationForm } from './helpers/estimation';

test.describe('add estimation from drawer', () => {
test.beforeEach(async ({ page }) => {
Expand Down
3 changes: 2 additions & 1 deletion example/e2e/annual-gross-salary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test, expect } from '@playwright/test';
import { fillEstimationForm, setupVercelBypass } from './helpers';
import { setupVercelBypass } from './helpers/general';
import { fillEstimationForm } from './helpers/estimation';

test.describe('annual gross salary', () => {
test.beforeEach(async ({ page }) => {
Expand Down
3 changes: 2 additions & 1 deletion example/e2e/edit-estimation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test, expect } from '@playwright/test';
import { fillEstimationForm, setupVercelBypass } from './helpers';
import { setupVercelBypass } from './helpers/general';
import { fillEstimationForm } from './helpers/estimation';

test.describe('edit estimation', () => {
test.beforeEach(async ({ page }) => {
Expand Down
22 changes: 1 addition & 21 deletions example/e2e/helpers.ts → example/e2e/helpers/estimation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Page, Route } from '@playwright/test';
import { Page } from '@playwright/test';

interface FillEstimationFormOptions {
country: string;
Expand Down Expand Up @@ -26,23 +26,3 @@ export async function fillEstimationForm(
}
await page.click('.submit-button');
}

export async function setupVercelBypass(page: Page) {
await page.route('**/*', async (route: Route) => {
const url = route.request().url();

// Only add Vercel bypass headers to requests to the Vercel deployment
if (url.includes('vercel.app') || url.includes('localhost:3001')) {
const headers = {
...route.request().headers(),
'x-vercel-protection-bypass': process.env.VERCEL_BYPASS_TOKEN || '',
'x-vercel-set-bypass-cookie': 'true',
};

await route.continue({ headers });
} else {
// For external requests (like to gateway.remote.com), continue without the headers
await route.continue();
}
});
}
21 changes: 21 additions & 0 deletions example/e2e/helpers/general.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Page, Route } from '@playwright/test';

export async function setupVercelBypass(page: Page) {
await page.route('**/*', async (route: Route) => {
const url = route.request().url();

// Only add Vercel bypass headers to requests to the Vercel deployment
if (url.includes('vercel.app') || url.includes('localhost:3001')) {
const headers = {
...route.request().headers(),
'x-vercel-protection-bypass': process.env.VERCEL_BYPASS_TOKEN || '',
'x-vercel-set-bypass-cookie': 'true',
};

await route.continue({ headers });
} else {
// For external requests (like to gateway.remote.com), continue without the headers
await route.continue();
}
});
}
306 changes: 306 additions & 0 deletions example/e2e/helpers/onboarding.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,306 @@
import { Page } from '@playwright/test';

interface fillOnboardingIntroductionFormOptions {
company_id?: string;
type?: string;
employment_id?: string;
external_id?: string;
}

export async function fillOnboardingIntroductionForm(
page: Page,
options: Partial<fillOnboardingIntroductionFormOptions>,
) {
if (options.company_id) {
await page.fill('#companyId', options.company_id);
} else {
await page.fill('#companyId', '');
}

if (options.type) {
await page.selectOption('#type', options.type);
}

if (options.employment_id) {
await page.fill('#employmentId', options.employment_id);
} else {
await page.fill('#employmentId', '');
}

if (options.external_id) {
await page.fill('#externalId', options.external_id);
} else {
await page.fill('#externalId', '');
}

await page.click('.onboarding-form-button');
}

interface fillOnboardingStep1FormOptions {
country_id?: string;
}

export async function fillOnboardingStep1Form(
page: Page,
options: Partial<fillOnboardingStep1FormOptions>,
) {
if (options.country_id) {
await page.locator('[data-field="country"]').click();
await page.getByRole('option', { name: 'France' }).click();
}

await page.click('.submit-button');
}

interface fillOnboardingStep2FormOptions {
fullname?: string;
personal_email?: string;
work_email?: string;
job_title?: string;
country_id?: string;
tax_job_category?: string;
provisional_start_date?: string;
has_seniority_date?: string;
}

export async function fillOnboardingStep2Form(
page: Page,
options: Partial<fillOnboardingStep2FormOptions>,
) {
if (options.fullname) {
await page
.locator('[data-field="name"]')
.locator('input')
.fill(options.fullname);
}

if (options.personal_email) {
await page
.locator('[data-field="email"]')
.locator('input')
.fill(options.personal_email);
}

if (options.work_email) {
await page
.locator('[data-field="work_email"]')
.locator('input')
.fill(options.work_email);
}

if (options.job_title) {
await page
.locator('[data-field="job_title"]')
.locator('input')
.fill(options.job_title);
}

if (options.country_id) {
await page
.locator('[data-field="tax_servicing_countries"]')
.getByRole('combobox')
.click();
await page.getByRole('option', { name: options.country_id }).click();
}

if (options.tax_job_category) {
await page
.locator('[data-field="tax_job_category"]')
.getByRole('combobox')
.click();
await page.getByRole('option', { name: options.tax_job_category }).click();
}

if (options.provisional_start_date) {
await page.getByTestId('date-picker-button-provisional_start_date').click();
if (options.provisional_start_date === 'auto') {
await page
.locator('button[role="gridcell"]:not([disabled])')
.first()
.click();
} else {
await page
.getByRole('button', {
name: options.provisional_start_date,
exact: true,
})
.and(page.locator(':not([disabled])'))
.first()
.click();
}
}

if (options.has_seniority_date) {
await page
.locator(
`[data-field="has_seniority_date"] button[value="${options.has_seniority_date}"]`,
)
.click();
}

await page.click('.submit-button');
}

interface fillOnboardingStep3FormOptions {
contract_duration_type?: boolean;
work_schedule?: string;
work_hours_per_week?: string;
executive_experience_level?: string;
annual_gross_salary?: string;
has_signing_bonus?: string;
has_bonus?: string;
has_commissions?: string;
equity_compensation?: string;
role_description?: string;
probation_length?: string;
renewal_probation_length?: boolean;
home_office_allowance?: string;
hardship_allowance?: string;
work_address_is_home_address?: string;
non_compete_clause_apply?: string;
}

export async function fillOnboardingStep3Form(
page: Page,
options: Partial<fillOnboardingStep3FormOptions>,
) {
if (options.contract_duration_type) {
await page
.locator(`[data-field="contract_duration_type"] button[value="on"]`)
.click();
}

if (options.work_schedule) {
await page
.locator(
`[data-field="work_schedule"] button[role="radio"][value="${options.work_schedule}"]`,
)
.click();
}

if (options.work_hours_per_week) {
await page
.locator(
`[data-field="work_hours_per_week"] button[role="radio"][value="${options.work_hours_per_week}"]`,
)
.click();
}

if (options.executive_experience_level) {
await page
.locator(
`[data-field="executive_experience_level"] button[role="radio"][value^="${options.executive_experience_level}"]`,
)
.click();
}

if (options.annual_gross_salary) {
await page
.locator('[data-field="annual_gross_salary"] input')
.fill(options.annual_gross_salary);
}

if (options.has_signing_bonus) {
await page
.locator(
`[data-field="has_signing_bonus"] button[role="radio"][value="${options.has_signing_bonus}"]`,
)
.click();
}

if (options.has_bonus) {
await page
.locator(
`[data-field="has_bonus"] button[role="radio"][value="${options.has_bonus}"]`,
)
.click();
}

if (options.has_commissions) {
await page
.locator(
`[data-field="has_commissions"] button[role="radio"][value="${options.has_commissions}"]`,
)
.click();
}

if (options.equity_compensation) {
await page
.locator(
`[data-field="equity_compensation.offer_equity_compensation"] button[role="radio"][value="${options.equity_compensation}"]`,
)
.click();
}

if (options.role_description) {
await page
.locator('[data-field="role_description"] textarea')
.fill(options.role_description);
}

if (options.probation_length) {
await page
.locator('[data-field="probation_length"] input')
.fill(options.probation_length);
}

if (options.renewal_probation_length) {
await page
.locator(
`[data-field="renewal_probation_length"] button[role="checkbox"]`,
)
.click();
}

if (options.home_office_allowance) {
await page
.locator('[data-field="home_office_allowance"] input')
.fill(options.home_office_allowance);
}

if (options.hardship_allowance) {
await page
.locator('[data-field="hardship_allowance"] input')
.fill(options.hardship_allowance);
}

if (options.work_address_is_home_address) {
await page
.locator(
`[data-field="work_address_is_home_address"] button[role="radio"][value="${options.work_address_is_home_address}"]`,
)
.click();
}

if (options.non_compete_clause_apply) {
await page
.locator(
`[data-field="non_compete_clause_apply"] button[role="radio"][value="${options.non_compete_clause_apply}"]`,
)
.click();
}

await page.click('.submit-button');
}

interface fillOnboardingStep4FormOptions {
mental_health?: string;
business_travel_insurance?: string;
}

export async function fillOnboardingStep4Form(
page: Page,
options: Partial<fillOnboardingStep4FormOptions>,
) {
if (options.mental_health) {
await page.getByRole('radio', { name: options.mental_health }).click();
}

if (options.business_travel_insurance) {
await page
.getByRole('radio', { name: options.business_travel_insurance })
.click();
}

await page.click('.submit-button');
}
3 changes: 2 additions & 1 deletion example/e2e/hiring-budget.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test, expect } from '@playwright/test';
import { fillEstimationForm, setupVercelBypass } from './helpers';
import { setupVercelBypass } from './helpers/general';
import { fillEstimationForm } from './helpers/estimation';

test.describe('hiring budget', () => {
test.beforeEach(async ({ page }) => {
Expand Down
Loading
Loading