Skip to content

Commit

Permalink
chore: re-enable flaky tests (#2591)
Browse files Browse the repository at this point in the history
* chore: re-enable flaky tests

* chore: re-enable vault tests in ci

* chore: add missing dep

* chore: fix building web on PR

* chore: add sleep to allow deleting account to propagate
  • Loading branch information
karolsojko authored Oct 18, 2023
1 parent d39d5da commit ac353a4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 39 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,24 @@ jobs:
trigger_workflow: true
wait_workflow: true

# e2e-vaults:
# name: E2E Vaults Test Suite
# needs: build-docker
# runs-on: ubuntu-latest
# steps:
# - name: Run E2E vaults test suite
# if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false }}"
# uses: convictional/trigger-workflow-and-wait@master
# with:
# owner: standardnotes
# repo: server
# github_token: ${{ secrets.CI_PAT_TOKEN }}
# workflow_file_name: e2e-test-suite.yml
# wait_interval: 30
# client_payload: '{"snjs_image_tag": "${{ github.sha }}", "suite": "vaults", "author": "${{ github.actor }}", "ref_name": "app:${{ github.ref }}"}'
# propagate_failure: true
# trigger_workflow: true
# wait_workflow: true
e2e-vaults:
name: E2E Vaults Test Suite
needs: build-docker
runs-on: ubuntu-latest
steps:
- name: Run E2E vaults test suite
if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false }}"
uses: convictional/trigger-workflow-and-wait@master
with:
owner: standardnotes
repo: server
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: e2e-test-suite.yml
wait_interval: 30
client_payload: '{"snjs_image_tag": "${{ github.sha }}", "suite": "vaults", "author": "${{ github.actor }}", "ref_name": "app:${{ github.ref }}"}'
propagate_failure: true
trigger_workflow: true
wait_workflow: true

publish:
name: Publish to NPM
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/snjs.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build:snjs
run: yarn build:web
- name: ESLint
run: yarn lint
- name: Test
Expand Down Expand Up @@ -91,20 +91,20 @@ jobs:
trigger_workflow: true
wait_workflow: true

# e2e-vaults:
# name: E2E Vaults Test Suite
# needs: build-docker
# runs-on: ubuntu-latest
# steps:
# - name: Run E2E vaults test suite
# uses: convictional/trigger-workflow-and-wait@master
# with:
# owner: standardnotes
# repo: server
# github_token: ${{ secrets.CI_PAT_TOKEN }}
# workflow_file_name: e2e-test-suite.yml
# wait_interval: 30
# client_payload: '{"snjs_image_tag": "${{ github.sha }}", "suite": "vaults", "author": "${{ github.actor }}", "ref_name": "app:${{ github.ref }}"}'
# propagate_failure: true
# trigger_workflow: true
# wait_workflow: true
e2e-vaults:
name: E2E Vaults Test Suite
needs: build-docker
runs-on: ubuntu-latest
steps:
- name: Run E2E vaults test suite
uses: convictional/trigger-workflow-and-wait@master
with:
owner: standardnotes
repo: server
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: e2e-test-suite.yml
wait_interval: 30
client_payload: '{"snjs_image_tag": "${{ github.sha }}", "suite": "vaults", "author": "${{ github.actor }}", "ref_name": "app:${{ github.ref }}"}'
propagate_failure: true
trigger_workflow: true
wait_workflow: true
3 changes: 2 additions & 1 deletion packages/clipper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"webpack": "*"
},
"dependencies": {
"@mozilla/readability": "^0.4.2"
"@mozilla/readability": "^0.4.2",
"@standardnotes/snjs": "workspace:^"
}
}
4 changes: 3 additions & 1 deletion packages/snjs/mocha/vaults/surviving.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as Collaboration from '../lib/Collaboration.js'
chai.use(chaiAsPromised)
const expect = chai.expect

describe.skip('designated survival', function () {
describe('designated survival', function () {
this.timeout(Factory.ThirtySecondTimeout)

let context
Expand Down Expand Up @@ -337,6 +337,8 @@ describe.skip('designated survival', function () {
Factory.handlePasswordChallenges(context.application, context.password)
await context.application.user.deleteAccount()

await Factory.sleep(2)

await secondContext.syncAndAwaitNotificationsProcessing()
await thirdContext.syncAndAwaitNotificationsProcessing()

Expand Down
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4232,6 +4232,7 @@ __metadata:
resolution: "@standardnotes/clipper@workspace:packages/clipper"
dependencies:
"@mozilla/readability": ^0.4.2
"@standardnotes/snjs": "workspace:^"
"@standardnotes/web": "workspace:*"
"@types/webextension-polyfill": ^0.10.0
babel-loader: ^9.1.0
Expand Down Expand Up @@ -4823,7 +4824,7 @@ __metadata:
languageName: unknown
linkType: soft

"@standardnotes/snjs@^2.41.1, @standardnotes/snjs@workspace:*, @standardnotes/snjs@workspace:packages/snjs":
"@standardnotes/snjs@^2.41.1, @standardnotes/snjs@workspace:*, @standardnotes/snjs@workspace:^, @standardnotes/snjs@workspace:packages/snjs":
version: 0.0.0-use.local
resolution: "@standardnotes/snjs@workspace:packages/snjs"
dependencies:
Expand Down

0 comments on commit ac353a4

Please sign in to comment.