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

Suggestion: Replace hard-coded URLS with ENV parameters #40

Open
yairEO opened this issue May 29, 2024 · 0 comments
Open

Suggestion: Replace hard-coded URLS with ENV parameters #40

yairEO opened this issue May 29, 2024 · 0 comments

Comments

@yairEO
Copy link

yairEO commented May 29, 2024

https://playwright.dev/docs/test-parameterize#passing-environment-variables

For example:

import "dotenv/config";

...

async goto() {
  await this.page.goto(proccess.env.TESTS_URL);
}

In my .env file I've configured the following:

TESTS_URL=http://localhost:3000
TESTS_BACKEND_API_URL=https://foo.bar
@yairEO yairEO changed the title Replace hard-coded URLS with ENV parameters Suggestion: Replace hard-coded URLS with ENV parameters May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant