Skip to content

Commit

Permalink
WIP fix flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
mcampourcy committed Oct 8, 2024
1 parent 0dc0c8c commit 0074f80
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module(
assert.dom(screen.getByRole('textbox', { name: '* Code INSEE de naissance' })).hasAttribute('required');
});

module('when the form is filled', () => {
module('when the form is filled', function () {
test('it should submit a student', async function (assert) {
const candidateData = {
firstName: 'Lara',
Expand Down Expand Up @@ -336,7 +336,7 @@ module(
assert.dom(screen.getByRole('button', { name: '* Pays de naissance' })).includesText('France');
});

module('when close button cross icon is clicked', () => {
module('when close button cross icon is clicked', function () {
test('it closes candidate details modal', async function (assert) {
// given
const closeModalStub = sinon.stub();
Expand Down Expand Up @@ -366,7 +366,7 @@ module(
});
});

module('when close bottom button is clicked', () => {
module('when close bottom button is clicked', function () {
test('it closes candidate details modal ', async function (assert) {
// given
const closeModalStub = sinon.stub();
Expand Down Expand Up @@ -396,7 +396,7 @@ module(
});
});

module('when a foreign country is selected', () => {
module('when a foreign country is selected', function () {
test('it shows city field and hides insee code and postal code fields', async function (assert) {
// given
const closeModalStub = sinon.stub();
Expand All @@ -419,11 +419,10 @@ module(
);

await click(screen.getByRole('button', { name: '* Pays de naissance' }));
await click(
await screen.findByRole('option', {
name: 'Borduristan',
}),
);
const countryOption = await screen.findByRole('option', {
name: 'Borduristan',
});
await click(countryOption);

// then
assert.dom(screen.queryByLabelText('* Code INSEE de naissance')).isNotVisible();
Expand All @@ -432,7 +431,7 @@ module(
});
});

module('when the insee code option is selected', () => {
module('when the insee code option is selected', function () {
test('it shows insee code field and hides postal code and city fields', async function (assert) {
// given
const closeModalStub = sinon.stub();
Expand Down Expand Up @@ -463,7 +462,7 @@ module(
});
});

module('when the postal code option is selected', () => {
module('when the postal code option is selected', function () {
test('it shows postal code and city fields and hides insee code field', async function (assert) {
// given
const closeModalStub = sinon.stub();
Expand Down Expand Up @@ -494,7 +493,7 @@ module(
});
});

module('when center is allowed access to complementary certifications', () => {
module('when center is allowed access to complementary certifications', function () {
test('it display complementary certification options', async function (assert) {
// given
const updateCandidateFromEventStub = sinon.stub();
Expand Down

0 comments on commit 0074f80

Please sign in to comment.