Don't rely on the state of previous tests #4

Closed
opened 2021-09-05 13:10:31 +02:00 by Simon · 1 comment
Owner

We should avoid make test dependant of other tests to succeed. If needed we can pack bunch of test script together and change the test topic accordingly:

DON'T

it('require an email');

it('then require a password');

DO

it("wont log a user with malformed email");
We should avoid make test dependant of other tests to succeed. If needed we can pack bunch of test script together and change the test topic accordingly: ### DON'T ``` it('require an email'); it('then require a password'); ``` ### DO ``` it("wont log a user with malformed email"); ```
Simon added the
bug
help wanted
labels 2021-09-05 13:55:09 +02:00
Simon added the
wontfix
label 2021-09-05 13:56:21 +02:00
Author
Owner
    it.skip('Allow to disconnect a connected user', function() {
    	// cy.visit("ok.html")
        // get back
        cy.contains('Retour').click()
        cy.title().should('eq', 'QA @ Trusk')
        cy.get('h1').should('be.visible')
        cy.get('p').should('be.visible')
        cy.get('label').should('be.visible')
        cy.get('input').should('be.visible')
        cy.get('#submit').should('be.visible')
    });

This testcase need the server to be on a 'user connected' state prior of the test to run. I would need more introspection in the server code in order to cy.request() that before hand then do the test itself.

``` it.skip('Allow to disconnect a connected user', function() { // cy.visit("ok.html") // get back cy.contains('Retour').click() cy.title().should('eq', 'QA @ Trusk') cy.get('h1').should('be.visible') cy.get('p').should('be.visible') cy.get('label').should('be.visible') cy.get('input').should('be.visible') cy.get('#submit').should('be.visible') }); ``` This testcase need the server to be on a 'user connected' state prior of the test to run. I would need more introspection in the server code in order to `cy.request()` that before hand then do the test itself.
Simon closed this issue 2022-06-30 00:37:03 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Trusk/Partie-3#4
No description provided.