Skip to content

Commit

Permalink
Examine card text for clues
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathonherbert committed Mar 4, 2024
1 parent be29228 commit d0149f6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions fronts-client/integration/tests/main.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,23 @@ test('Clipboard - drop depth', async (t) => {
.eql(2);
});

test('Drag from clipboard to full collection - accept modal', async (t) => {
test.only('Drag from clipboard to full collection - accept modal', async (t) => {
const externalSnap = await externalSnapLink();
const fullCollectionCount = await allCards(2).count;

await t
.dragToElement(externalSnap, collectionDropZone(2, 2))
.click(optionsModalChoice('options-modal-confirm'))
.expect(allCards(2).count)
.eql(fullCollectionCount - 1); // there are now 19 articles and 1 snap
.click(optionsModalChoice('options-modal-confirm'));

const cardsSelector = allCards(2);
const allCardsCount = await cardsSelector.count;

console.log({ allCardsCount, fullCollectionCount });

for (let i = 0; i < allCardsCount; i++) {
const elementText = await cardsSelector.nth(i).innerText;
console.log({ i, elementText });
}
});

test('Drag from clipboard to full collection - cancel modal', async (t) => {
Expand Down

0 comments on commit d0149f6

Please sign in to comment.