use wait?

This commit is contained in:
tamaina 2022-01-19 00:24:48 +09:00
parent dd85b6343a
commit 5aa8feec9c
1 changed files with 23 additions and 23 deletions

View File

@ -82,15 +82,15 @@ describe('After user signup', () => {
password: 'pass',
}).its('body').as('admin');
cy.get('@admin').then(() => {
cy.wait('@admin');
// ユーザー作成
cy.request('POST', '/api/signup', {
username: 'alice',
password: 'alice1234',
}).its('body').as('alice');
});
cy.get('@alice');
cy.wait('@alice');
});
afterEach(() => {
@ -145,15 +145,16 @@ describe('After user singed in', () => {
password: 'pass',
}).its('body').as('admin');
cy.get('@admin').then(() => {
cy.wait('@admin');
// ユーザー作成
cy.request('POST', '/api/signup', {
username: 'alice',
password: 'alice1234',
}).its('body').as('alice');
});
cy.get('@alice').then(() => {
cy.wait('@alice');
cy.visit('/');
cy.intercept('POST', '/api/signin').as('signin');
@ -163,7 +164,6 @@ describe('After user singed in', () => {
cy.get('[data-cy-signin-password] input').type('alice1234{enter}');
cy.wait('@signin').as('signedIn');
});
cy.get('@signedIn');
});