Skip to content

Commit

Permalink
simple
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Ziaei committed Mar 31, 2024
1 parent 474d7fb commit bac3200
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 41 deletions.
2 changes: 0 additions & 2 deletions apps/app/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ export default defineConfig({
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
},
projects: [
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
storageState: 'mnt/auth.json',
},
dependencies: ['setup'],
},
],
webServer: {
Expand Down
30 changes: 0 additions & 30 deletions apps/app/tests/e2e/instagram-auth.setup.ts

This file was deleted.

9 changes: 1 addition & 8 deletions apps/app/tests/e2e/smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,13 @@ test.describe('POST /jokes', () => {
expect(await req.text()).toMatch(/unauthorized/i)
})

test('authenticated', async ({ request, page }) => {
test('authenticated', async ({ request }) => {
const req = await request.post('/jokes', {
headers: { Authorization: process.env.AUTH_TOKEN },
})
expect(req.ok()).toBeTruthy()
expect(req.status()).toBe(200)
const response = await req.json()
expect(response).toHaveProperty('message')

await page.goto(
`https://www.instagram.com/direct/t/${process.env.IG_THREAD_ID}/`,
)
await expect(
page.getByLabel('Messages in conversation with'),
).toContainText(response.message)
})
})
1 change: 0 additions & 1 deletion apps/scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"scripts": {
"dev": "wrangler dev",
"start": "wrangler dev",
"deploy": "wrangler deploy",
"typecheck": "tsc"
},
"devDependencies": {
Expand Down

0 comments on commit bac3200

Please sign in to comment.