Skip to content

Commit

Permalink
fix: part 1
Browse files Browse the repository at this point in the history
Ref: #392
  • Loading branch information
Guekka committed Jun 16, 2023
1 parent 8e6159a commit 0662ae7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
27 changes: 15 additions & 12 deletions libs/fixtures-e2e/src/lib/back-office/quiz/answer.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ export class AnswerFixture {
this.answerAddButton = page.locator(
'button:has-text("Ajouter une réponse")'
);
this.text = page.locator(
'webonjour-question-answer-add-popup input[formcontrolname="text"]'
);
this.image = page.locator(
'webonjour-question-answer-add-popup input[type="file"]'
);
this.submit = page.locator(
'webonjour-question-answer-add-popup button[type="submit"]'
);
this.isCorrect = page.locator(
'webonjour-question-answer-add-popup input[type="checkbox"]'
);
this.text = page
.locator(
'webonjour-question-answer-add-popup input[formcontrolname="text"]'
)
.first();
this.image = page
.locator('webonjour-question-answer-add-popup input[type="file"]')
.first();
this.submit = page
.locator('webonjour-question-answer-add-popup button[type="submit"]')
.first();
this.isCorrect = page
.locator('webonjour-question-answer-add-popup input[type="checkbox"]')
.first();
this.answers = page.locator('webonjour-question-answer tbody tr');
}

Expand All @@ -40,6 +42,7 @@ export class AnswerFixture {
await this.submit.click();
// wait for the page to reload
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');
}

async updateAnswer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class QuestionSelectionFixture {
async goto(floor: number, patient: number, quiz: number) {
await this.gotoIndex(floor, patient, quiz);

await this.page.waitForSelector('.question-title', { timeout: 200 });
await this.page.waitForSelector('.question-title', { timeout: 1000 });
}

async selectAnswer(quizNumber: number) {
Expand Down

0 comments on commit 0662ae7

Please sign in to comment.