2023-11-30 18:20:13 +01:00
|
|
|
///<reference path="../../global.d.ts" />
|
|
|
|
|
|
|
|
describe('feature', () => {
|
|
|
|
const randomId = String(Math.random()).split('.')[1];
|
|
|
|
const featureToggleName = `unleash-e2e-${randomId}`;
|
|
|
|
|
|
|
|
before(() => {
|
|
|
|
cy.runBefore();
|
|
|
|
});
|
|
|
|
|
|
|
|
after(() => {
|
|
|
|
cy.deleteFeature_API(featureToggleName);
|
|
|
|
});
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.login_UI();
|
|
|
|
cy.visit('/features');
|
|
|
|
});
|
|
|
|
|
2024-05-22 07:20:11 +02:00
|
|
|
it('can create a feature flag', () => {
|
2023-11-30 18:20:13 +01:00
|
|
|
cy.createFeature_UI(featureToggleName, true, 'default', true);
|
2024-12-12 11:19:03 +01:00
|
|
|
cy.contains('a', featureToggleName).click();
|
2023-11-30 18:20:13 +01:00
|
|
|
cy.url().should('include', featureToggleName);
|
|
|
|
});
|
|
|
|
});
|