Skip to content

Commit

Permalink
chore: fix ci (#668)
Browse files Browse the repository at this point in the history
* chore: fix ci

* update

* update

* update

* update

* update
  • Loading branch information
franklevasseur authored Mar 25, 2024
1 parent be85034 commit 4950e68
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"test:e2e:pg": "cross-env POSTGRESQL=true jest -c ./test/jest.e2e.config.ts",
"test:sec:pg": "cross-env POSTGRESQL=true jest -c ./test/jest.security.config.ts",
"test:mig:pg": "cross-env POSTGRESQL=true jest -c ./test/jest.migration.config.ts",
"test:chat:chrome": "start-test 'start' http://localhost:3100/status 'ts-node packages/inject/test/serve.ts' 3700 'cypress run --browser chrome'",
"test:chat:firefox": "start-test 'start' http://localhost:3100/status 'ts-node packages/inject/test/serve.ts' 3700 'cypress run --browser firefox'",
"test:chat:chrome": "start-test 'start' 'http://localhost:3100/status' 'ts-node packages/inject/test/serve.ts' '3700' 'cypress run --browser chrome'",
"test:chat:firefox": "start-test 'start' 'http://localhost:3100/status' 'ts-node packages/inject/test/serve.ts' '3700' 'cypress run --browser firefox'",
"cypress:open": "cypress open"
},
"bin": "./packages/server/dist/index.js",
Expand Down
4 changes: 4 additions & 0 deletions packages/inject/test/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const startServer = async () => {
const app = express()
const client = await getMessagingClient()

app.get('/', async (req, res) => {
res.sendStatus(200)
})

app.get<MessagingConfig>('/getConfig', async (req, res) => {
res.json({ client, messagingUrl })
})
Expand Down
12 changes: 9 additions & 3 deletions test/cypress/webchat.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ describe('Webchat', () => {
cy.openWebchat()

cy.wait(400)

cy.log('#### HELLO ###')

checkLifecycleEvent(0, 'CONFIG.SET')
checkLifecycleEvent(1, 'USER.CONNECTED')
checkLifecycleEvent(2, 'LIFECYCLE.LOADED')
// we don't really care about the order of the events between
checkLifecycleEvent(1, 'LIFECYCLE.LOADED')
checkLifecycleEvent(2, 'UI.SET-CLASS')
checkLifecycleEvent(3, 'UI.OPENED')
// checkLifecycleEvent(4, 'UI.SET-CLASS')
checkLifecycleEvent(5, 'USER.CONNECTED')
// checkLifecycleEvent(6, 'USER.CONNECTED')
checkLifecycleEvent(7, 'LIFECYCLE.READY')
})

Expand Down

0 comments on commit 4950e68

Please sign in to comment.