Skip to content

Commit

Permalink
feat(web): make chips in challenges draggable
Browse files Browse the repository at this point in the history
  • Loading branch information
kantord committed Apr 10, 2021
1 parent 28bb633 commit 28a003d
Show file tree
Hide file tree
Showing 14 changed files with 424 additions and 135 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ module.exports = {
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
extraFileExtensions: [".svelte"]
extraFileExtensions: [".svelte"],
},
plugins: ["svelte3", "jest", "cypress", '@typescript-eslint'],
plugins: ["svelte3", "jest", "cypress", "@typescript-eslint"],
overrides: [
{
files: ["**/*.svelte"],
Expand Down
19 changes: 0 additions & 19 deletions apps/answer-corrector/tsconfig.json

This file was deleted.

16 changes: 10 additions & 6 deletions apps/web/cypress/integration/chips.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Feature: Chips challenge

Scenario: Submitting an incorrect solution
Given I open "/course/test/skill/_chips_test0"
And I order words incorrectly
Then I see the challenge panel with no skip button
And I click "estás"
And I click "hoy"
And I click "Como"
Given I click "Submit"
Then I read "Incorrect solution"
And I read "Correct answer: ¿Como, estás hoy?"
Expand All @@ -33,8 +34,9 @@ Feature: Chips challenge

Scenario: Submitting a correct solution
Given I open "/course/test/skill/_chips_test0"
And I order words correctly
Then I see the challenge panel with no skip button
And I click "Como"
And I click "estás"
And I click "hoy"
Given I click "Submit"
Then I see the challenge panel with no skip button
And I read "Correct solution"
Expand All @@ -44,8 +46,10 @@ Feature: Chips challenge

Scenario: Submitting an alternative correct solution
Given I open "/course/test/skill/_chips_test0"
And I order words correctly, but in a different way
Then I see the challenge panel with no skip button
And I click "Tu"
And I click "Como"
And I click "estás"
And I click "hoy"
Given I click "Submit"
Then I see the challenge panel with no skip button
And I read "Correct solution"
Expand Down
14 changes: 1 addition & 13 deletions apps/web/cypress/integration/chips/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, Then } from "cypress-cucumber-preprocessor/steps"
import { Then } from "cypress-cucumber-preprocessor/steps"

Then("words with definitions have tooltips", () => {
cy.get(".has-tooltip-bottom[data-tooltip=tu]").should("be.visible")
Expand All @@ -13,15 +13,3 @@ Then("I see the correct chips", () => {
cy.get(".chip").contains("estás").should("be.visible")
cy.get(".chip").contains("hoy").should("be.visible")
})

Given("I order words incorrectly", () => {
cy.window().then((win) => win.testIncorrectSolution())
})

Given("I order words correctly", () => {
cy.window().then((win) => win.testSolution())
})

Given("I order words correctly, but in a different way", () => {
cy.window().then((win) => win.testSolution2())
})
299 changes: 299 additions & 0 deletions apps/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"@commitlint/config-conventional": "12.1.1",
"@knapsack-pro/cypress": "4.3.0",
"@percy/cypress": "2.3.4",
"@types/sortablejs": "^1.10.6",
"babel-jest": "26.6.3",
"babel-plugin-istanbul": "6.0.0",
"bulmaswatch": "0.8.1",
Expand Down
Loading

1 comment on commit 28a003d

@vercel
Copy link

@vercel vercel bot commented on 28a003d Apr 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.