Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Jul 10, 2024
1 parent 2778bae commit 7c8d0e7
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/platform-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,5 @@ jobs:
concurrency: 2
- tests: versioning
concurrency: 1
- tests: failing
concurrency: 1
16 changes: 16 additions & 0 deletions frontend/e2e/cafe/failing.cafe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { getLogger, logResults } from '../helpers.cafe';
import failingTest from '../tests/failing-tests';

const logger = getLogger();

fixture`Segments Tests`
.page`http://localhost:3000/`
.requestHooks(logger);

test('Failing Test', async () => {
await failingTest()
}).after(async (t) => {
console.log('Start of Failing Requests');
await logResults(logger.requests, t);
console.log('End of Failing Requests');
});
6 changes: 6 additions & 0 deletions frontend/e2e/init.cafe.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { testSegment1, testSegment2, testSegment3 } from './tests/segment-test'
import initialiseTests from './tests/initialise-tests'
import flagTests from './tests/flag-tests'
import versioningTests from './tests/versioning-tests';
import failingTests from './tests/failing-tests';

require('dotenv').config()

Expand Down Expand Up @@ -124,3 +125,8 @@ test('Versioning', async () => {
await versioningTests()
await logout()
})

test('Failing', async () => {
await failingTests()
await logout()
})
14 changes: 14 additions & 0 deletions frontend/e2e/tests/failing-tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {
click,
log,
login,
} from '../helpers.cafe'
import { PASSWORD, E2E_USER } from '../config'

export default async function () {
log('Login')
await login(E2E_USER, PASSWORD)
await click('#project-select-0')
log('Fail')
await click('#nonexistent')
}

0 comments on commit 7c8d0e7

Please sign in to comment.