Skip to content

Commit

Permalink
Revert "include web-js and web-js-script in e2e tests (#471)"
Browse files Browse the repository at this point in the history
This reverts commit 0b942cd.
  • Loading branch information
aehnh committed Nov 19, 2024
1 parent 0b942cd commit 4417601
Show file tree
Hide file tree
Showing 21 changed files with 243 additions and 421 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
pull_request:
push:
branches:
- main
- develop
- feature-refactor-to-thin-frontend

jobs:
deploy:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2e-test-commitly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
workflows: ["Deploy Playground Apps to Vercel"]
types:
- completed
conclusion: success

jobs:
e2e-tests:
Expand Down
129 changes: 0 additions & 129 deletions .github/workflows/e2e-test-nightly.yml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/tests-e2e/playwright.config.ui.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from '@playwright/test';
import { defineConfig, devices } from '@playwright/test';
import dotenv from 'dotenv';
import path from 'path';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ test.describe('tests that focus on these identifiers: email (verification at sig
await model.expectScreen(ScreenNames.End);

await model.logout();
await model.expectScreen(ScreenNames.InitLogin);

// we first try login with email
await model.loginInit.removePasskeyButton();
Expand All @@ -49,7 +48,6 @@ test.describe('tests that focus on these identifiers: email (verification at sig
await model.expectScreen(ScreenNames.End);

await model.logout();
await model.expectScreen(ScreenNames.InitLogin);

// we then try login with username
await model.loginInit.removePasskeyButton();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ test.describe('tests that focus on these identifiers: email (verification at log

await model.expectScreen(ScreenNames.End);
await model.logout();
await model.expectScreen(ScreenNames.InitLogin);

await model.passkeyVerify.performAutomaticPasskeyVerification(() => model.loginInit.submitPasskeyButton());
await model.emailVerify.fillOtpCode(OtpCodeType.Correct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ test.describe('tests that focus on these identifiers: email (verification at sig

await model.expectScreen(ScreenNames.End);
await model.logout();
await model.expectScreen(ScreenNames.InitLogin);

await model.passkeyVerify.performAutomaticPasskeyVerification(() => model.loginInit.submitPasskeyButton());
await model.expectScreen(ScreenNames.End);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ test.describe('tests that focus on these identifiers: email (verification none)'

await model.expectScreen(ScreenNames.End);
await model.logout();
await model.expectScreen(ScreenNames.InitLogin);

await model.passkeyVerify.performAutomaticPasskeyVerification(() => model.loginInit.submitPasskeyButton());
await model.expectScreen(ScreenNames.End);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ test.describe('tests that focus on these identifiers: phone (verification at sig

await model.expectScreen(ScreenNames.End);
await model.logout();
await model.expectScreen(ScreenNames.InitLogin);

await model.passkeyVerify.performAutomaticPasskeyVerification(() => model.loginInit.submitPasskeyButton());
await model.expectScreen(ScreenNames.End);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ test.describe('tests that focus on these identifiers: username', () => {

await model.expectScreen(ScreenNames.End);
await model.logout();
await model.expectScreen(ScreenNames.InitLogin);

await model.passkeyVerify.performAutomaticPasskeyVerification(() => model.loginInit.submitPasskeyButton());
await model.expectScreen(ScreenNames.End);
Expand Down
2 changes: 1 addition & 1 deletion packages/tests-e2e/src/utils/developerpanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const createProjectNew = async () => {
body: JSON.stringify({
name,
allowStaticChallenges: true,
webauthnRPID: process.env.CI ? 'playground.corbado.io' : 'localhost',
webauthnRPID: process.env.CI ? 'playground.corbado.io' : 'playground.corbado.io',
}),
});
expect(createRes.ok).toBeTruthy();
Expand Down
2 changes: 1 addition & 1 deletion playground/web-js-script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This application uses script tag to load Web JS library.

1. create bundler by running `npm run build:bundler:local` on main folder.
2. install `npm i -g serve`
3. run `serve -s .` on this folder
3. run `serve` on this folder
35 changes: 35 additions & 0 deletions playground/web-js-script/auth.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!doctype html>
<html>
<head>
<title>SignIn - My Corbado App</title>
<script src="./bundle/index.js"></script>
<link
rel="stylesheet"
href="./bundle/index.css"
/>
</head>

<body>
<div id="corbado-auth"></div>

<script type="module">
const projectID = window.location.href.includes('localhost')
? 'pro-7566555492758112393'
: 'pro-2979442087152677678';

await Corbado.load({
projectId: projectID,
frontendApiUrlSuffix: 'frontendapi.cloud.corbado-staging.io',
darkMode: 'auto',
});

const authElement = document.getElementById('corbado-auth');

Corbado.mountAuthUI(authElement, {
onLoggedIn: () => {
window.location.href = '/';
},
});
</script>
</body>
</html>
Loading

0 comments on commit 4417601

Please sign in to comment.