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

Masonry: Fix integration tests #3956

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 0 deletions playwright/masonry/null-items.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import getServerURL from './utils/getServerURL';
import selectors from './utils/selectors';

test.describe('Masonry: Null items', () => {
// Manually configuring the retries for this flaky test
test.describe.configure({retries: 3})

test('should not throw an error when null/undefined items are inserted', async ({ page }) => {
await page.setViewportSize({ width: 1000, height: 1000 });
await page.goto(getServerURL({ virtualize: true }));
Expand Down
3 changes: 2 additions & 1 deletion playwright/masonry/utils/getServerURL.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const BASE_URL = 'http://localhost:8888';

Choose a reason for hiding this comment

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

@JosAnGoCa apparently this would only work in local environment. Can we please remove this line and see if the tests pass now?

const BASE_PATH = '/integration-test/masonry';

const normalizeValue = (val: boolean | number) => {
Expand Down Expand Up @@ -38,7 +39,7 @@ const getServerURL = (options?: Options | null): string => {
.join('&');
}

return `${BASE_PATH}?${serializedOptions}`;
return `${process.env.CI ? '' : BASE_URL}${BASE_PATH}?${serializedOptions}`;
};

export default getServerURL;
Loading