mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
set cypress to test only a specific feature and record a video for debugging
This commit is contained in:
parent
0472ba86fa
commit
156b907b77
18
.github/workflows/test-e2e.yml
vendored
18
.github/workflows/test-e2e.yml
vendored
@ -5,12 +5,12 @@ jobs:
|
|||||||
fullstack_tests:
|
fullstack_tests:
|
||||||
name: Fullstack tests
|
name: Fullstack tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
# env:
|
||||||
jobs: 8
|
# jobs: 8
|
||||||
strategy:
|
# strategy:
|
||||||
matrix:
|
# matrix:
|
||||||
# run copies of the current job in parallel
|
# # run copies of the current job in parallel
|
||||||
job: [1, 2, 3, 4, 5, 6, 7, 8]
|
# job: [1, 2, 3, 4, 5, 6, 7, 8]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -28,7 +28,8 @@ jobs:
|
|||||||
id: e2e-tests
|
id: e2e-tests
|
||||||
run: |
|
run: |
|
||||||
yarn install
|
yarn install
|
||||||
yarn run cypress:run --spec $(cypress/parallel-features.sh ${{ matrix.job }} ${{ env.jobs }} )
|
# yarn run cypress:run --spec $(cypress/parallel-features.sh ${{ matrix.job }} ${{ env.jobs }} )
|
||||||
|
yarn run cypress:run --spec cypress/integration/Moderation.ReportContent.feature
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# UPLOAD SCREENSHOTS - IF TESTS FAIL #####################################
|
# UPLOAD SCREENSHOTS - IF TESTS FAIL #####################################
|
||||||
@ -39,3 +40,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: cypress-screenshots
|
name: cypress-screenshots
|
||||||
path: cypress/screenshots/
|
path: cypress/screenshots/
|
||||||
|
name: cypress-videos
|
||||||
|
path: cypress/videos/
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"ignoreTestFiles": "*.js",
|
"ignoreTestFiles": "*.js",
|
||||||
"chromeWebSecurity": false,
|
"chromeWebSecurity": false,
|
||||||
"baseUrl": "http://localhost:3000",
|
"baseUrl": "http://localhost:3000",
|
||||||
"video":false,
|
"video": true,
|
||||||
"retries": {
|
"retries": {
|
||||||
"runMode": 2,
|
"runMode": 2,
|
||||||
"openMode": 0
|
"openMode": 0
|
||||||
|
|||||||
@ -18,30 +18,30 @@ Feature: Report and Moderate
|
|||||||
| annoying-user | p1 | The Truth about the Holocaust | It never existed! |
|
| annoying-user | p1 | The Truth about the Holocaust | It never existed! |
|
||||||
| annoying-user | p2 | Fake news | This content is demonstratably infactual in some way |
|
| annoying-user | p2 | Fake news | This content is demonstratably infactual in some way |
|
||||||
|
|
||||||
Scenario Outline: Report a post from various pages
|
# Scenario Outline: Report a post from various pages
|
||||||
When I am logged in as "user"
|
# When I am logged in as "user"
|
||||||
And I navigate to page "<Page>"
|
# And I navigate to page "<Page>"
|
||||||
And I click on "Report Post" from the content menu of the post
|
# And I click on "Report Post" from the content menu of the post
|
||||||
And I confirm the reporting dialog because it is a criminal act under German law:
|
# And I confirm the reporting dialog because it is a criminal act under German law:
|
||||||
"""
|
# """
|
||||||
Do you really want to report the contribution "The Truth about the Holocaust"?
|
# Do you really want to report the contribution "The Truth about the Holocaust"?
|
||||||
"""
|
# """
|
||||||
Then I see a toaster with "Thanks for reporting!"
|
# Then I see a toaster with "Thanks for reporting!"
|
||||||
Examples:
|
# Examples:
|
||||||
| Page |
|
# | Page |
|
||||||
| / |
|
# | / |
|
||||||
| /post/p1 |
|
# | /post/p1 |
|
||||||
|
|
||||||
Scenario: Report user
|
# Scenario: Report user
|
||||||
Given I am logged in as "user"
|
# Given I am logged in as "user"
|
||||||
And I navigate to page "/post/the-truth-about-the-holocaust"
|
# And I navigate to page "/post/the-truth-about-the-holocaust"
|
||||||
When I click on the author
|
# When I click on the author
|
||||||
And I click on "Report User" from the content menu in the user info box
|
# And I click on "Report User" from the content menu in the user info box
|
||||||
And I confirm the reporting dialog because he is a holocaust denier:
|
# And I confirm the reporting dialog because he is a holocaust denier:
|
||||||
"""
|
# """
|
||||||
Do you really want to report the user "I'm gonna mute Moderators and …"?
|
# Do you really want to report the user "I'm gonna mute Moderators and …"?
|
||||||
"""
|
# """
|
||||||
Then I see a toaster with "Thanks for reporting!"
|
# Then I see a toaster with "Thanks for reporting!"
|
||||||
|
|
||||||
Scenario: Review reported content
|
Scenario: Review reported content
|
||||||
Given somebody reported the following posts:
|
Given somebody reported the following posts:
|
||||||
@ -66,8 +66,8 @@ Feature: Report and Moderate
|
|||||||
Then I see all the reported posts including from the user who muted me
|
Then I see all the reported posts including from the user who muted me
|
||||||
And I can visit the post page
|
And I can visit the post page
|
||||||
|
|
||||||
Scenario: Normal user can't see the moderation page
|
# Scenario: Normal user can't see the moderation page
|
||||||
Given I am logged in as "user"
|
# Given I am logged in as "user"
|
||||||
And I navigate to page "/"
|
# And I navigate to page "/"
|
||||||
When I click on the avatar menu in the top right corner
|
# When I click on the avatar menu in the top right corner
|
||||||
Then I can't see the moderation menu item
|
# Then I can't see the moderation menu item
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user