Closed mozrat closed 4 years ago
I pinned my version to 3.2.0 and my test suite passes again.
Hi @mozrat, do u have tag with this before hook ?
Hi - Yes, I have a tag @with_baoba_user
Feature: Table REST API
As a developer integrating with the platform
I want to be able to access data via the Table REST API
So that I can consume system data in my application
Scenario: When I access the Table API anonymously
Given I am an anonymous user
When I get the form for the 'portal_page' table from the API
Then I get HTTP response code 401
And The JSON error code is 'No token found in HTTP header or cookie'
@with_baoba_user
Scenario: When I access the Table API with no filter
Given I am logged into the API as 'baoba.esres' with password 'password'
When I get the form for the 'portal_page' table from the API
Then I get HTTP response code 200
and the hook code is
import { binding, before, after } from 'cucumber-tsflow';
import { ConsoleLog as Log, TableCleaner } from 'z_common';
import { Workspace } from '../step-definitions/Workspace';
@binding([Workspace])
class CreateUsersSteps {
constructor(protected workspace: Workspace) {}
@before('with_baoba_user')
public async createBaobaUser(): Promise<void> {
const doc = {
'first_name': 'Baoba',
'last_name': 'Esres',
'password': '',
'sys_class_name': 'auth_user',
'sys_id': '6335567359431933998',
'username': 'baoba.esres'
};
Log.info('Creating Baoba user account');
await this.workspace.tableCleaner.writeRecord('localhost_auth', 'auth_user', doc);
}
}
export = CreateUsersSteps;
As per discussions in https://github.com/timjroberts/cucumber-js-tsflow/issues/45 and https://github.com/timjroberts/cucumber-js-tsflow/pull/49,
if your tag name is not prefixed with '@', previously the cucumber-js-tsflow will add a '@' for you.
However this will break some of the tag expression that can be used in cucumber.js. This behaviour has been removed. so in your code, u will now need to use:
@before('@with_baoba_user')
to work with version 3.3.0+
That's our fault. Perhaps we should have released this as a major version change rather than a patch.
@timjroberts it was a minor release 3.2.2 -> 3.3.0. Happy to do a major if all felt it is necessary.
Ah yeah, sorry @wudong Perhaps it should have been a major release, happy that it wasn't a patch though. Arguably this change is minor, so we'll see what happens when more folks start picking it up.
I'm not sure how impactful this will continue to be in the future for downstream users as they redeploy and run into the issue. If we think it could be impactful enough, perhaps we should publish a new minor 3.4.0 version that essentially rolls back the change, and then republish the current 3.3.0 as 4.0.0?
looking again at https://semver.org, tends to agree on what @mikehaas763 suggested...
i have made a new release 3.4.0 now, @mozrat let me know if u still have the problem.
@wudong all good here - thanks so much
Hi - a test suite that hasn't changed recently started failing at the same time 3.3.0 was released
Last successful test run
and now with 3.3.0
Appreciate your work on this project.