Skip to content

Commit a43e2c5

Browse files
workaround e2e flakes, consume all mf modules
1 parent efc2f8d commit a43e2c5

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

examples/federation/epic-stack/rsbuild.config.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ export default defineConfig({
6767
},
6868
environments: {
6969
web: {
70-
source: {
71-
define: {
72-
'process.env.WEB': 'true',
73-
},
74-
},
7570
tools: {
7671
rspack: {
7772
plugins: [
@@ -82,11 +77,6 @@ export default defineConfig({
8277
plugins: [],
8378
},
8479
node: {
85-
source: {
86-
define: {
87-
'process.env.WEB': 'false',
88-
},
89-
},
9080
tools: {
9181
rspack: {
9282
plugins: [

examples/federation/epic-stack/tests/e2e/search.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test('Search from home page', async ({ page, insertNewUser }) => {
88

99
await page.getByRole('searchbox', { name: /search/i }).fill(newUser.username)
1010
await page.getByRole('button', { name: /search/i }).click()
11-
await page.waitForTimeout(2000)
11+
await page.waitForTimeout(500)
1212

1313
await page.waitForURL(
1414
`/users?${new URLSearchParams({ search: newUser.username })}`,
@@ -21,7 +21,7 @@ test('Search from home page', async ({ page, insertNewUser }) => {
2121

2222
await page.getByRole('searchbox', { name: /search/i }).fill('__nonexistent__')
2323
await page.getByRole('button', { name: /search/i }).click()
24-
await page.waitForTimeout(2000)
24+
await page.waitForTimeout(500)
2525
await page.waitForURL(`/users?search=__nonexistent__`)
2626

2727
await expect(userList.getByRole('listitem')).not.toBeVisible()

examples/federation/epic-stack/tests/e2e/settings-profile.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ test('Users can update their basic info', async ({ page, login }) => {
2020
.fill(newUserData.username)
2121

2222
await page.getByRole('button', { name: /^save/i }).click()
23-
await page.waitForTimeout(2000)
2423
})
2524

2625
test('Users can update their password', async ({ page, login }) => {
@@ -31,7 +30,6 @@ test('Users can update their password', async ({ page, login }) => {
3130
await page.waitForTimeout(2000)
3231

3332
await page.getByRole('link', { name: /change password/i }).click()
34-
await page.waitForTimeout(2000)
3533

3634
await page
3735
.getByRole('textbox', { name: /^current password/i })
@@ -42,7 +40,6 @@ test('Users can update their password', async ({ page, login }) => {
4240
.fill(newPassword)
4341

4442
await page.getByRole('button', { name: /^change password/i }).click()
45-
await page.waitForTimeout(2000)
4643

4744
await expect(page).toHaveURL(`/settings/profile`)
4845

@@ -67,7 +64,6 @@ test('Users can update their profile photo', async ({ page, login }) => {
6764
.getAttribute('src')
6865

6966
await page.getByRole('link', { name: /change profile photo/i }).click()
70-
await page.waitForTimeout(2000)
7167

7268
await expect(page).toHaveURL(`/settings/profile/photo`)
7369

@@ -76,7 +72,6 @@ test('Users can update their profile photo', async ({ page, login }) => {
7672
.setInputFiles('./tests/fixtures/images/user/kody.png')
7773

7874
await page.getByRole('button', { name: /save/i }).click()
79-
await page.waitForTimeout(2000)
8075

8176
await expect(
8277
page,
@@ -97,10 +92,8 @@ test('Users can change their email address', async ({ page, login }) => {
9792
await page.goto('/settings/profile')
9893
await page.waitForTimeout(2000)
9994
await page.getByRole('link', { name: /change email/i }).click()
100-
await page.waitForTimeout(2000)
10195
await page.getByRole('textbox', { name: /new email/i }).fill(newEmailAddress)
10296
await page.getByRole('button', { name: /send confirmation/i }).click()
103-
await page.waitForTimeout(2000)
10497
await expect(page.getByText(/check your email/i)).toBeVisible()
10598
const email = await waitFor(() => readEmail(newEmailAddress), {
10699
errorMessage: 'Confirmation email was not sent',
@@ -111,7 +104,6 @@ test('Users can change their email address', async ({ page, login }) => {
111104
invariant(code, 'Onboarding code not found')
112105
await page.getByRole('textbox', { name: /code/i }).fill(code)
113106
await page.getByRole('button', { name: /submit/i }).click()
114-
await page.waitForTimeout(2000)
115107
await expect(page.getByText(/email changed/i)).toBeVisible()
116108

117109
const updatedUser = await prisma.user.findUnique({

0 commit comments

Comments
 (0)