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 instruction for local e2e test launch #848

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

vrozaev
Copy link
Collaborator

@vrozaev vrozaev commented Nov 6, 2024

No description provided.

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v18.19.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

All the lines above might be removed if we use base image from our Dockerfile, isn't it?

npx playwright install-deps
cd ..
npm run e2e:localmode:screenshots:update
'
Copy link
Collaborator

Choose a reason for hiding this comment

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

read -p "Enter base url of your development stand: " BASE_URL ; \
docker run --rm --network host -it -w /work \
    -v $(pwd):/work \
    -e BASE_URL=${BASE_URL}
    "ubuntu:jammy" \
    /bin/bash -c '
            apt-get update
            apt-get install curl -y
            curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash 
            export NVM_DIR="$HOME/.nvm"
            [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
            [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
            nvm install v18.19.0
            cd tests 
            npm ci 
            npx playwright install
            npx playwright install-deps
            cd ..
            npm run e2e:localmode:screenshots:update
'

@vrozaev vrozaev force-pushed the vrozaev/run-test-in-docker-locally-how-to branch from 434f725 to 045c11a Compare November 13, 2024 09:42

# Terminal 2: mount repo in docker image and prepare everyting for tests run
# Make sure that you specify correct BASE_URL for e2e tests
# For linux use http:/localhost:8080
Copy link
Collaborator

Choose a reason for hiding this comment

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

http://localhost:8080

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks!

@vrozaev vrozaev force-pushed the vrozaev/run-test-in-docker-locally-how-to branch from 045c11a to 15cb542 Compare November 13, 2024 12:00
@vrozaev vrozaev merged commit 9acf424 into main Nov 13, 2024
9 of 10 checks passed
@vrozaev vrozaev deleted the vrozaev/run-test-in-docker-locally-how-to branch November 13, 2024 12:36
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

Successfully merging this pull request may close these issues.

2 participants