I have two functional suites. LoginCest and RegistrationCest. First suite uses fixture that creates fake users. When first suite run, user table contains several users from fixture and one admin record. Important thing is admin was created by app init script before test run and when suite started it was already been there.
First suite runs successfully. Then in second RegistrationCest I get next error
And it's true, because admin record has id = 1. But it's bug, during registration new user should has been created with next id = 2. Problem is in the first test, it reset sequence for user table when Codeception applied fixtures and then didn't restore it back.
What are you trying to achieve?
I have two functional suites.
LoginCest
andRegistrationCest
. First suite uses fixture that creates fake users. When first suite run, user table contains several users from fixture and one admin record. Important thing is admin was created by app init script before test run and when suite started it was already been there.First suite runs successfully. Then in second
RegistrationCest
I get next errorAnd it's true, because admin record has id = 1. But it's bug, during registration new user should has been created with next id = 2. Problem is in the first test, it reset sequence for user table when Codeception applied fixtures and then didn't restore it back.
If I run RegistrationCest alone, it runs ok.
Details