aws-amplify / aws-amplify/amplify-hosting

"View Cypress Results" button leads to 404

Open
#2,341 11 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-console/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-console/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-console/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

### App Id

dazj4he0xk1lv

### Region

us-east-1

### Amplify Console feature

Previews

### Describe the bug

Can't download Cypress tests results.

### Expected behavior

Can download Cypress tests results.

### Reproduction steps

Deploy with Cypress tests

### Build Settings

```yaml
# https://docs.amplify.aws/cli/usage/headless
# https://docs.aws.amazon.com/amplify/latest/userguide/environment-variables.html
# https://github.com/aws-amplify/amplify-console/issues/176
# https://github.com/aws-amplify/amplify-console/issues/229
# https://github.com/aws-amplify/amplify-console/issues/1642
# https://github.com/aws-amplify/amplify-console/issues/1330#issuecomment-739493860
version: 1
backend:
phases:
preBuild:
commands:
- yum update --assumeyes
# https://stedolan.github.io/jq/download/
- wget --output-document jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
- chmod +x ./jq
- cp jq /usr/bin
- echo "JQ_VERSION="$(jq --version)
- node ./scripts/update_amplify_config.js
build:
commands:
- '# Execute Amplify CLI with the helper script'
- chmod u+x ./scripts/amplifyPush.sh
- ./scripts/amplifyPush.sh --simple
frontend:
phases:
preBuild:
commands:
- nvm install 14
- nvm use 14
# https://stackoverflow.com/questions/58482655/what-is-the-closest-to-npm-ci-in-yarn
- rm -rf node_modules && yarn install --frozen-lockfile # equivalent of `npm ci`
build:
commands:
- yarn build

artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- ~/.cache
test:
phases:
preTest:
commands:
# https://docs.aws.amazon.com/amplify/latest/userguide/running-tests.html
# https://aws.amazon.com/blogs/mobile/run-end-to-end-cypress-tests-for-your-fullstack-ci-cd-deployment-with-amplify-console/
# https://github.com/aws-amplify/amplify-console/issues/583
# https://github.com/aws-amplify/amplify-console/issues/240
# https://github.com/cypress-io/cypress/issues/6960
- nvm use 14
- yarn add ts-node
- yarn add wait-on
- yarn add pm2
- yarn add mocha mochawesome mochawesome-merge mochawesome-report-generator
- yarn pm2 start 'yarn start:test'
- yarn wait-on http://localhost:3000
test:
commands:
# https://docs.cypress.io/guides/guides/command-line#cypress-run-config-lt-config-gt
- yarn test:e2e:ci
postTest:
commands:
- yarn mochawesome-merge cypress/report/mochawesome-report/*.json > cypress/report/mochawesome.json
- yarn pm2 kill
artifacts:
baseDirectory: cypress
configFilePath: '**/mochawesome.json'
files:
- '**/*.png'
- '**/*.mp4'
```

### Additional information
I'm also not seeing a "pretty" display of the tests, it's just the log, which makes it very hard to figure out what happened when tests fail. I checked #176, but it doesn't fix it.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the provided App Id, region, and Build Settings, then inspect the "View Cypress Results" action in Amplify Console Previews. Done means the button no longer returns a 404 and Cypress results can be downloaded; the report display concern is also clarified or addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.