Skip to content

Commit

Permalink
[test] Try improve test e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
yunusefendi52 committed Dec 4, 2024
1 parent d226e35 commit 719c07b
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# user=password:user=password;
NUXT_LOCAL_AUTHS=usertest1=a5756f781e0e433986364b82de545c3b:usertest2=963a71f1868248df912e7488e02233f0
NUXT_PUBLIC_LOCAL_AUTH_ENABLED=true
NUXT_APP_ENABLE_DRIZZLE_LOGGING=true
NUXT_APP_ENABLE_DRIZZLE_LOGGING=false
NUXT_DB_URL=http://localhost:8888
NUXT_DB_AUTH_TOKEN=basic:c3FsZDppOHJ3ZXlzNzBkN2Zh
NUXT_S3_ENDPOINT=http://localhost:9000
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -38,8 +38,6 @@ jobs:
- name: Install Playwright Browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: bunx playwright install --with-deps
- name: Setup e2e env
run: echo "${{ secrets.ENV_TESTS_BASE64 }}" | base64 --decode >> .env
- run: bun run e2e

- name: Deploy
2 changes: 1 addition & 1 deletion pages/apps.vue
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ const upperCase = (value: string | null | undefined) => {
orgName: orgNameParam?.toString() ?? '',
},
}" v-if="isOrg">
<Button icon="pi pi-cog" outlined aria-label="Settings" />
<Button icon="pi pi-cog" outlined aria-label="Settings" data-testid="settings_btn" />
</NuxtLink>
</div>
</div>
2 changes: 1 addition & 1 deletion setup-test.sh
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

dotenv() {
set -a
[ -f .env ] && . .env.test
[ -f .env.test ] && . .env.test
set +a
}

4 changes: 2 additions & 2 deletions tests-e2e/apps.test.mts
Original file line number Diff line number Diff line change
@@ -38,8 +38,8 @@ test('Apps test', async ({ page, goto, context }) => {

await test.step('User admin can delete org', async () => {
await page.getByTestId('a_menus').getByText(orgName).click()
await page.getByLabel('Settings').click()
await page.getByLabel('Danger').click()
await page.getByTestId('settings_btn').click()
await page.getByRole('menuitem').nth(2).click()
const orgId = await page.getByTestId('org_name_span').textContent()
await page.getByTestId('orgName').fill(orgId!)
await page.getByTestId('deleteOrgBtn').click()

0 comments on commit 719c07b

Please sign in to comment.