Ajout de todo pour completer l'exemple dans le seed

master
Baptiste Bech 4 years ago
parent 124d54936e
commit fcb2e2160b
  1. 41
      cypress/support/FormObjects/Forms.spec.ts
  2. 4
      cypress/support/common/action.spec.ts
  3. 2
      cypress/support/common/validators.ts
  4. 2
      package.json

@ -1,43 +1,6 @@
class Forms { class Forms {
EmptyFormCompound(){ fillForm(){
cy.get('#securityGroup').click() // TODO Do an exemple;
cy.get('#name').click()
cy.get('#securityGroup-helper-text').should('have.text', 'Security group is required');
cy.get('#name').click()
cy.get('#alias').click;
cy.get('#name-helper-text').should('be.visible');
cy.get('#alias').click()
cy.get('#name-helper-text').should('have.text', 'Must not be null');
cy.get('.space-form > .space-autocomplete > .MuiAutocomplete-root > .MuiFormControl-root > .MuiInputBase-root > input').click();
cy.get('#description').click({ force: true });
cy.get('#description').click()
cy.get('#lead-helper-text').should('be.visible');
cy.get('#lead-helper-text').should('have.text', 'Field \'securityGroup\' must be set');
cy.get('.MuiDialogActions-root > :nth-child(2)').should('be.disabled');
}
EmptyFormStudy(){
cy.get('#compoundName').should('be.disabled')
cy.get('#name').click()
cy.get('#alias').click()
cy.get('#name-helper-text').should('be.visible');
cy.get('#name-helper-text').should('have.text','Must not be null');
cy.get('#name-helper-text').should('have.text', 'Must not be null');
cy.get('.space-form > .space-autocomplete > .MuiAutocomplete-root > .MuiFormControl-root > .MuiInputBase-root > input').click();
cy.get('#description').click({ force: true });
cy.get('#description').click()
cy.get('#lead-helper-text').should('be.visible');
cy.get('#lead-helper-text').should('have.text', 'Lead is required');
cy.get('.MuiDialogActions-root > :nth-child(2)').should('be.disabled');
} }
} }

@ -2,10 +2,10 @@ import * as faker from 'faker';
// Compound's Actions // Compound's Actions
export function openSearchBar() { export function openSearchBar() {
// TODO do exemple
} }
export function search(query: String) { export function search(query: String) {
// TODO do exemple
} }

@ -1,5 +1,5 @@
/// <reference types="Cypress"/> /// <reference types="Cypress"/>
// Field validator // Field validator
export function fieldErrorValidator(){ export function fieldErrorValidator(){
// TODO do an exemple
} }

@ -1,5 +1,5 @@
{ {
"name": "space-e2e-test-automation", "name": "seed-apside-test-automation",
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"scripts": { "scripts": {

Loading…
Cancel
Save