This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "../tsconfig", | |
"compilerOptions": { | |
"baseUrl": "../node_modules", | |
"target": "es5", | |
"types": ["cypress", "node"] | |
}, | |
"include": ["**/*.ts"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cucumber = require('cypress-cucumber-preprocessor').default; | |
const browserify = require('@cypress/browserify-preprocessor'); | |
module.exports = (on, config) => { | |
const options = browserify.defaultOptions; | |
options.browserifyOptions.plugin.unshift(['tsify']); | |
on('file:preprocessor', cucumber(options)); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before({ tags: "@loggedIn" }, () => { | |
localStorage.setItem('@authLS', 'admin'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Todo | |
I want to be able to manage my todos | |
Background: Logging in | |
Given I am logged in | |
Scenario: List all todos | |
Given I am at the todo page | |
Then There should be a list of todos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AuthContext } from '@app/modules/app/auth.provider'; | |
import { AppPath } from '@app/modules/app/routes/routes-list'; | |
import { ContentFullHeightStyled } from '@app/modules/login/components/atm.content-full-height'; | |
import { useLogin } from '@app/modules/login/use-login.hook'; | |
import { Button } from '@atomic/atm.button/button.component'; | |
import { ButtonKind } from '@atomic/atm.button/button.style'; | |
import { Card } from '@atomic/atm.card/card.component'; | |
import { VSeparator } from '@atomic/atm.separator/separator.style'; | |
import { H1, Text } from '@atomic/atm.typography'; | |
import { FlashMessageDispatcherContext } from '@atomic/mol.flash-message/flash-message.provider'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use | |
When(/I insert the (incorrect|correct) username/, (username: string) => {}) | |
// instead of | |
When('I insert the (incorrect|correct) username', (username: string) => {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use | |
And('There should be a conversation history with the feedback {string}', (feedback: string) => {}) | |
// instead of | |
And(/There should be a conversation history with the feedback {string}/, (feedback: string) => {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; | |
Given('I am at the login page', () => { | |
cy.visit('/'); | |
}); | |
When('I type the correct username', () => { | |
cy.get('[data-test=loginInput]').type('admin'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When('I put {string} {string} in the {string}', (first, second, third) => { | |
// do something here... | |
}) |
NewerOlder