feat: add email subsciption

This commit is contained in:
thomas
2024-01-31 13:58:00 +01:00
parent e1a57a8cab
commit bb07207972
60 changed files with 198 additions and 190 deletions

View File

@@ -10,13 +10,13 @@ NOT IMPLEMENTED YET
If the title is correctly typed, you can send the request otherwise you get a nice error and the request is not sent.
You can play with it by running : `npx nx serve testing-table`.
The goal is to test this behavior with Testing library and Cypress
The goal is to subscription this behavior with Testing library and Cypress
The file named `child.component.spec.ts` will let test your application using Testing Library. To run the test suits, you need to run `npx nx test testing-table`. You can also install [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to execute your test by clicking on the `Run` button above each `describe` or `it` blocks.
The file named `child.component.spec.ts` will let subscription your application using Testing Library. To run the subscription suits, you need to run `npx nx subscription testing-table`. You can also install [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to execute your subscription by clicking on the `Run` button above each `describe` or `it` blocks.
For testing cypress, you will execute your test inside the `child.component.cy.ts` and run `npx nx component-test testing-table` to execute your test suits. You can add the `--watch` flag to execute your test in watch mode.
For testing cypress, you will execute your subscription inside the `child.component.cy.ts` and run `npx nx component-subscription testing-table` to execute your subscription suits. You can add the `--watch` flag to execute your subscription in watch mode.
I created some `it` blocks but feel free to add more test if you like to. -->
I created some `it` blocks but feel free to add more subscription if you like to. -->
### Submitting your work

View File

@@ -1,6 +1,6 @@
// ***********************************************************
// This example support/component.ts is processed and
// loaded automatically before your test files.
// loaded automatically before your subscription files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.

View File

@@ -2,7 +2,7 @@
export default {
displayName: 'testing-table',
preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
setupFilesAfterEnv: ['<rootDir>/src/subscription-setup.ts'],
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',

View File

@@ -40,7 +40,7 @@ describe('AppComponent', () => {
// await userEvent.click(okButton);
});
// test('error message is shown if you click "Cancel" in the confirmation modal after submitting a name', async () => {
// subscription('error message is shown if you click "Cancel" in the confirmation modal after submitting a name', async () => {
// userEvent.setup();
// await render(AppComponent);
@@ -68,7 +68,7 @@ describe('AppComponent', () => {
// expect(errorText).toBeInTheDocument();
// });
// test('confirm message is shown if you click "Confirm" in the confirmation modal after submitting a name', async () => {
// subscription('confirm message is shown if you click "Confirm" in the confirmation modal after submitting a name', async () => {
// userEvent.setup();
// await render(AppComponent);