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

[Chore] Add playwright dependencies #409

Open
dfberry opened this issue Nov 30, 2023 · 4 comments
Open

[Chore] Add playwright dependencies #409

dfberry opened this issue Nov 30, 2023 · 4 comments
Labels
dependencies Pull requests that update a dependency file e2e-test scope: setup Taks relative to project setup

Comments

@dfberry
Copy link
Contributor

dfberry commented Nov 30, 2023

Add dependencies to postCreateCommand script as stated by product group in Issue #28331

@diberry
Copy link
Collaborator

diberry commented Jan 11, 2024

Actually they take to long to install. Move toward setting up playwright as a service for docker compose.

# Dockerfile
FROM mcr.microsoft.com/playwright:v1.35.0-jammy
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY . .

CMD ["npm", "start"]
//package.json
{
  "dependencies": {
    "applicationinsights": "^3.0.0-beta.7",
    "playwright": "^1.35.0"
  },
  "name": "playwright-job",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index.js"
  },
  "keywords": [],
  "author": "",
  "license": "MIT",
  "description": ""
}
  1. Can run locally via docker compose and npm run start:services
  2. Can run in CICD/GitHub actions
  3. Can run as Container app job

@manekinekko
Copy link
Collaborator

I like this approach better :)

@manekinekko manekinekko added e2e-test scope: setup Taks relative to project setup dependencies Pull requests that update a dependency file and removed status: needs triage labels Mar 8, 2024
@manekinekko
Copy link
Collaborator

What's the status of this taskl @dfberry?

@dfberry
Copy link
Contributor Author

dfberry commented Mar 8, 2024

@manekinekko There are issues with playwright for dev containers:

  1. how to pull the dependencies only at the time they are needed at not when the dev container first opens. I have ideas but I'm not sure what is the best path. Perhaps @mxschmitt on the Playwright team knows.
  2. Extended the tests easily requires access to CodeGen which doesn't easily run in a devcontainer. See @jongio article about getting CodeGen to work on Windows. We would need this both for Mac and Win.
  3. How to get the current front end URLs regardless of where they are: Codespaces, Local dev container, CICD, or Azure. Codespaces updated there env vars in the last few months so I don't know if the current method in the tests is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file e2e-test scope: setup Taks relative to project setup
Projects
None yet
Development

No branches or pull requests

3 participants