What would be the best way to configure and use urls for a project with
- 2x WebApps
- 3x Environments
... where we have a situation that looks like this as an example
Fruit App
- baseurls:
- dev.fruits.com
- test.fruits.com
- prod.fruits.com
- endpoints:
- /banana/
- /kiwi/
- /apple/
Color App
- baseurls:
- dev.colors.com
- test.colors.com
- prod.colors.com
- endpoints:
- /red/
- /blue/
- /green/
... and tests like this
test('Navigate to fruits/banana', async () => {
await page.goto('https://https://dev.fruits.com/banana/');
...
});
test('Navigate to colors/red', async () => {
await page.goto('https://https://dev.colors.com/red/');
...
});
... where I'd like to
- Replace dev.fruits.com and dev.colors.com with baseurl variables
- The "dev" part should be dynamic based on which environment I run tests in